Solved

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

Posted on 2004-09-05
3
542 Views
Last Modified: 2013-12-03
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.
0
Comment
Question by:piesoft
3 Comments
 
LVL 8

Accepted Solution

by:
mxjijo earned 500 total points
Comment Utility

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

~j
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

This article describes how to add a user-defined command button to the Windows 7 Explorer toolbar.  In the previous article (http://www.experts-exchange.com/A_2172.html), we saw how to put the Delete button back there where it belongs.  "Delete" is …
For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now