I have a program that Im using OpenFileName and GetOpenFileName to get a file and using Windows Imaging Component to convert it to a DIBSection then using BitBlt to draw it to the window.
I want to do the same with my resource files so I use LoadImage, but when I try to convert it using Windows Imaging Component I get an access violation and it says error reading characters of string.
This is how I use LoadImage
LoadImage(NULL,MAKEINTRESOURCE(IDB_BACKGROUND),0,0,0,LR_LOADFROMFILE);
Whats my problem here?