home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.misc
- Path: sparky!uunet!wupost!csus.edu!netcom.com!mjb
- From: mjb@netcom.com (Martin Brown)
- Subject: painting a dialog control?
- Message-ID: <1993Jan6.214200.22466@netcom.com>
- Organization: Netcom - Online Communication Services (408 241-9760 guest)
- Date: Wed, 6 Jan 1993 21:42:00 GMT
- Lines: 51
-
- Currently, I'm trying to paint a bitmap into a dialog control
- (a group pane with no text? Neither the dialog editor or the
- .dlg file tell me what type of pane a control is... damn it).
-
- The dialog is contained in, and called up from a dll.
-
- For initial testing, I'm trying to do a flood fill to the
- control to avoid the seemingly more complicated task of
- painting in a bitmap.
-
- Currently, the dialog is opened and all the controls are drawn,
- but the FloodFill is not occuring.
-
- This is the code that I'm using to do the FloodFill:
-
- bmapnhWnd = GetDlgItem(hDlg, BMapPane);
- bmapnhDC = GetDC(bmapnhWnd);
- hBrush = CreateSolidBrush(RGB(0, 0, 255));
- SelectObject(bmapnhDC, hBrush);
- FloodFill(bmapnhDC, 3, 3, RGB(0, 0, 0));
- ReleaseDC(hDlg, bmapnhDC);
- DeleteObject(hBrush);
-
- I have inserted this code into the switch/case WM_INITDIALOG: ,
- the only message that is responded to. Since this seems to be
- responsible for getting the dialog correctly drawn, now, I put my
- code here.
-
- Is my code wrong?
- Have I put it in the wrong place?
-
- This dll has the following functions EXPORTed:
-
- WEP
- OpenSignOn
- CloseSignOn
- StartupDlgProc << holds the WM_INITDIALOG and my code
-
- Any ideas would be appreciated?
- Any tips for when I finally try to paint a bitmap into the control?
-
- Thanx for your help!
-
-
-
- --
-
- - mjb -
-
- mjb@netcom.com
-
-