• Advertisement

Archived

This topic is now archived and is closed to further replies.

cannot convert from 'void *' to 'struct HPEN__ *'??????HELP!

This topic is 5858 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

old_pen = SelectObject(hgdc, black_pen); error C2440: ''='' : cannot convert from ''void *'' to ''struct HPEN__ *'' Conversion from ''void*'' to pointer to non-''void'' requires an explicit cast Please help! remember I''m a newbie.
the Particle Projection Cannon fires a shimmering blue bolt, much like a cross between lightning and a sine wave that ripples along its path.

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
You have to cast it.

old_pen = (HPEN) SelectObject(hgdc, black_pen);

Share this post


Link to post
Share on other sites
You need to cast the void pointer (void*) to whatever type you are using, for example an HPEN*.

So, old_pen = (HPEN*)SelectObject(hgdc, black_pen); would probably work.

-Marc

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You have to cast it.

old_pen = (HPEN) SelectObject(hgdc, black_pen);

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
You have to cast it.

old_pen = (HPEN) SelectObject(hgdc, black_pen);

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Aplogies for the repeated post. Go and tell my ISP www.blueyonder.co.uk to get some fucking webcaches that work properly please.

Share this post


Link to post
Share on other sites
ok, Thanks!



the Particle Projection Cannon fires a shimmering blue bolt, much like a cross between lightning and a sine wave that ripples along its path.

Share this post


Link to post
Share on other sites

  • Advertisement