RegisterWindowClass Registers a window class of type 'CUH_Control' so that it can be used in dialog boxes Params hInstance - program instance handle Return 0 - (UH_SUCCESS) 1 - (UH_ERROR) ***********************************/
| 206 | 1 - (UH_ERROR) |
| 207 | ***********************************/ |
| 208 | int CUH_Control::RegisterWindowClass(HINSTANCE hInstance){ |
| 209 | |
| 210 | |
| 211 | WNDCLASS wndclass{}; |
| 212 | |
| 213 | //register this new window class |
| 214 | wndclass.style = CS_HREDRAW | CS_VREDRAW |CS_DBLCLKS; |
| 215 | wndclass.lpfnWndProc = WndProc; |
| 216 | wndclass.cbClsExtra = 0 ; |
| 217 | wndclass.cbWndExtra = 20; |
| 218 | wndclass.hInstance = hInstance ; |
| 219 | wndclass.hIcon = NULL; |
| 220 | wndclass.hCursor = LoadCursor(NULL, IDC_ARROW); |
| 221 | wndclass.hbrBackground = NULL; |
| 222 | wndclass.lpszMenuName = NULL; |
| 223 | wndclass.lpszClassName = _T("CUH_Control"); |
| 224 | |
| 225 | RegisterClass(&wndclass); |
| 226 | |
| 227 | if(GetClassInfo(hInstance,_T("CUH_Control"),&wndclass)) |
| 228 | return UH_SUCCESS; |
| 229 | return UH_ERROR; |
| 230 | } |
| 231 | |
| 232 | /********************************** |
| 233 | WndProc |
nothing calls this directly
no outgoing calls
no test coverage detected