thanx chorus
Posted on 2002-07-27 22:30:10 by IwasTitan
Ok i put this into bitfiddlers prog.

.if uMsg == WM_MOUSEMOVE

movzx eax,WORD PTR
movzx edx,WORD PTR
invoke SetPixel,hdc,eax,edx,25h

So i'm drawing with the mouse but....the hot spot is abot 15 pixels above the arrow style cursor so i can draw in the title bar and edit windows.

Should i change movzx to mov. I'll try it.

Posted on 2002-07-28 11:46:42 by IwasTitan
Thanks for the gracious comment! It is recieved and accepted.

This was just an example program that was thrown together to show what I thought that he was wanting to know from his post!Tried to keep it simple so that it was not to difficult to understand.I do know that it could have been done in a more elaborate way but then again it was mearly trying to demonstrate a basic concept!

Posted on 2002-07-28 11:56:08 by bitfiddler
Are you using GetWindowDC or GetDC to grab your DC? You shouldn't be able to draw in the title bar with a regular DC. That makes me wonder...

Also, movzx is used because we are copying word values to full dwords. You could also xor eax,eax/mov ax,WORD PTR or other variations. You can remove it if you want, but I don't think that's your problem.

Posted on 2002-07-28 14:54:24 by chorus
Chorus...i am using GetDC..and setting CS_OWNDC in the window creation data.

The hot spot (at least where it is setting the pixel) is appearing about 15 pixels above the top of the standard arrow cursor. And it does set pixels in the non client area including the edit windows.

I agree, movzx is not the problem.

Also if i move the window it will no longer set pixels. Now that is really bugging me.

Posted on 2002-07-28 16:05:48 by IwasTitan