Jump to content
  • Advertisement
Sign in to follow this  


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

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
Sign in to follow this  

  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!