Load JPEG from Resource and convert it to HBITMAP --- Help me plz.

I develope game in PPC by eVc4.0++ . I use Game API(GAPI) in my developement. I would like to used JPEG format for my picture in my game because size of it. I am currently trying to used CxImage Library.

CxImage *newImage=new CxImage();
if (!newImage->LoadResource(FindResource(g_hInst,MAKEINTRESOURCE(IDR_JPG2),_T("JPG")),CXIMAGE_FORMAT_JPG)){
            delete newImage;
            newImage =NULL;
            return ;
      }
HANDLE hDIB = newImage->CopyToHandle();

it give me HANDLE. I try to cast it to HBITMAP ---> HBITMAP hBitmap=(HBITMAP)hDIB;

I think it  wrong. T_T

Can anyone give me a brief explanation of how to load JPEG from Res(evc4.0++) and convert it to HBITMAP ??

Also some tutorials would be helpful considering this is the first game i am trying to create.  Thanks in advance.
piesoftAsked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
mxjijoConnect With a Mentor Commented:

Take a look at this link.. I hope that would help.
http://www.crispen.org/src/archive/0007.html

~j
0
All Courses

From novice to tech pro — start learning today.