hi guys,

toying with writing an editor but i seem to be having issues with MDI in my win32 application

in my main windows wndProc
Code:
case WM_CREATE:
		{
			CLIENTCREATESTRUCT ccs;

			// Retrieve the handle to the window menu and assign the 
			// first child window identifier. 

			ccs.hWindowMenu = GetSubMenu(GetMenu(hWnd), 2);
			ccs.idFirstChild = 500001;

			// Create the MDI client window. 
			clientArea = CreateWindow("MDICLIENT", (LPCTSTR)NULL,
				WS_CHILD | WS_CLIPCHILDREN | WS_VSCROLL | WS_HSCROLL,
				0, 0, 700, 500, hWnd, NULL, hInst, (LPSTR)&ccs);

			ShowWindow(clientArea, SW_SHOW);
		}
to create an area for the mdi windows to go

and to create my mdi window after the main window is visible
Code:
	WNDCLASSEX wc;
	wc.cbSize = sizeof(WNDCLASSEX);
	wc.style = CS_VREDRAW | CS_HREDRAW;
	wc.lpfnWndProc = MDIChildWndProc;
	wc.cbClsExtra = 0;
	wc.cbWndExtra = 0;
	wc.hInstance = inst;
	wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
	wc.hCursor = LoadCursor(NULL, IDC_ARROW);
	wc.hbrBackground = static_cast<HBRUSH>(GetStockObject(WHITE_BRUSH));
	wc.lpszMenuName = NULL;
	wc.lpszClassName = "FOO";
	wc.hIconSm = LoadIcon(NULL, IDI_APPLICATION);

	if (!RegisterClassEx(&wc)){
		return;
	}
		
	test = CreateMDIWindow("FOO",
		"WindowName",
		MDIS_ALLCHILDSTYLES | WS_OVERLAPPEDWINDOW,
		CW_USEDEFAULT,
		CW_USEDEFAULT,
		CW_USEDEFAULT,
		CW_USEDEFAULT,
		clientArea,
		inst,
		NULL);
	ErrorExit("foo");
	ShowWindow(test, SW_SHOW);
	UpdateWindow(test);
Now my problem is the MDI window is no where to be seen, test seems to come back NULL but the MSDN ErrorExit function for grabbing the error is just throwing up 0 successful which is of no use to me.

if anyone has any idea why this is happening i would be very much appreciative, if you need more code, gladly will put more in

Kind Regards
Rob