Add a caption button to all windows

This is a discussion on Add a caption button to all windows within the Windows Programming forums, part of the Platform Specific Boards category; Is there a way to register a new caption button so that it shows up on all windows? I want ...

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    22

    Add a caption button to all windows

    Is there a way to register a new caption button so that it shows up on all windows?

    I want to add a caption button to all windows that will cause the window to "maximize" to either the left or right half of the screen.

    Thanks,
    Chris

  2. #2
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,831
    To do this, I would process the WM_NCPAINT message and draw the buttons when I draw the rest of the frame. Then WM_NCLBUTTONDOWN/WM_NCLBUTTONUP message processors that determine whether or not the "click" was within the area I had allocated to my new button.

    I've never needed to do this, but that is how I would start - I may subclass the window if I found it to be necessary.
    Wave upon wave of demented avengers march cheerfully out of obscurity unto the dream.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. BN_CLICKED, change button style
    By bennyandthejets in forum Windows Programming
    Replies: 13
    Last Post: 07-06-2010, 12:42 AM
  2. add button to listview
    By Thoth in forum Windows Programming
    Replies: 4
    Last Post: 06-12-2007, 11:43 AM
  3. elliptical button
    By geek@02 in forum Windows Programming
    Replies: 0
    Last Post: 11-21-2006, 02:15 AM
  4. how to add icon to button or static window
    By gaurav07 in forum Windows Programming
    Replies: 4
    Last Post: 06-27-2005, 08:05 AM
  5. Add ON_COMMAND menu button handler
    By kybert in forum Windows Programming
    Replies: 6
    Last Post: 09-15-2002, 08:33 PM

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