home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / os / mswindo / programm / tools / 775 < prev    next >
Encoding:
Text File  |  1992-08-25  |  1.1 KB  |  37 lines

  1. Newsgroups: comp.os.ms-windows.programmer.tools
  2. Path: sparky!uunet!psgrain!hippo!ford.ee.up.ac.za!carr.up.ac.za!carr
  3. From: carr@scinet.up.ac.za ( Allen Carr (NW1:2-1):-2838)
  4. Subject: BWCCGetPattern()
  5. Sender: news@ford.ee.up.ac.za (NetNews Daemon)
  6. Message-ID: <carr.7@scinet.up.ac.za>
  7. Date: Wed, 26 Aug 1992 14:32:59 GMT
  8. Organization: Gold Fields Computer Centre for Education
  9. Keywords: BC++ 3.1
  10. Lines: 25
  11.  
  12. I wanted to create a window which used BCW's custom controls, with the 
  13. pretty background. I created a class THWindow which defined the following 
  14. virtual method:
  15.     void THWindow::GetWindowClass(WNDCLASS& AClass) {
  16.         TWindow::GetWindowClass(AClass);
  17.         AClass.hbrBackground = BWCCGetPattern();
  18.     }
  19.  
  20. The first time this program was run, everything was OK. On exiting any other 
  21. Borland product which used BWCC lost their background. 
  22.  
  23. My reasoning for using BWCCGetPattern() was that it returned an HBRUSH so it 
  24. should have worked with WNDCLASS.hbrBackground.
  25.  
  26. Any offers ??
  27.  
  28. I have found that using
  29.     AClass.lpfnWndProc = BWCCDefWindowProc;
  30. instead of
  31.     AClass.hbrBackground = BWCCGetPattern();
  32. seems to overcome the problem.
  33.  
  34. alan carr
  35.  
  36. email: carr@scinet.up.ac.za
  37.