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