how do you get the file to load when you click on the menu item
how do you get the file to load when you click on the menu item
Um, with several lines of code.
Show us what you've got.
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
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.
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.
actually i wan't it to open one certain file every time that it is clicked
Andrew Ferguson!
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
"Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
Friedrich Nietzsche
"I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
George Best
"If you are going through hell....keep going."
Winston Churchill
Use file streams (ifstream). If you don't know it, there is a tutorial on this site.Originally posted by andrewjf9
actually i wan't it to open one certain file every time that it is clicked
MagosX.com
Give a man a fish and you feed him for a day.
Teach a man to fish and you feed him for a lifetime.