how do you get the file to load when you click on the menu item
Printable View
how do you get the file to load when you click on the menu item
Um, with several lines of code. :confused:
Show us what you've got.
You catch the message (WM_COMMAND), verify that it's the correct menuitem that was pressed (LOWORD(wParam) == IdFileOpen), then call a function that loads the actual file. Eventually calling a dialog to select the file you want to load.
actually i wan't it to open one certain file every time that it is clicked
Try pasting in some more code from other people tutorials rather than spending time ACTUALLY learning how to write the code from scratch.
Or
Continue to post threads in the vain hope someone who has spent the time learning will take pity on you and spend time doing yo work
Use file streams (ifstream). If you don't know it, there is a tutorial on this site.Quote:
Originally posted by andrewjf9
actually i wan't it to open one certain file every time that it is clicked