Loading custom resources...

Started by
4 comments, last by elis-cool 20 years, 12 months ago
I cant get this working... heres the code
  
// From script1.rc

.
.
.
/////////////////////////////////////////////////////////////////////////////

//

// 50

//


IDR_501                 50      DISCARDABLE     "Overlay.tga"
IDR_502                 50      DISCARDABLE     "titledefault.tga"
IDR_503                 50      DISCARDABLE     "titlehover.tga"
#endif    // English (New Zealand) resources

/////////////////////////////////////////////////////////////////////////////

.
.
.

// Exact code in my .cpp

HRSRC hRsrc = FindResource(0, "Overlay.tga", "50");
//HRSRC hRsrc = FindResource(0, "Overlay.tga", "#50"); // also tryed this

if(hRsrc) MessageBox(0, "Working", 0,0);  
MasterDepot
[email=esheppard@gmail.com]esheppard@gmail.com[/email]
Advertisement
try:
HRSRC hRsrc = FindResource(0, MAKEINTRESOURCE(IDR_501), "50"; 
ughh, forgot about the smiley parser. make that:
HRSRC hRsrc = FindResource(0, MAKEINTRESOURCE(IDR_501), "50" ; 
ahh crap. someone needs to fix that
 parser.    

  HRSRC hRsrc = FindResource(0, MAKEINTRESOURCE(IDR_501), "50");  
I remember there was something I had to do to load resources using a string filename rather than an integer. Can''t remember what it is off the top of my head though. I will have a look to see if I can find the code when I get home.
Got it!

  HRSRC hRsrc = FindResource(0, MAKEINTRESOURCE(IDR_501), "#50");  

I had tryed the two things seperately, but not together...

MasterDepot
[email=esheppard@gmail.com]esheppard@gmail.com[/email]

This topic is closed to new replies.

Advertisement