How to add Buttons on the Caption Bar ?
never tried that one - lol
but - the caption bar is a window like any other
if you can get a handle to it, you can probably put buttons there
the problem i see is that getting the handle under 2K, XP or vista may be one thing
but it will probably require special code under windows 7
all in all, it may be simpler to create a window without a caption bar and make your own
Hi,
that not easy: you need to response to WM_NCPAINT and some other WM_NC*-messages to implement the behavior and appearance of button in the title bar. Also I think that it becomes more complicated for Aero-Windwos (DWM) - I would stay away from such idea...
One option is a topmost little window that hovers above the caption. Difficult but works on Win7, too.
thnx for all i found this Article :
http://www.codeproject.com/Articles/11699/CCaptionButton-Add-Buttons-on-the-Caption-Bar (http://www.codeproject.com/Articles/11699/CCaptionButton-Add-Buttons-on-the-Caption-Bar)
but a want to know if it is possible to do it with MASM32
please help me, i know that is very complicated to do it but no impossible
Quote from: spSofiane on August 22, 2012, 06:03:42 AM
but a want to know if it is possible to do it with MASM32
Sure it is possible in Masm32. But guess why the first comment is titled "Doesn't work in Windows 7". The technique used for the RichMasm (http://masmforum.com/~masm32/board/index.php?topic=94) menus does work with Aero and Win7, but it is definitely not simple. Here are the few lines that create the auxiliary window that overlays the caption. Once you have that, it gets difficult ;)
invoke CreateWindowEx, WS_EX_TRANSPARENT or WS_EX_TOPMOST or WS_EX_LAYERED or WS_EX_TOOLWINDOW,
offset szClassMenuWin, Null,
WS_VISIBLE or WS_POPUP, ; no caption!
Null, Null, MenuTextWidth, eax,
0, 0, hInstance, Null
Alternatively, you can try another method described here (http://delphihaven.wordpress.com/2010/04/19/setting-up-a-custom-titlebar).
Quote from: spSofiane on August 22, 2012, 06:03:42 AM
thnx for all i found this Article :
http://www.codeproject.com/Articles/11699/CCaptionButton-Add-Buttons-on-the-Caption-Bar (http://www.codeproject.com/Articles/11699/CCaptionButton-Add-Buttons-on-the-Caption-Bar)
That thing rearranged all my icons :(
Also Every body else is right .... Draw your own is better ... if you want a custom Title Bar than it does not matter if you redraw it your self any ways