I have tried and tried, but I'll be damned if I can get this function to work properly. Everything I have read online acts as if this is such a simple thing, but everything I try fails. I have even copied and pasted lines from programs off the internet, and this thing still refuses to work for me.
The way I call it looks like this:
Assuming TImage is an HBITMAP and Tmem.DisplayImage is a string with the filename in it, what am I doing wrong? I have checked to see what Tmem.DisplayImage contains when I call this, and it correctly contains the path.Code:TImage = (HBITMAP)LoadImage(NULL, Tmem.DisplayImage, IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_DEFAULTSIZE);
Thanks in advance to anyone who helps.