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
Well, I finally tried CreatePenIndirect, which worked very fine, thank you. Just it lacks the simplicity of CreatePen. Curious.
So where did you get the info on CreatePen? The first argument should be the pen style, not a DC handle.
You are correct, I typoed it while posting it here. (I also went back and edited the orgional post).