I'm trying to make a Windows application but I get the error in the title.

I am running Windows XP Professional and using VC++ 2008.

Here is how I call my code:

WNDCLASSEX wcex;

    wcex.cbSize        = sizeof(WNDCLASSEX);
    wcex.style         = 0;
    wcex.lpfnWndProc   = WndProc;
    wcex.cbClsExtra    = 0;
    wcex.cbWndExtra    = 0;
	wcex.hInstance     = windowinfo.hInstance;
    wcex.hIcon         = NULL;
    wcex.hCursor       = LoadCursor(NULL, IDC_ARROW);

        wcex.hbrBackground	= (HBRUSH)(COLOR_WINDOW+1);

	wcex.lpszMenuName	= 0;
	wcex.lpszClassName	= L"Engine_Window";
	wcex.hIconSm		= 0;

	RegisterClassEx(&wcex);

	RECT clientSize;
	clientSize.top = 0;
	clientSize.left = 0;
	clientSize.right = 800;
	clientSize.bottom = 600;

	DWORD style = WS_POPUP | WS_SYSMENU | WS_BORDER | WS_CAPTION | WS_CLIPCHILDREN | WS_CLIPSIBLINGS;

	windowinfo.hWnd = CreateWindowEx(0, L"Engine_Window", L"Quarantine Engine",
		style, windowLeft, windowTop, realWidth, realHeight, NULL, NULL, windowinfo.hInstance, NULL);

That is just shoot in the dark, but check your RegisterClassEx function.
DLL must unregister its classes when it is unloaded.

When I look at the return value of CreateWindow it returns an error code meaning "Paramater not correct" so I checked the return of RegisterClassEx and it returned an error code meaning "System cannot find the file specified" any ideas?

This article has been dead for over six months. Start a new discussion instead.