win32 dialogs...
-
I create Dialog Box with case WM_CTLCOLORSTATIC: { HDC hdcStatic = (HDC)wParam; SetTextColor(hdcStatic, RGB(255, 255, 255)); SetBkMode(hdcStatic, TRANSPARENT); return (long)(g_hbrBackground); } but after chusing another program and return to dialog activation - it don't show dialog box at all!!! (when I do UpdateWindow in case ON_PAINT, it show dialog, but without color!!)
-
I create Dialog Box with case WM_CTLCOLORSTATIC: { HDC hdcStatic = (HDC)wParam; SetTextColor(hdcStatic, RGB(255, 255, 255)); SetBkMode(hdcStatic, TRANSPARENT); return (long)(g_hbrBackground); } but after chusing another program and return to dialog activation - it don't show dialog box at all!!! (when I do UpdateWindow in case ON_PAINT, it show dialog, but without color!!)
The code you posted wouldn't have anything to do with that problem (I'm assuming that code is in the dialog proc). Using UpdateWindow in response to WM_PAINT is BAD. It's redundant, and also probably won't do anything. UpdateWindow causes a WM_PAINT message to be sent by the system if any area of the window being updated is marked invalid. You're doing something wrong somewhere in your dialog proc if the window is not redrawing properly. Mark
Mark Salsbery Microsoft MVP - Visual C++ :java: