Buttons disappearing on Dialog Box
Posted on 2003-11-18
This is probably really simple and I'm just being totally stupid, but I have a Dialog Box created using no MFC. There's 2 buttons on the form which are hidden when the application begins.
At the end of the process the buttons need to be shown which i am doing using ShowWindow(hwndBtn, SW_SHOW). Then I call RedrawWindow(hwndBtn, NULL, NULL, RDW_INVALIDATE | RDW_UPDATENOW) to redraw it. The only problem is every time the window is obscured the buttons don't get redrawn.
I thought that when a window is obscured the system automatically sends a WM_PAINT message to the window to redraw itself and it's child windows, but it doesn't appear to be doing this.
Any help would be much appreciated.