Tab Control - Setting The Background colour

This is a discussion on Tab Control - Setting The Background colour within the Windows Programming forums, part of the Platform Specific Boards category; Hi, Ive been looking on google and MSDN for a way to colour the background to a tab to a ...

  1. #1
    Registered User ventolin's Avatar
    Join Date
    Jan 2004
    Posts
    92

    Question Tab Control - Setting The Background colour

    Hi,

    Ive been looking on google and MSDN for a way to colour the background to a tab to a colour other than the system default.

    I was just wondering has anyone found an easy way of doing this?

    Do i need to call the WM_DRAWITEM notification message? On MSDN it says this notification is only called on owner drawn controls like buttons, but not tabs. Is this the case? Or do i need to actually draw a coloured rectangle over the tab?

    Or do i need to try another notification message? Or am i barking up the wrong tree?

    Thanks

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    It should be possible to subclass the tab control and then handle its WM_ERASEBKGND message as described in this thread.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Adding to a tab window
    By scwizzo in forum Windows Programming
    Replies: 4
    Last Post: 07-17-2008, 11:25 PM
  2. Tab order in Tab Control
    By Halloko in forum Windows Programming
    Replies: 2
    Last Post: 05-08-2005, 11:08 PM
  3. Setting the background color of my main window
    By Garfield in forum Windows Programming
    Replies: 5
    Last Post: 07-06-2002, 11:25 PM
  4. Tab Controls - API
    By -KEN- in forum Windows Programming
    Replies: 7
    Last Post: 06-02-2002, 09:44 AM
  5. Setting text colour
    By JamMan in forum C++ Programming
    Replies: 1
    Last Post: 11-19-2001, 10:43 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21