Jump to content
  • Advertisement
Sign in to follow this  
nosajghoul

MAKEINTRESOURCE trouble

This topic is 5023 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

This also qualifies as a directX problem, but I think it boils down to a MAKEINTRESOURCE problem, so here it is here as well : Real simple, all its supposed to do is load a .bmp file from a resource. Assume the resources are attached correctly. :P IDirect3DTexture8 *pTemp = 0; D3DXCreateTextureFromResourceA(pDevice, NULL, MAKEINTRESOURCE(IDB_BITMAP1), &pTemp); This fails, the error saying D3DXERR_INVALIDDATA, which tells me absolutely nothing. (error number -2005529767) The device is there, and it is ok. Im suspicious about the NULL. MAKEINTRESOURCE is the culprit I think. pTemp is ok I think. resource.h is attached to the c++ file where these statements occur. Ive looked at the MAKEINTRESOURCE macro, which leads to this define: #define MAKEINTRESOURCEA(i) (LPSTR)((DWORD)((WORD)(i))) Whats going on here? Whatever you send MAKEINTRESOURCE gets converted into a WORD, then a DWORD, then a LPSTR? Why? confused Jason

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!