Problem In WM_CTLCOLORDLG For Dialogs (SAME As WM_PAINT For Windows)
Posted on 2002-06-30
I need to paint the Dialog Box just as we paint the Client Area of Windows in the WM_PAINT Messages. For this from MSDN I came to know that equivalent to WM_PAINT, WM_CTLCOLORDLG HANDLES these message for dialog-boxes. So I did the entire painting and all in this for dialog-box.
Here is a BIT CODE :: (Everywhere I have used Off-Screen DC'S For Flicker Free, Since this a High-Image Appl.)
case WM_CTLCOLORDLG: //wparam is the DC of the dialog-box
BitBlt(hdc,RECT.left, RECT.top,RECT.right-RECT.left, RECT.bottom-RECT.top,hdcmem,0,0,SRCCOPY);
This is working very fine as expected on all OS'S 2000/NT/ME/XP except '98, though I haven't used anything which is not there for '98.
In '98 A Blank dialog-box comes with no paiting and all, which I have done in WM_CTLCOLORDLG. Though, debugging shows, that it is going into this Message whenever dialog-box needs to be re-painted, But NOTHING is being done which I have coded in WM_CTLCOLORDLG, UNLIKE ALL OTHER OS'S.
Why only '98, Any comments/suggestions are welcome.