IonicWind Software

Aurora Compiler => GUI => Topic started by: Zen on July 15, 2006, 08:39:10 AM

Title: Loading Image From External DLL
Post by: Zen on July 15, 2006, 08:39:10 AM
Ok, so i know how to load a bitmap from a resource from the calling application using CBitmap::LoadFromResource() but if i am manually using LoadLibraryA, then find the resource etc, how do i then use it within aurora's GUI classes to display it in my application?

Lewis
Title: Re: Loading Image From External DLL
Post by: Ionic Wind Support Team on July 15, 2006, 10:50:31 AM
use the Attach member function on a handle.

Probably the simplest way is to use LoadBitmap

DECLARE import, LoadBitmapA(
  UINT hInstance,  // handle to application instance
  string lpBitmapName  // name of bitmap resource
),UINT;

hInstance is the handle to the DLL returned by LoadLibraryA.  LoadBitmapA returns a handle to the bitmap so..

CBitmap b;
b.Attach(hBitmap);

Would be all that would be needed.
Title: Re: Loading Image From External DLL
Post by: Zen on July 15, 2006, 06:30:04 PM
Ahhh i looked at that but i assumed it was a private method used by the other methods, obviously thinking about it, you always comment which methods and members are private or public. Silly me.

Thanks a lot Paul
Lewis