Hello all. I've been trying to create a paintbrush with win32, but to no avail. The best that I've been able to do is plot a few pixels here and there (with SetPixel(), but never in a straight, seamless line (the way the pencil tool works in Microsoft paint for example).
Using SetPixel(), I created something that represents a paintbrush, however, the paintbrush skips pixels, and does not draw lines, but dots rather.
WM_CREATE:
global_dc = GetDC(hWnd);
break;
WM_MOUSEMOVE:
SetPixel(global_dc, LOWORD(lParam), HIWORD(lParam), Color::black);
break;
Can someone please tell me how to create a pencil, or paintbrush like tool using Win32/C++?. The above code will create something similar to what I'm looking for, however, the above also creates a paintbrush which skips pixels. Rather than creating seamless lines, the above code creates a paintbrush that skips pixels every now and then within a single line creation. Please help.