Discussion:
How can I add a new/custom button to the title-bar of all top-level windows?
(too old to reply)
.
2004-07-04 20:25:34 UTC
Permalink
The problem:
Does anyone know of a way to add a new button to the title bar of all
top-level windows next to the Minimize/Restore/Close buttons?

I suspect this is possible, but I'm not sure how to proceed. I've done
some win32 C programming and playing with the API.


Background:
I do a lot of drag-and-drop between windows, but its a pain to have to
resize and move them around.
I know I can click the toolbar and select "Tile window Vertically" etc,
but I want something faster/easier to use.
Having a small button which would immediately arrange the window for me
would be ideal.

For example: when clicked, alter the window to be, say, half it's full-
screen height and occupying the bottom half of the screen.


Anyone have any ideas?

blakdog
James Brown
2004-07-06 19:42:31 UTC
Permalink
Check out:

www.catch22.org.uk/tuts

James
Post by .
Does anyone know of a way to add a new button to the title bar of all
top-level windows next to the Minimize/Restore/Close buttons?
I suspect this is possible, but I'm not sure how to proceed. I've done
some win32 C programming and playing with the API.
I do a lot of drag-and-drop between windows, but its a pain to have to
resize and move them around.
I know I can click the toolbar and select "Tile window Vertically" etc,
but I want something faster/easier to use.
Having a small button which would immediately arrange the window for me
would be ideal.
For example: when clicked, alter the window to be, say, half it's full-
screen height and occupying the bottom half of the screen.
Anyone have any ideas?
blakdog
blakdog
2004-07-08 01:49:23 UTC
Permalink
Thanks James,

The article at http://www.catch22.org.uk/tuts/titlebar.asp is really
really close to what I'm looking for.

Unfortunately, it only provides title bar buttons for one specific
program. Actually, I would like to apply these buttons to all currently
existing windows. For example, Internet Explorer and Windows Explorer.

I suspect that when it comes time to write the code, it'll probably use
some of the elements mentioned in this tutorial, so my job is 1/2 done
:P


Does anyone know of a way though whereby I can add title bar buttons to
all existing top-level windows?

blakdog



In article <40eb00cf$0$26989$***@news.dial.pipex.com>, "James
Brown" <remove_james_dot_brown7_at_virgin_dot_net> says...
Post by James Brown
www.catch22.org.uk/tuts
James
Post by .
Does anyone know of a way to add a new button to the title bar of all
top-level windows next to the Minimize/Restore/Close buttons?
I suspect this is possible, but I'm not sure how to proceed. I've done
some win32 C programming and playing with the API.
I do a lot of drag-and-drop between windows, but its a pain to have to
resize and move them around.
I know I can click the toolbar and select "Tile window Vertically" etc,
but I want something faster/easier to use.
Having a small button which would immediately arrange the window for me
would be ideal.
For example: when clicked, alter the window to be, say, half it's full-
screen height and occupying the bottom half of the screen.
Anyone have any ideas?
blakdog
Allan Bruce
2004-07-08 10:39:26 UTC
Permalink
Post by blakdog
Thanks James,
The article at http://www.catch22.org.uk/tuts/titlebar.asp is really
really close to what I'm looking for.
Unfortunately, it only provides title bar buttons for one specific
program. Actually, I would like to apply these buttons to all currently
existing windows. For example, Internet Explorer and Windows Explorer.
I suspect that when it comes time to write the code, it'll probably use
some of the elements mentioned in this tutorial, so my job is 1/2 done
:P
Does anyone know of a way though whereby I can add title bar buttons to
all existing top-level windows?
blakdog
I dont know exactly, but I would imagine you need to setup a hook for all
windows WM_NCPAINT messages. Perhaps someone might be able to explain a bit
more...
Allan
blakdog
2004-07-10 05:42:13 UTC
Permalink
Thanks Allen,
I've been doing some reading about hooks in past few days. Think I'm
beginning to see a solution.... incorporating the code from tutorial
from James into a GlobalSystemHook and I might just pull this off.

thanks again.

blakdog



In article <ccj88r$6rl$***@news.freedom2surf.net>, ***@TAKEAWAYf2s.com
says...
Post by Allan Bruce
Post by blakdog
Thanks James,
The article at http://www.catch22.org.uk/tuts/titlebar.asp is really
really close to what I'm looking for.
Unfortunately, it only provides title bar buttons for one specific
program. Actually, I would like to apply these buttons to all currently
existing windows. For example, Internet Explorer and Windows Explorer.
I suspect that when it comes time to write the code, it'll probably use
some of the elements mentioned in this tutorial, so my job is 1/2 done
:P
Does anyone know of a way though whereby I can add title bar buttons to
all existing top-level windows?
blakdog
I dont know exactly, but I would imagine you need to setup a hook for all
windows WM_NCPAINT messages. Perhaps someone might be able to explain a bit
more...
Allan
Continue reading on narkive:
Loading...