AutoHotkey Community

It is currently May 25th, 2012, 3:50 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 8 posts ] 
Author Message
PostPosted: February 16th, 2005, 11:43 pm 
Offline

Joined: February 4th, 2005, 7:24 pm
Posts: 24
Hi,

Every regular window owns a minimize, restore and a maximize button.
I would like to add 3 small buttons close to those 3 buttons.
Is there a way to do this ?

In my case, I would like to put a check box but a button would be already fine.

e.g. : Some applications are doing this to 'pin' a windows always on top.

Thanks a lot,

Pierre.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 17th, 2005, 12:05 am 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
There is no standard way to do this in Windows, and applications that do this, like mmext and WindowBlinds, use methods of their own to do it, such as drawing the buttons themselves (usually using extra system resources in the process). I hope you haven't been fooled into thinking the titlebar is "customizable" and that real buttons can be added to it. That said, though, perhaps you could use a transparent GUI with small buttons and use a SetTimer to have it follow the active window. It wouldn't be pretty, though.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 17th, 2005, 1:01 am 
Offline

Joined: December 28th, 2004, 12:33 am
Posts: 60
I know TheBat does this (optionaly) and it not only doesn't look so good it causes issues. The problem is the functionality of the button they put up there is just great! Wish they had an alternate way to have the button.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 17th, 2005, 1:06 am 
Offline

Joined: November 13th, 2004, 4:08 am
Posts: 2951
Location: Minnesota
What does the button do? Chances are it could be replicated in AHK, and I think a button in the system tray would be more sensible than one on the titlebar. (You can do this by making the tray button single-click and assigning a custom menu item to it; I'll demonstrate if you're interested)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: February 17th, 2005, 1:41 am 
Offline

Joined: December 28th, 2004, 12:33 am
Posts: 60
jonny wrote:
What does the button do? Chances are it could be replicated in AHK, and I think a button in the system tray would be more sensible than one on the titlebar. (You can do this by making the tray button single-click and assigning a custom menu item to it; I'll demonstrate if you're interested)


Well, it probably can't be replicated, it does a search of all menu items as you type for the string you enter. eg. You type S and all menu items in the program that start with s appear, you type (Sa) and .... etc.... so if you typed Save it would give you a clickable Save to do your save without having to navigate the menus.

The code you mention sounds very cool, please do post it.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 4th, 2006, 11:33 am 
hello,

because this topic is a almost one year old, I want to ask if is possible in current version of AHK to add custom buttons to titlebar?


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 4th, 2006, 12:59 pm 
Offline

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
Only the same old way of using SetTimer to watch the co-ordinates of the active window and move a gui so that appears to stay in the titlebar (the faster the SetTimer check the better it would "stick" to the titlebar during/after moving, but the more system resource it would use).

I'm pretty sure someone posted a script a long time back to add some buttons to the titlebar in this fashion.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 4th, 2006, 1:19 pm 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
Inside an application, if I recall correctly, the way to do this is to manage the WM_NCPAINT message, sent when Windows paints the title bar.
Then you draw buttons (in the old Windows versions, some people also used it to paint gradients in the title bar).
Of course, you have to handle also the WM_NCMOUSExxx messages to detect a click on the button.
To handle foreign windows (any application) is much harder (message hook?) and probably out of reach of AutoHotkey.

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 8 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: BrandonHotkey, engunneer, Pulover, rbrtryn, sarevok9, Wicked, Yahoo [Bot], Zaelia and 20 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group