You are here

Trying out some C++

6 posts / 0 new
Last post
ZachHudock
ZachHudock's picture
Offline
Last seen: 1 year 3 months ago
Developer
Joined: 2006-12-06 18:07
Trying out some C++

Is anybody familiar enough with C++ to tell me how to add a button to the title bar of a window (next to the Minimize button)? I have an idea for an app.

Adding buttons to the title bar of a window to:

Roll the window up to it's title bar
Adjust position of the window to any of the 4 corners, top-center, bottom-center or centered on the screen
Minimize the window to the system tray.

There's an app out there that does this, plus more already, but it costs $$ and I wanted to make mine open-source and free.

Ryan McCue
Ryan McCue's picture
Offline
Last seen: 14 years 6 months ago
Joined: 2006-01-06 21:27
Nope

I think you have to hack it in yourself using a library of some sort. AFAIK there's no native Win32 API call for it.
----
Ryan McCue.
Blog.
So all that Airbus-delay trouble over here in Europe is because of YOU!
Simeon.

"If you're not part of the solution, you're part of the precipitate."

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 10 years 7 months ago
Developer
Joined: 2005-12-10 15:22
As

Ryan said I don't think that there is a Win32 call for this, I would have thought that the easiest way to do it would be to custom draw a button up there and then check to see where the mouse is on click and if its over the button then handle it specifically.

___

Author of Toucan

'...and do the other things, not because they are easy, but because they are hard...' JFK

ZachHudock
ZachHudock's picture
Offline
Last seen: 1 year 3 months ago
Developer
Joined: 2006-12-06 18:07
I found a resource on how to

I found a resource on how to do this, unfortunately when the button is clicked the entire window gets redrawn in Win2k style, no matter which XP theme is applied. I'll have to look at the code more carefully to see if that's how it's coded, or if there is an error somewhere.
_________________________
I don't believe in signatures

The developer formerly known as ZGitRDun8705

Steve Lamerton
Steve Lamerton's picture
Offline
Last seen: 10 years 7 months ago
Developer
Joined: 2005-12-10 15:22
You

could also have a look at this:

http://www.codeproject.com/buttonctrl/CCaptionButton.asp

___

Author of Toucan

'...and do the other things, not because they are easy, but because they are hard...' JFK

ZachHudock
ZachHudock's picture
Offline
Last seen: 1 year 3 months ago
Developer
Joined: 2006-12-06 18:07
Thanks! that looks like it

Thanks! that looks like it could be quite useful

_________________________
I don't believe in signatures

The developer formerly known as ZGitRDun8705

Log in or register to post comments