I am creating a splash for a program that I'm making but RegisterClass keeps on failing (2: The system cannot find the file specified.)
My code is this:
WNDCLASS wc = {0};
wc.lpfnWndProc = DefWindowProc;
wc.hInstance = g_hinstance;
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
if (wc.hCursor == NULL)
{
#ifdef DEBUG
log_debug("ShowSplash:CreateSplashWindow: LoadCursor failed: %d", GetLastError());
#endif
return NULL;
}
wc.lpszClassName = classname;
if (RegisterClass(&wc) == 0);
{
#ifdef DEBUG
log_debug("ShowSplash:CreateSplashWindow: RegisterClass failed: %d", GetLastError());
#endif
return NULL;
}
g_hinstance
is the HINSTANCE
DllMain
gets
classname
is the name of the window class