Thread: Adding a button to a title bar???

  1. #1
    Registered User
    Join Date
    May 2003
    Posts
    44

    Adding a button to a title bar???

    As the subject suggests,

    How can I go about adding my own button next to the minimize, resize buttons at the top of a window. This is in an application that I do not own.

    Anybody for a try?
    Thanks,
    Uni

  2. #2
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    Never tried it with someone else's application but this page here has a discussion and source code on how to do it with one you do own that you may be able to adapt to your needs.
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  3. #3
    Registered User
    Join Date
    May 2003
    Posts
    44
    Thanks for that Ken!....

    Although I'm struggling with just finding where to actually paint the button? I don't want to draw over the 3 buttons that are already on the screen, so is there some way to get the position of the left most button and get its size and just draw next to it using the same size?

  4. #4
    It's full of stars adrianxw's Avatar
    Join Date
    Aug 2001
    Posts
    4,829
    I'd never done this with someone else's app. I was thinking along the lines of having an invisible app displying a largely transpearent bitmap, (transparent apart from the button), and intercepting windows move and size command aimed at the other apps window to control position, and a hot spot to detect clicks.

    I figured that would be problematic but solvable, but then, what do you do with the click? If the original app does not have an existing way of doing what you want to do, then, well...

    I stopped thinking about it.
    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. beach bar (sims type game)
    By DrKillPatient in forum Game Programming
    Replies: 1
    Last Post: 03-06-2006, 01:32 PM
  3. Window without title bar
    By maxorator in forum Windows Programming
    Replies: 1
    Last Post: 10-16-2005, 12:26 AM
  4. Child window with active (highlighted) title bar: Possible?
    By JasonD in forum Windows Programming
    Replies: 7
    Last Post: 10-16-2003, 06:43 AM
  5. Adding progress bar to a dialog box.
    By Brian in forum Windows Programming
    Replies: 1
    Last Post: 11-15-2002, 06:27 PM