关键函数介绍
1.WinMain函数----主程序
int APIENTRY WinMain(HINSTANCE hInstance, //应用程序实例句柄
HINSTANCE hPrevInstance, //应用程序之前的实例句柄
LPSTR lpCmdLine, //指定传递给应用程序的命令行参数
int nCmdShow) //指明窗口如何显示
{
MSG msg;//表示消息
/*
typedef struct tagMSG {
HWND hwnd; //windows identifier
UINT message; //messages identifier
WPARAM wParam;
LPARAM lParam; //additional messages
DWORD time; //Time of message delivery to message queue
POINT pt; //Mouse position
#ifdef _MAC
DWORD lPrivate;
#endif
} MSG, *PMSG, NEAR *NPMSG, FAR *LPMSG;
*/
MyRegisterClass(hInstance);//注册窗口应用程序
if (!InitInstance (hInstance, nCmdShow))
{
return FALSE;
}
while (GetMessage(&msg, NULL, 0, 0)) //从消息队列接收