Skip to main content
GameDev.net gamedev.net
🔒 Locked

GDI:HPEN

Started by flangazor May 2, 2003 at 12:29 PM 0 replies 300+ views
Original Post
flangazor
flangazor
Drizzt DoUrden''s GDI: Hpen thread got deleted. The answer to his question was: if you are using C: HPEN old_pen = (HPEN)SelectObject(hdc, hpen); if you are using C++: HPEN old_pen = static_cast(SelectObject(hdc, hpen)); This is because you have a void *. A void* is a pointer to a block of memory, but you don''t know what the memory is. You need to cast it. Check Stroustroup''s book for a good explanation of casts in C++. Scott Meyer''s Essential C++ is also a good reference.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.