Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2004-09-05
3
Medium Priority
?
570 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 2000 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

What my article will show is if you ever had to do processing to a listbox without being able to just select all the items in it. My software Visual Studio 2008 crystal report v11 My issue was I wanted to add crystal report to a form and show…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
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…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…

636 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