Home > Back-end >  LoadImage function when using image file name wrong, why
LoadImage function when using image file name wrong, why

Time:09-25

CodePudding user response:

Your project default to the UNICODE character set, so to:

 L "test. JPG" 

CodePudding user response:

EasyX loadimage is lowercase, you commented out second loadimage statements should be able to,
In addition, did you include the header file, I can't see in the picture,

CodePudding user response:

LoadImage this API is actually mapped to LoadImageA or LoadImageW so if you insist on using LoadImage, string use TCHAR type of parameters, such as:
LoadImage (NULL, TEXT (" test. JPG "), IMAGE_BITMAP...
Or explicitly specified:
LoadImageW (NULL, "test. JPG", L IMAGE_BITMAP...
  • Related