Click here to Skip to main content
15,917,174 members
Home / Discussions / C#
   

C#

 
GeneralRe: __LINE__ Pin
Rick Crone21-Oct-03 9:43
Rick Crone21-Oct-03 9:43 
GeneralRe: __LINE__ Pin
leppie21-Oct-03 8:42
leppie21-Oct-03 8:42 
GeneralRe: __LINE__ Pin
J. Dunlap21-Oct-03 9:01
J. Dunlap21-Oct-03 9:01 
QuestionHow can I get graphics through message WM_NCPAINT ? Pin
wangier20-Oct-03 23:24
wangier20-Oct-03 23:24 
AnswerRe: How can I get graphics through message WM_NCPAINT ? Pin
Heath Stewart21-Oct-03 6:41
protectorHeath Stewart21-Oct-03 6:41 
GeneralRe: How can I get graphics through message WM_NCPAINT ? Pin
wangier21-Oct-03 15:08
wangier21-Oct-03 15:08 
GeneralRe: How can I get graphics through message WM_NCPAINT ? Pin
Heath Stewart21-Oct-03 18:57
protectorHeath Stewart21-Oct-03 18:57 
GeneralRe: How can I get graphics through message WM_NCPAINT ? Pin
wangier21-Oct-03 23:40
wangier21-Oct-03 23:40 
Please check following codes, it dosen'g work properly, the title bar is still empty.
( the method PanitNonClientArea(Graphics, RectangleF) can work properly. )


<br />
protected override void WndProc(ref Message m)<br />
{<br />
	Graphics g;<br />
	RectangleF rectf;<br />
<br />
	Point pt;<br />
<br />
	switch (m.Msg)<br />
	{<br />
		case WMConsts.WM_NCPAINT :<br />
			IntPtr hrgn = m.WParam;<br />
			if ( hrgn != (IntPtr)1 )<br />
			{<br />
				Region rgn = Region.FromHrgn(hrgn);<br />
				g = CreateGraphics();<br />
				rectf = rgn.GetBounds(g);<br />
				PaintNonClientArea(g, rectf);<br />
			}<br />
			else<br />
			{<br />
				g = CreateGraphics();<br />
				rectf = new RectangleF(0,-23, Width, 23);<br />
				PaintNonClientArea(g, rectf);<br />
				g.Dispose();<br />
			}<br />
			<br />
			//base.WndProc(ref m);<br />
			break;<br />
<br />
		default :<br />
			base.WndProc (ref m);<br />
			break;<br />
	}<br />
}<br />

GeneralRe: How can I get graphics through message WM_NCPAINT ? Pin
Heath Stewart22-Oct-03 2:59
protectorHeath Stewart22-Oct-03 2:59 
GeneralRe: How can I get graphics through message WM_NCPAINT ? Pin
wangier22-Oct-03 15:44
wangier22-Oct-03 15:44 
GeneralRe: How can I get graphics through message WM_NCPAINT ? Pin
wangier21-Oct-03 17:24
wangier21-Oct-03 17:24 
QuestionHow can I capture the screen with cursor? Pin
qiuji20-Oct-03 22:52
qiuji20-Oct-03 22:52 
AnswerRe: How can I capture the screen with cursor? Pin
Heath Stewart21-Oct-03 6:47
protectorHeath Stewart21-Oct-03 6:47 
GeneralControl Button Doubleclick Pin
Mr. Labenche20-Oct-03 21:46
Mr. Labenche20-Oct-03 21:46 
GeneralRe: Control Button Doubleclick Pin
Heath Stewart21-Oct-03 6:51
protectorHeath Stewart21-Oct-03 6:51 
GeneralRe: Control Button Doubleclick Pin
Mr. Labenche21-Oct-03 23:16
Mr. Labenche21-Oct-03 23:16 
GeneralRe: Control Button Doubleclick Pin
Heath Stewart22-Oct-03 2:52
protectorHeath Stewart22-Oct-03 2:52 
GeneralRe: Control Button Doubleclick Pin
Mr. Labenche22-Oct-03 3:07
Mr. Labenche22-Oct-03 3:07 
GeneralRe: Control Button Doubleclick Pin
Heath Stewart22-Oct-03 3:18
protectorHeath Stewart22-Oct-03 3:18 
QuestionHow to connect to a Solaris Unix box from .NET using sockets or tcpclient Pin
Buckin20-Oct-03 21:44
Buckin20-Oct-03 21:44 
AnswerRe: How to connect to a Solaris Unix box from .NET using sockets or tcpclient Pin
Heath Stewart21-Oct-03 6:53
protectorHeath Stewart21-Oct-03 6:53 
GeneralHelp in color of Datagrid Pin
erbest20-Oct-03 17:49
erbest20-Oct-03 17:49 
GeneralAdvice Pin
gadgetfbi20-Oct-03 16:17
gadgetfbi20-Oct-03 16:17 
GeneralRe: Advice Pin
Guillermo Rivero20-Oct-03 16:47
Guillermo Rivero20-Oct-03 16:47 
GeneralRe: Advice Pin
Bo Hunter20-Oct-03 18:05
Bo Hunter20-Oct-03 18:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.