|
-
Dec 28th, 2000, 10:45 AM
#1
Thread Starter
PowerPoster
I have a resource file which has JPG's as custom resource. The problem is that i am not able to load the jpg into a variable of type "IPictureDisp" using either LoadResData or even LoadResBitmap. If I directly load the jpg using loadpicture function(using the jpg file name), it works smoothly.
Am I using the wrong datatype or is there some other way to load JPg's from a resource file.
-
Jan 3rd, 2001, 12:13 AM
#2
Lively Member
Umm... I think it's doable with the GetDIBits or something function... One of these people has a site on how to do it. Darn and I even have it bookmarked, except this isnt my computer im working at.
-
Jan 4th, 2001, 04:02 AM
#3
Thread Starter
PowerPoster
I have been successful in loading a JPG file from a resource by using LoadResData function. The concept is to read the data in bytes, and hten store it in a temp file. Load the temp file into the control as required. I don't have hte address right now but this solution is from Microsoft's website. They even have a demo project for loading JPG's and GIF's.(Search the KB)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|