MCPcopy Create free account
hub / github.com/ashkulz/NppFTP / RegisterWindowClass

Method RegisterWindowClass

UTCP/src/uh_ctrl.cpp:208–230  ·  view source on GitHub ↗

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) ***********************************/

Source from the content-addressed store, hash-verified

206 1 - (UH_ERROR)
207***********************************/
208int 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/**********************************
233WndProc

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected