I have this strange problem creating pens to use inside of a WM_PAINT. If I grab a stock pen, everything is fine. If I try to make my own custom colored pens, they don't draw nuthin. For example, I try to create a white pen with: invoke CreatePen, PS_SOLID, 0, 0FFFFFFH invoke SelectObject, hdc, eax where hdc is the DC returned by the BeginPaint. I get a non-zero (read sucessful = hpen) value from CreatePen, but nothing is drawn with it. Any ideas? This message was edited by Ernie, on 1/26/2001 4:10:04 PM
Posted on 2001-01-26 00:44:00 by Ernie
Well, I finally tried CreatePenIndirect, which worked very fine, thank you. Just it lacks the simplicity of CreatePen. Curious.
Posted on 2001-01-26 01:33:00 by Ernie
So where did you get the info on CreatePen? The first argument should be the pen style, not a DC handle.
Posted on 2001-01-26 15:44:00 by tank
You are correct, I typoed it while posting it here. (I also went back and edited the orgional post).
Posted on 2001-01-26 16:11:00 by Ernie