|
| Adding extra title bar button |
|
|
|
|
| Messages |
|
Related Types |
This message was discovered on microsoft.public.dotnet.framework.windowsforms.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
| Keith Patrick |
I have an extension to the Windows shell I want to write where I need an extra button by the max/min/close buttons. Does anyone have an idea where I would start looking to find out how to do this?
|
|
|
| |
|
| |
| |
| Saurabh |
I achieved this by over-riding the WndProc and handling the WM_NCPAINT. I draw the button using the ControlPaint class which has DrawButton, DrawCheckBox and other methods.... though I am unable to trap the mouse clicks in the area of title bar where i painted the button. I have posted a fresh post asking whether its a bug in Type.GetType() probably that will be your second step....
BTW, I could not find any way of painting a button in title bar through ..NET, This was done by getting the DC of window and painting on it.
--Saurabh
"Keith Patrick" <Click here to reveal e-mail address> wrote in message news:u$Click here to reveal e-mail address... [Original message clipped]
|
|
|
| |
|
| |
|
| |
| Dmitriy Lapshin [C# / .NET MVP] (VIP) |
Keith,
I think you should start looking at the non-client events such as WM_NCPAINT, WM_NCLDBLCLICK and their managed counterparts if they exists. In the worst case, you can always override the WndProc method and handle these events in the old-fashioned way (I mean a switch statement analyzing the type of the event and calling the appropriate handler routine).
-- Dmitriy Lapshin [C# / .NET MVP] X-Unity Test Studio http://x-unity.miik.com.ua/teststudio.aspx Bring the power of unit testing to VS .NET IDE
"Keith Patrick" <Click here to reveal e-mail address> wrote in message news:u$Click here to reveal e-mail address... [Original message clipped]
|
|
|
| |
|
|
| |
|
|
|
|
|
|
|
|
BootFX
Reliable and powerful .NET application framework. |
|
|
|
|
|
|