My current problem involves taskbars. I've added libcomctl32.a to the linker stuff in my project options in Dev C++ and included commctrl.h and it compiles OK. I have the code in my WM_CREATE for the main window. HWND hStatus is outside of it.
Code:
        InitCommonControls();

	hStatus = CreateWindowEx(0, STATUSCLASSNAME, NULL,
        WS_CHILD | WS_VISIBLE | SBARS_SIZEGRIP, 0, 40, 0, 40,
        g_hWnd, (HMENU)ID_STATUS, GetModuleHandle(NULL), NULL);

        int statwidths[] = {100, -1};

    	SendMessage(hStatus, SB_SETPARTS, 2, (LPARAM)statwidths);
    	SendMessage(hStatus, SB_SETTEXT, 0, (LPARAM)"Hi there :)");
This is from the winprog status bar tutorial. Problem is, CreateWindowEx returns NULL and the error code is 1406 which apparently is 'Cannot create top level child window'. what? MSDN says something about it, but it is very brief and it's not from the developer perspective.

A child window is 'any window that is not a top level window', but I can't see what's going on in the above that makes it like that. I read other posts that said the code there works fine. Any ideas?