Title Bar Buttons 
Author Message
 Title Bar Buttons

Hi All,

Since it's possible to remove buttons from the Title bar (app's system menu)
using RemoveMenu API call.

Is it also possible to add buttons to the title bar, the button I require is
the pin icon used so the user can set a form always on top.

If anyone has an idea of how to accomplish this I will be happy to hear from
them.

Steve



Mon, 21 Jan 2002 03:00:00 GMT  
 Title Bar Buttons
On Thu, 5 Aug 1999 12:34:44 +0100, "Steve Wentworth"

Quote:

>Hi All,

>Since it's possible to remove buttons from the Title bar (app's system menu)
>using RemoveMenu API call.

>Is it also possible to add buttons to the title bar, the button I require is
>the pin icon used so the user can set a form always on top.

>If anyone has an idea of how to accomplish this I will be happy to hear from
>them.

>Steve

Steve,

I just answered this in the thread "Appending control box". Here's

It's possible, but far from easy. You have to catch many of the
WM_NCxxx messages sent to your Form and handle the drawing of the
button yourself. It's nothing I recommend unless you absolutely need
an extra button there.

Mattias

________________________________________________
Mattias "BeeZo" Sj?gren

http://home1.2.sbbs.se/mattias.sjogren/sw/



Mon, 21 Jan 2002 03:00:00 GMT  
 Title Bar Buttons
Mattias

Do you have any examples of what WM_NCxxx messages to capture, the project
this is for allready contains a subclass procedure for the form so all i
need to do is drop in the capture messages.

Thanks

Steve



Mon, 21 Jan 2002 03:00:00 GMT  
 Title Bar Buttons

Quote:
> Mattias

> Do you have any examples of what WM_NCxxx messages to capture, the project
> this is for allready contains a subclass procedure for the form so all i
> need to do is drop in the capture messages.

> Thanks

> Steve

Just use a program like VS Spy ++ or Desaware's SpyWorks to watch the window
messages when you cause a redraw of the titlebar (drag another window over
then off it). FWIW, I think Videosoft (http://www.videosoft.com) has a
control that can draw buttons on a titlebar too.


Mon, 21 Jan 2002 03:00:00 GMT  
 Title Bar Buttons
On Thu, 5 Aug 1999 13:26:29 +0100, "Steve Wentworth"

Quote:

>Mattias

>Do you have any examples of what WM_NCxxx messages to capture, the project
>this is for allready contains a subclass procedure for the form so all i
>need to do is drop in the capture messages.

>Thanks

>Steve

Steve,

Well, the most important one is definitely WM_NCPAINT, which indicates
it's time for you to (re)draw your button. But since you want it to
act like a button, you'd also probably want to catch the various mouse
messages, like WM_NCLBUTTONDOWN / ...UP.

BTW, if you haven't figured out how to draw your button yet, I suggest
that you take a look at the DrawFrameControl function. It makes it
really easy to draw all kinds of buttons.

Mattias

________________________________________________
Mattias "BeeZo" Sj?gren

http://home1.2.sbbs.se/mattias.sjogren/sw/



Mon, 21 Jan 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Title Bar Button?

2. Title bar button

3. Title bar buttons in a dialog box

4. Trouble with MDI Child Title bar buttons -- MDI Expert help needed.

5. Beginner needs help....sub:title bar buttons.../creation of...

6. Change Font in title bar of mdi child/Hide title bar

7. Change Font in title bar of mdi child/Hide title bar

8. Add button in title bar

9. Custom buttons in title bar

10. Title Bar without buttons

11. Button in Title Bar???

12. Putting a button on the title bar of my form

 

 
Powered by phpBB® Forum Software