64 // This function and its usage is only necessary if you want this code 65 // to be compatible with Win32 systems prior to the 'RegisterClassEx' 66 // function that was added to Windows 95. It is important to call this function 67 // so that the application will get 'well formed' small icons associated 68 // with it. 69 // 70 ATOM MyRegisterClass(HINSTANCE hInstance) 71 { 72 WNDCLASSEX wcex; 73 74 wcex.cbSize = sizeof(WNDCLASSEX); 75 76 wcex.style = CS_HREDRAW | CS_VREDRAW; 77 wcex.lpfnWndProc = (WNDPROC)WndProc; 78 wcex.cbClsExtra = 0; 79 wcex.cbWndExtra = 0; 80 wcex.hInstance = hInstance; 81 wcex.hIcon = LoadIcon(hInstance, (LPCTSTR)IDI_TEST); 82 wcex.hCursor = LoadCursor(NULL, IDC_ARROW); 83 wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); 84 wcex.lpszMenuName = (LPCSTR)IDC_TEST; 85 wcex.lpszClassName = szWindowClass; 86 wcex.hIconSm = LoadIcon(wcex.hInstance, (LPCTSTR)IDI_SMALL); 87 88 return RegisterClassEx(&wcex); 89 } 90 91 // 92 // FUNCTION: InitInstance(HANDLE, int) 93 // 94 // PURPOSE: Saves instance handle and creates main window 95 // 96 // COMMENTS: 97 // 98 // In this function, we save the instance handle in a global variable and 99 // create and display the main program window. 100 // |
正在阅读:《编程高手箴言》读后感(3)《编程高手箴言》读后感(3)
2004-04-07 10:02
出处:CSDN
责任编辑:sdq
键盘也能翻页,试试“← →”键