first windows app
i just windows game programming guru book and i cant figure out how to do my first windows app \. the book syas to create a new win32.exe and include demo2.cpp from the cdrom, but i dont know how to do that. then it says to compile and link the program somehow, but i dont understand how to link the program. heres the codes for my c++source file.
// DEMO2_2.CPP - a simple message box
#define WIN32_LEAN_AND_MEAN
#include
#include
// main entry point for all windows programs
int WINAPI WinMain(HINSTANCE hinstance,
HINSTANCE hprevinstance,
LPSTR lpcmdline,
int ncmdshow)
{
// call message box api with NULL for parent window handle
MessageBox(NULL, "THERE CAN BE ONLY ONE!!!",
"MY FIRST WINDOWS PROGRAM",
MB_OK | MB_ICONEXCLAMATION);
// exit program
return(0);
} // end WinMain
please can someone walk me throught how to do this thanks
i am the best
do you have a compiler ? MSVC is usually the compiler of choice, but there is also Borland and a few other free ones on the net you can find.
"Now go away or I shall taunt you a second time"
- Monty Python and the Holy Grail
themGames Productions
"Now go away or I shall taunt you a second time"
- Monty Python and the Holy Grail
themGames Productions
yes i do have a compiler i use microsoft visual c++ 6.0 please someeone help me
i am the best
Ok, create a new Win32 application. Title it "My first Windows program". Select simple application, this will insert a winmain, and two headers stdafx.h and .cpp. now, type in the code to your main, and once you have that done, hit F7, to build the project. If there are errors, they will show up in the debug window. fix them, and hit F7 again. then, to run the program, hit Ctrl-F5. i think that''s all...
farmersckn
farmersckn
Yesterday is the past, tomorrow is the future. Today is a gift, that is why we call it the present.
Nah, if I were compiling that I would:
1) Create a new WIN32 app
2) Then select empty project, which is different than farmer stated above. I could be wrong, but I know my way works
3) Then goto file -> new and add a new .cpp file to the current project
4) Type code, and compile
If you have MSVC, it should compile / link itself when you compile.
1) Create a new WIN32 app
2) Then select empty project, which is different than farmer stated above. I could be wrong, but I know my way works
3) Then goto file -> new and add a new .cpp file to the current project
4) Type code, and compile
If you have MSVC, it should compile / link itself when you compile.
Peon
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement