fix create resource from XPM image

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@490 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
alexs75
2008-06-24 15:19:56 +00:00
parent 9799c6d1c0
commit 00b3ba15a6
4 changed files with 27 additions and 4 deletions

View File

@ -29,6 +29,8 @@ procedure OutTextXY90(Canvas:TCanvas; X,Y:integer; Text:string; Orientation:TTex
function IsForegroundTask: Boolean;
function ValidParentForm(Control: TControl): TCustomForm;
function CreateArrowBitmap:TBitmap;
function LoadLazResBitmapImage(const ResName: string): TBitmap;
{
function AllocMemo(Size: Longint): Pointer;
function ReallocMemo(fpBlock: Pointer; Size: Longint): Pointer;
@ -512,8 +514,25 @@ end;
function CreateArrowBitmap:TBitmap;
begin
Result:=Graphics.TBitmap.Create;
Result.LoadFromLazarusResource('rxbtn_downarrow');
Result:=LoadLazResBitmapImage('rxbtn_downarrow')
{ Result:=Graphics.TBitmap.Create;
Result.LoadFromLazarusResource('rxbtn_downarrow');}
end;
//Code from DBGrid
function LoadLazResBitmapImage(const ResName: string): TBitmap;
var
C: TCustomBitmap;
begin
C := CreateBitmapFromLazarusResource(ResName);
if C<>nil then
begin
Result := TBitmap.Create;
Result.Assign(C);
C.Free;
end
else
Result:=nil;
end;
initialization