How should I make a cast?

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Sep 2006
Posts: 32
Reputation: linq is on a distinguished road 
Solved Threads: 0
linq linq is offline Offline
Light Poster

How should I make a cast?

 
1
  #1
Sep 11th, 2006
[cpp code]
hIcon = LoadImage(NULL, "menu_two.ico", IMAGE_ICON, 32, 32, LR_LOADFROMFILE);
error C2440: '=' : cannot convert from 'void *' to 'struct HICON__ *'
Conversion from 'void*' to pointer to non-'void' requires an explicit cast
So I think I should make a cast to make this work at C++ compiler,but how?
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,399
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1467
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is online now Online
Still Learning

Re: How should I make a cast?

 
0
  #2
Sep 11th, 2006
Here is an example
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC