Thread: Add a caption button to all windows

  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,829
    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-05-2010, 11:42 PM
  2. add button to listview
    By Thoth in forum Windows Programming
    Replies: 4
    Last Post: 06-12-2007, 10: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, 07:05 AM
  5. Add ON_COMMAND menu button handler
    By kybert in forum Windows Programming
    Replies: 6
    Last Post: 09-15-2002, 07:33 PM