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
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
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;
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.
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
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