I'm trying to follow a win32 tutorial at http://www.winprog.org/tutorial/
I'm working in Visual Studio 2005 c++. I create a new project under the win32 option and select the "win32 project" template. Then under "application settings" I select "windows application" and check the "empty project" check box. Then under project/add new item, I add a c++ source file. To this source file, I paste the following code:#include
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow)
MessageBox(NULL, "Goodbye, cruel world!", "Note", MB_OK);
This will not run at all unless I change the suffix of the name of the source file from .c++ to .c. Then it will open a window(yippee!- this alone felt like a major accomplishment) but doesn't display the text, only small rectangles where it looks like the text should be.
The debug log lists a bunch of .dll files, each followed by "No symbols loaded."
How can I make this code run in my IDE- changes to the code, settings in MSVS, etc? or can I? I realize this might be more of an IDE problem than win32, but I figure there are more people here that know MSVS than there are people in the visual forum who know win32.
My recent experience is limited to successfully working through several online c++ tutorials using console program examples and I have recently purchased Petzold's "Programming Windows." I also programmed fairly extensively in BASIC and FORTRAN back in the commodore 64 days, and during my undergrad work in physics.