101 BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) 102 { 103 HWND hWnd; 104 105 hInst = hInstance; // Store instance handle in our global variable 106 107 hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW, 108 CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL); 109 110 if (!hWnd) 111 { 112 return FALSE; 113 } 114 115 ShowWindow(hWnd, nCmdShow); 116 UpdateWindow(hWnd); 117 118 return TRUE; 119 } 120 121 // 122 // FUNCTION: WndProc(HWND, unsigned, WORD, LONG) 123 // 124 // PURPOSE: Processes messages for the main window. 125 // 126 // WM_COMMAND - process the application menu 127 // WM_PAINT - Paint the main window 128 // WM_DESTROY - post a quit message and return 129 // 130 // 131 LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) 132 { 133 int wmId, wmEvent; 134 PAINTSTRUCT ps; 135 HDC hdc; 136 TCHAR szHello[MAX_LOADSTRING]; 137 LoadString(hInst, IDS_HELLO, szHello, MAX_LOADSTRING); 138 |
正在阅读:《编程高手箴言》读后感(3)《编程高手箴言》读后感(3)
2004-04-07 10:02
出处:CSDN
责任编辑:sdq
键盘也能翻页,试试“← →”键