#include <windows.h>

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()
Basically. The nature of the windows platform requires a different entry point for windows based programs.
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.