• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 261
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

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