changing the color of the title bar :: MFC

This is a discussion on changing the color of the title bar :: MFC within the Windows Programming forums, part of the Platform Specific Boards category; what do I have to call to gain access to the title bar? can someone post a sample code? thanks....

  1. #1
    Unregistered
    Guest

    changing the color of the title bar :: MFC

    what do I have to call to gain access to the title bar?

    can someone post a sample code?
    thanks.

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,786
    SetWindowText( "my prog" );


    Its a member of CWnd......

  3. #3
    Registered User
    Join Date
    Jan 2002
    Posts
    387
    Thats to change the text of it, not the color
    you would have to handle the message: WM_NCPAINT

    An application sends the WM_NCPAINT message to a window when its frame must be painted.

    WM_NCPAINT
    hrgn = (HRGN) wParam; // handle of update region


    Parameters

    hrgn

    Value of wParam. Identifies the update region of the window. The update region is clipped to the window frame.

    Return Values

    An application should return zero if it processes this message.

    Remarks

    The DefWindowProc function paints the window frame.
    An application can intercept this message and paint its own custom window frame. The clipping region for a window is always rectangular, even if the shape of the frame is altered.
    "There are three kinds of people in the world...
    Those that can count and those that can't."

  4. #4
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,786
    Originally posted by Okiesmokie
    Thats to change the text of it, not the color
    you would have to handle the message: WM_NCPAINT

    True....my mistake at not reading the question properly

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. beach bar (sims type game)
    By DrKillPatient in forum Game Programming
    Replies: 1
    Last Post: 03-06-2006, 12:32 PM
  2. Change Title in a MFC SDI
    By hick.hack in forum Windows Programming
    Replies: 1
    Last Post: 12-15-2003, 03:15 PM
  3. Child window with active (highlighted) title bar: Possible?
    By JasonD in forum Windows Programming
    Replies: 7
    Last Post: 10-16-2003, 06:43 AM
  4. Changing a single Window's Title Bar Color
    By Jattie in forum Windows Programming
    Replies: 2
    Last Post: 11-05-2002, 11:40 AM
  5. WIndows programming?
    By hostensteffa in forum Windows Programming
    Replies: 7
    Last Post: 06-07-2002, 08:52 PM

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