Jump to content

  • Log In with Google      Sign In   
  • Create Account

Changes to SelectObject in VC++6?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
1 reply to this topic

#1 Diego   Members   -  Reputation: 122

Posted 15 August 1999 - 10:05 AM

According to my programming books the Select Object function is supposed to return an HGDIOBJ struct (the old object) so that it could be set back later. However, according to VC++6 (specifically the little tooltips that comes up when I move the mouse over the function call in my code) the SelectObject function returns a "void* __cdcel" or something like that. Setting an explicit type on the pen/brush doesn't help. Is there another function to get the old object before changing it? or is it safe to just set an object to NULL when shutting down my program?
Thanks.

------------------
<Diego>


Sponsor:

#2 TANSTAAFL   Moderators   -  Reputation: 1152

Posted 15 August 1999 - 10:05 AM

I havent had much problem using SelectObject... i HAVE, however, had to typecast...

I dont usually work with Pens or Brushes, just Bitmaps, so my SelectObject code normally looks like

HBITMAP hbmold=(HBITMAP)SelectObject(hdc,hbmnew);

i AM using VC++6 to do this, so i know it can be done.





Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS