Solved

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

Posted on 2004-09-05
3
562 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 8

Accepted Solution

by:
mxjijo earned 500 total points
ID: 11998364

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

~j
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

738 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