Sign in to follow this  

Error I cant resolve

Recommended Posts

Hi there, I was wondering if anyone could help me with an error I have in my code. I'm working from the book 'Tricks of Windows Game Programming Gurus' and on chapter 4...drawing lines. This is the code giving me the trouble... HPEN green_pen = CreatePen(PS_SOLID, 1, RGB(255,255,255)); HPEN old_pen = SelectObject(hdc, green_pen); MoveToEx(hdc, 10,10,NULL); LineTo(hdc,160,60); SelectObject(hdc,old_pen); DeleteObject(green_pen); And this is the error... error C2440: 'initializing' : cannot convert from 'void *' to 'struct HPEN__ *' Any help greatly appreciated, Many Thanks, David

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this