Results 1 to 7 of 7

Thread: Somethings not right...

  1. #1

    Thread Starter
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091

    Smile Somethings not right...

    Can somebody look at this. For some reason, when I start the program, if I type in text, then try to save it, the Save As dialog doesn't come up, but if I click New, and start another document, it comes up that second time. I've looked through it about 10 times, and I can't seem to catch what the problem is. It is written using VC++ 6.0

    Note : I think I zipped up all the associated files, but if there are some missing, let me know.

    Thanks for your help

    Attached Files Attached Files
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  2. #2
    denniswrenn
    Guest
    Code:
    				case JW_MENU_FILE_NEW:
    					CreateNewDocument();
    					return 0;
    				case JW_MENU_FILE_OPEN:
    					ShowOpen(ghWnd_Main);
    					return 0;
    				case JW_MENU_FILE_SAVE:
    					SaveFile(ghWnd_Main);					
    					return 0;
    				case JW_MENU_FILE_SAVE_AS:
    
    					return 0;
    				case JW_MENU_FILE_PRINT:
    
    					return 0;
    				case JW_MENU_FILE_PRINT_SETUP:
    
    					return 0;
    				case JW_MENU_FILE_EXIT:
    					SendMessage(ghWnd_Main,WM_CLOSE,NULL,NULL);
    					return 0;
    You forgot to add save as code

  3. #3

    Thread Starter
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Hehe...yeah, it's kind of a work in progress, but I wasn't clicking on Save As, just Save, and it still wouldn't work. If the file wasn't named, it should pop up the Save As box, but it doesn't

    Thanks, though

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  4. #4
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    Try this:

    Change the name of the menu item "JW_MENU_FILE_SAVE" to something else like "JW_MENU_FILE_SAVEB" in your resource file and also in you code. Then see if it shows the save as dialog box or not
    Baaaaaaaaah

  5. #5

    Thread Starter
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Now I am getting a Debug Assertion Error. It says:
    File : fopen.c
    Line : 54

    Expression :*file != _T('\0')
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  6. #6
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    Try this:

    Code:
    switch(msg)
    {
    
    //.....................................................
    //other code
    //....................................
    case WM_INITMENUPOPUP:
    		if (!HIWORD(lparam) && LOWORD(lparam) == 0)
    		{
    
    		MessageBox(NULL,"File menu was clicked","heheh",MB_OK);
    
    		}
    		return 0;
    
    //..........................
    //other code
    }
    Showing a messagebox is not a good way of interacting with the use but you put a text on the statusbar or do whatever instead because with the messagebox, it won't show the popup menu then
    Baaaaaaaaah

  7. #7

    Thread Starter
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    Thanks, I'll try it

    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width