• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 258
  • Last Modified:

Get resource

Anyone know how i can use the bitmap files in Shell32.dll inside my own program?

0
foxjax
Asked:
foxjax
  • 2
  • 2
1 Solution
 
din345Commented:
0
 
foxjaxAuthor Commented:
not quite what i was looking for - i don't know anything about connecting to dll files.

I'm just looking to get the handle of the bitmaps inside shell32.dll so i can then use them inside my own programs if i want.
0
 
din345Commented:
try this:
var LibHandle: THandle;
    Bitmap: Tbitmap;
begin
  LibHandle:=Loadlibrary('Shell32.dll');
  if LibHandle <> 0 then begin
    Bitmap:=TBitmap.Create;
    Bitmap.LoadFromResourceID(LibHandle, 147); // 147 = Resource ID
    Image1.Canvas.Draw(0, 0, Bitmap);
    Bitmap.Free;
    FreeLibrary(LibHandle);
  end;
end;
0
 
foxjaxAuthor Commented:
just what i was looking for - thanks!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now