cplusplus.com
C++ : Forum : Beginners : #include <windows.h>
 
cplusplus.com
Information
Documentation
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs


question #include <windows.h>

atjm88 (201)
1
2
3
4
5
6
7
#include <windows.h>

int WINAPI WinMain(HINSTANCE hInstace,HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)
{
	MessageBox(NULL, TEXT("Hello World"), TEXT("Hello Window"),0);
	return 0;
}


Hi, I'm new in this kind of programming, may I know what is this int WINAPI WinMain(HINSTANCE hInstace,HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow) actually use for? Is it just like int main()
Azagaros (399)
Basically. The nature of the windows platform requires a different entry point for windows based programs.
atjm88 (201)
Is that means every time I want to start wrting this WINAPI program, I must use that? TQ
int WINAPI WinMain(HINSTANCE hInstace,HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)
Topic archived. No new replies allowed.