Click here to Skip to main content
15,902,835 members
Home / Discussions / C#
   

C#

 
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 
GeneralRe: How can I get graphics through message WM_NCPAINT ? Pin
Heath Stewart22-Oct-03 2:59
protectorHeath Stewart22-Oct-03 2:59 
As a quick note, and this may be trivial, but all implementations I've seen (including in Win32) always call the "base" WndProc or DefWndProc. You're only doing it if the message isn't WM_NCPAINT.

Also, the docs for WM_NCPAINT say that it calls the DefWindowProc, which is DefWndProc in the Control class. Did you try putting a breakpoint in your code to see if it's even getting there? If not, you might try moving this to an override of DefWndProc instead of WndProc. I don't know, maybe both callbacks get it.

As I said in my previous post, I had some success. I forgot to mention that I was using Graphics.FromHwnd instead of CreateGraphics. This seemed to work in most cases. I was able to ruin the nonclient area, but could never paint in it. Apparently, I was able to create a Graphics object successfully, but I would always get an exception when creating a Region from the wParam, which would explain why I couldn't paint anything (I couldn't get the bounds in which to paint).

 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
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 
GeneralRe: Advice Pin
leppie21-Oct-03 8:59
leppie21-Oct-03 8:59 

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.