| ylxin1993 (73) | |||
|
I write a simple drawing ellipse program, I want to implement draw different outline ellipse, but my code doesn't work well with the line color, here's part of my code(part of WM_PAINT in WndProc funciton): // oldHPEN and hPen are HPEN instance, hDC is HDC
when I omit the line in the for loop, it works well when LBUTTONDOWN and MOUSEMOVE, but if I uncomment these, it got weired, all ellipse becomes the last drawing color, what should I do? I got puzzle with SelectObject function, I want to know what the SelectObject do ? why first we save the return, and next we don't need the return value? it works well when use like this:
| |||
|
|
|||