home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / os / mswindo / programm / misc / 3343 < prev    next >
Encoding:
Text File  |  1992-11-10  |  1.5 KB  |  44 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. Path: sparky!uunet!psgrain!ee.und.ac.za!ucthpx!casper.cs.uct.ac.za!sun-3!sean
  3. From: sean@sun-3.cs.uct.ac.za (Sean McLeod)
  4. Subject: Dialog Box Background Colour
  5. Message-ID: <sean.721387129@sun-3>
  6. Sender: news@casper.cs.uct.ac.za (news)
  7. Organization: Computer Science Department, University of Cape Town
  8. Date: Tue, 10 Nov 1992 09:18:49 GMT
  9. Lines: 33
  10.  
  11. Hi
  12.  
  13. I'm having trouble trying to change the background colour of my 
  14. dialog boxes. I'm using Borland's Object Windows. The following
  15. fragment of code is what I'm using at the moment, but it has NO
  16. effect!! However if I use the exact same code fragment for a class
  17. derived from TWindow it works fine! I've designed my dialog boxes 
  18. in the Resource Workshop if that makes any difference.
  19.  
  20. Has anybody else done this??
  21.  
  22. void TBook1::GetWindowClass(WNDCLASS &AWndClass)
  23.       TDialog::GetWindowClass(AWndClass);
  24.     AWndClass.hbrBackground = CreateSolidBrush(RGB(128,150,65));
  25.     //AWndClass.hbrBackground = (HBRUSH)COLOR_ACTIVECAPTION+1;
  26.     AWndClass.hbrBackground = COLOR_ACTIVECAPTION+1;
  27. }
  28.  
  29. LPSTR TBook1::GetClassName()
  30. {
  31.     //return "BORDLG";
  32.     return "Howdy";
  33. }
  34.  
  35. Second question: Is there an easy way to change the background colour
  36. of Borland's dialog class, "BorDlg" which gives that nice cross hatched
  37. brush colour (from the resource workshop if possible)?? I've looked for the
  38. source code for bwcc.cpp, but it doesn't exist, I only have the header
  39. file, the dll file, and the lib file. 
  40.  
  41. Thanks 
  42. Sean@sun-3.cs.uct.ac.za
  43.