home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.misc
- Path: sparky!uunet!psgrain!ee.und.ac.za!ucthpx!casper.cs.uct.ac.za!sun-3!sean
- From: sean@sun-3.cs.uct.ac.za (Sean McLeod)
- Subject: Dialog Box Background Colour
- Message-ID: <sean.721387129@sun-3>
- Sender: news@casper.cs.uct.ac.za (news)
- Organization: Computer Science Department, University of Cape Town
- Date: Tue, 10 Nov 1992 09:18:49 GMT
- Lines: 33
-
- Hi
-
- I'm having trouble trying to change the background colour of my
- dialog boxes. I'm using Borland's Object Windows. The following
- fragment of code is what I'm using at the moment, but it has NO
- effect!! However if I use the exact same code fragment for a class
- derived from TWindow it works fine! I've designed my dialog boxes
- in the Resource Workshop if that makes any difference.
-
- Has anybody else done this??
-
- void TBook1::GetWindowClass(WNDCLASS &AWndClass)
- {
- TDialog::GetWindowClass(AWndClass);
- AWndClass.hbrBackground = CreateSolidBrush(RGB(128,150,65));
- //AWndClass.hbrBackground = (HBRUSH)COLOR_ACTIVECAPTION+1;
- AWndClass.hbrBackground = COLOR_ACTIVECAPTION+1;
- }
-
- LPSTR TBook1::GetClassName()
- {
- //return "BORDLG";
- return "Howdy";
- }
-
- Second question: Is there an easy way to change the background colour
- of Borland's dialog class, "BorDlg" which gives that nice cross hatched
- brush colour (from the resource workshop if possible)?? I've looked for the
- source code for bwcc.cpp, but it doesn't exist, I only have the header
- file, the dll file, and the lib file.
-
- Thanks
- Sean@sun-3.cs.uct.ac.za
-