home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.tools
- Path: sparky!uunet!psgrain!hippo!ford.ee.up.ac.za!carr.up.ac.za!carr
- From: carr@scinet.up.ac.za ( Allen Carr (NW1:2-1):-2838)
- Subject: BWCCGetPattern()
- Sender: news@ford.ee.up.ac.za (NetNews Daemon)
- Message-ID: <carr.7@scinet.up.ac.za>
- Date: Wed, 26 Aug 1992 14:32:59 GMT
- Organization: Gold Fields Computer Centre for Education
- Keywords: BC++ 3.1
- Lines: 25
-
- I wanted to create a window which used BCW's custom controls, with the
- pretty background. I created a class THWindow which defined the following
- virtual method:
- void THWindow::GetWindowClass(WNDCLASS& AClass) {
- TWindow::GetWindowClass(AClass);
- AClass.hbrBackground = BWCCGetPattern();
- }
-
- The first time this program was run, everything was OK. On exiting any other
- Borland product which used BWCC lost their background.
-
- My reasoning for using BWCCGetPattern() was that it returned an HBRUSH so it
- should have worked with WNDCLASS.hbrBackground.
-
- Any offers ??
-
- I have found that using
- AClass.lpfnWndProc = BWCCDefWindowProc;
- instead of
- AClass.hbrBackground = BWCCGetPattern();
- seems to overcome the problem.
-
- alan carr
-
- email: carr@scinet.up.ac.za
-