source: branches/2.19_branch/Library/ACLResourceUtility.pas@ 338

Last change on this file since 338 was 17, checked in by RBRi, 19 years ago

+ Library

  • Property svn:eol-style set to native
File size: 955 bytes
Line 
1unit ACLResourceUtility;
2
3interface
4
5uses
6{$ifdef win32}
7 Windows,
8{$endif}
9 Graphics; // must preserve this order!
10 // There is a TBitmap in both units :(
11
12Procedure LoadBitmapResource( Bitmap: TBitmap;
13 Name: string );
14
15// Loads the first format of icon
16// from the named icon (group) resource
17procedure LoadIconResource( Icon: TIcon;
18 Name: string );
19
20implementation
21
22uses
23{$ifdef win32}
24 Types,
25{$endif}
26 Classes,
27 SysUtils;
28
29procedure LoadIconResource( Icon: TIcon;
30 Name: string );
31begin
32{$ifdef os2}
33 Icon.LoadFromResourceName( Name );
34{$else}
35 Icon.Handle := LoadIcon( HInstance,
36 PChar( Name ) );
37{$endif}
38end;
39
40Procedure LoadBitmapResource( Bitmap: TBitmap;
41 Name: string );
42begin
43 Bitmap.LoadFromResourceName(
44{$ifdef win32}
45 HInstance,
46{$endif}
47 Uppercase( Name ) );
48end;
49
50end.
51
52
Note: See TracBrowser for help on using the repository browser.