home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / os / mswindo / programm / misc / 4656 < prev    next >
Encoding:
Text File  |  1993-01-06  |  1.7 KB  |  61 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. Path: sparky!uunet!wupost!csus.edu!netcom.com!mjb
  3. From: mjb@netcom.com (Martin Brown)
  4. Subject: painting a dialog control?
  5. Message-ID: <1993Jan6.214200.22466@netcom.com>
  6. Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
  7. Date: Wed, 6 Jan 1993 21:42:00 GMT
  8. Lines: 51
  9.  
  10. Currently, I'm trying to paint a bitmap into a dialog control 
  11. (a group pane with no text? Neither the dialog editor or the 
  12. .dlg file tell me what type of pane a control is... damn it).
  13.  
  14. The dialog is contained in, and called up from a dll.
  15.  
  16. For initial testing, I'm trying to do a flood fill to the 
  17. control to avoid the seemingly more complicated task of 
  18. painting in a bitmap.
  19.  
  20. Currently, the dialog is opened and all the controls are drawn,
  21. but the FloodFill is not occuring.
  22.  
  23. This is the code that I'm using to do the FloodFill:
  24.  
  25.      bmapnhWnd = GetDlgItem(hDlg, BMapPane);
  26.      bmapnhDC = GetDC(bmapnhWnd);
  27.      hBrush = CreateSolidBrush(RGB(0, 0, 255));
  28.      SelectObject(bmapnhDC, hBrush);
  29.      FloodFill(bmapnhDC, 3, 3, RGB(0, 0, 0));
  30.      ReleaseDC(hDlg, bmapnhDC);
  31.      DeleteObject(hBrush);
  32.  
  33. I have inserted this code into the switch/case WM_INITDIALOG:  ,
  34. the only message that is responded to.  Since this seems to be
  35. responsible for getting the dialog correctly drawn, now, I put my 
  36. code here.
  37.  
  38. Is my code wrong?
  39. Have I put it in the wrong place?
  40.  
  41. This dll has the following functions EXPORTed:
  42.  
  43.      WEP
  44.      OpenSignOn
  45.      CloseSignOn
  46.      StartupDlgProc    <<  holds the WM_INITDIALOG and my code
  47.  
  48. Any ideas would be appreciated?
  49. Any tips for when I finally try to paint a bitmap into the control?
  50.  
  51. Thanx for your help!
  52.  
  53.  
  54.  
  55. -- 
  56.  
  57.                                    - mjb -
  58.  
  59.                                 mjb@netcom.com
  60.  
  61.