Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to load picture from the resource in dll? (Read 1180 times)
Joanna
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 37
Joined: May 15th, 2006
How to load picture from the resource in dll?
Jul 27th, 2006 at 6:41am
Print Post  
Hi,
I have a problem again Embarrassed
What I want to do is that: several components are written in a dll, in this dll file include the icons for each component, and then in the outside, we intend to get these icons and set the pictures of boxes by these icons.

And the source code is like this:

HINSTANCE hDll=NULL;
hDll=LoadLibrary("MyDLL.dll");
box.LoadPicFromRes((LONG) hDll,_T("IDR_IMAGES"),_T("IMAGES"));

The MyDLL.dll is the dll file that including the custome resource "IMAGES", and in the "IMAGES" resouce including "IDR_IMAGES1" and "IDR_IMAGES2" items, just like the sample "NetSample" that offered by you.

But the problem is that: the program can be complied correctly, but the picture of the box are blank, that is to say the resource are not load correctly, how can I handle this problem?

Thank you very much!
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint