ShowWindow (...., SW_SHOWMINIMIZED) not working

I have this:

1
2
ShowWindow (hWndC [0], SW_SHOWNORMAL);
ShowWindow (hWndC [1], SW_SHOWMINIMIZED);


The first window is shown good and normal. But the second window is shown at the top left of my window, under my menu. Picture:

http://img413.imageshack.us/img413/1308/pitcure.png

you can see the bottom of it.

In the window procedure for those windows I have it so if I close the window it will minimize it instead using this:

 
case WM_CLOSE: ShowWindow (hWnd, SW_SHOWMINIMIZE); return 0; break;


And that works perfectly, the window gets minimized to the bottom of my parent window.

Does anyone know why the SW_SHOWMINIMIZED isn't working for that one window?
There is a diference between SW_SHOWMINIMIZED and SW_SHOWMINIMIZE
Oh sorry I ment SW_SHOWMINIMIZED, SW_SHOWMINIMIZE doesn't exist. I get an error when I use it :P

edit:

Alright I did this:

1
2
3
4
5
6
7
8
9
10
11
12
case WM_CREATE:
if (!CreateChildWindows (hWnd))
{
	MessageBox (hWnd, "MDI Failed", NULL, NULL);
	DestroyWindow (hWnd);
}
ShowWindow (hWndC [0], SW_SHOWNORMAL);
break;

case WM_PAINT:
ShowWindow (hWndC [1], SW_SHOWMINIMIZED);
break;


And putting it into WM_PAINT made it work, but I want to know why it wasn't working. Any help?
Last edited on
Post the code if you can - I'll see what I can see.
Last edited on
I already got it working the way I wanted, thanks though.
Topic archived. No new replies allowed.