Click to See Complete Forum and Search --> : Problem about WINDOW GDI


cayido
June 28th, 2007, 05:06 AM
I did a short paint project like mspaint.exe.

I have a problem about drawline with stretch-out line,some function like as folling:
WM_LBUTTON DOWN: drawline, confirm a start point
WM_MOUSEMOVE: a single line is drawn where end point is Cursor's position
WM_LBUTTONUP: drawline complete

I have problem in WM_MOUSEMOVE,to make a single line in the window,i have to use invalidateRect() end of the MOUSEMOVE,it causes my app
less effiecient and it is very flash.How it could be a better way like mspaint.exe

I am very sorry that my English is very poor,and I am just a Rookie about
window API,if have anything misunderstanding,you can reply to me.

S_M_A
June 28th, 2007, 05:32 AM
Some exemple code can be found here http://www.codeguru.com/forum/showthread.php?t=424902

Edit: This is just an example so intersecting objects will be trashed by painting new objects.

cayido
June 28th, 2007, 10:38 PM
Thanks a lot.
I find solution