Solved

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

Posted on 2004-09-05
3
549 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
.NET Launching MS Word Programmatically while on Terminal Server Session 9 45
SAPE.heur.AE935 Visual Studio 3 34
Is COM supported from Apache 1 44
Need more details 5 122
This tutorial is about how to put some of your C++ program's functionality into a standard DLL, and how to make working with the EXE and the DLL simple and seamless.   We'll be using Microsoft Visual Studio 2008 and we will cut out the noise; that i…
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…
Concerto provides fully managed cloud services and the expertise to provide an easy and reliable route to the cloud. Our best-in-class solutions help you address the toughest IT challenges, find new efficiencies and deliver the best application expe…

929 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

13 Experts available now in Live!

Get 1:1 Help Now