PC Review


Reply
Thread Tools Rate Thread

Adding extra title bar button

 
 
Keith Patrick
Guest
Posts: n/a
 
      14th Dec 2003
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?


 
Reply With Quote
 
 
 
 
Dmitriy Lapshin [C# / .NET MVP]
Guest
Posts: n/a
 
      15th Dec 2003
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" <(E-Mail Removed)> wrote in message
news:u$(E-Mail Removed)...
> 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?
>
>


 
Reply With Quote
 
Saurabh
Guest
Posts: n/a
 
      16th Dec 2003
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" <(E-Mail Removed)> wrote in message
news:u$(E-Mail Removed)...
> 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?
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding extra ram Lyn Windows Vista Performance 1 21st Jul 2008 01:48 PM
Re: adding extra ram with xp Will Denny Windows XP General 1 13th Apr 2004 07:02 PM
Re: adding extra ram with xp Robert Moir Windows XP General 0 12th Apr 2004 08:51 AM
RE: adding extra ram with xp =?Utf-8?B?Y29taWNmYW4=?= Windows XP General 0 12th Apr 2004 08:31 AM
Adding help button to Title bar in C# Abhi Microsoft C# .NET 3 29th Nov 2003 09:01 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:19 AM.