1 /*------------------------------------------------------------------------2 HELLOWIN.C -- Displays "Hello, Windows 98!" in client area3
4 (c) Charles Petzold, 19985
6 -----------------------------------------------------------------------*/
7
8 #include
9 LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM) ;10
11
12 int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,PSTR szCmdLine, intiCmdShow)13
14 {15
16 static TCHAR szAppName[] = TEXT ("HelloWin") ;17
18 HWND hwnd ;19
20 MSG msg ;21 //前面都是变量定义,不关注。
22
23 WNDCLASwndclass ;24
25
26 wndclass.style = CS_HREDRAW |CS_VREDRAW ;27
28 wndclass.lpfnWndProc = WndProc ; //关键句,指出消息的处理函数所在位置
29
30 wndclass.cbClsExtra = 0;31
32 wndclass.cbWndExtra = 0;33
34 wndclass.hI