How do I check if my class is registered already?
Mike B
Printable View
How do I check if my class is registered already?
Mike B
//
// Register the window class if not already registered.
//
WNDCLASS wc;
HINSTANCE hinst = AfxGetInstanceHandle();
if (GetClassInfo(hinst, g_classname, &wc))
return TRUE;
//
// Register the window class if not already registered.
//
WNDCLASS wc;
HINSTANCE hinst = AfxGetInstanceHandle();
if (GetClassInfo(hinst, g_classname, &wc))
return TRUE;
// here you carry on to register the window class
Hope this helps.
csheng