mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-29 13:30:37 +02:00
parent
d29085176b
commit
0382f349af
@ -534,6 +534,8 @@ function TestFormStreamFormat(Stream: TStream): TLRSStreamOriginalFormat;
|
|||||||
procedure FormDataToText(FormStream, TextStream: TStream;
|
procedure FormDataToText(FormStream, TextStream: TStream;
|
||||||
aFormat: TLRSStreamOriginalFormat = sofUnknown);
|
aFormat: TLRSStreamOriginalFormat = sofUnknown);
|
||||||
|
|
||||||
|
function FindResourceLFM(ResName: string): HRSRC;
|
||||||
|
|
||||||
procedure DefineRectProperty(Filer: TFiler; const Name: string;
|
procedure DefineRectProperty(Filer: TFiler; const Name: string;
|
||||||
ARect, DefaultRect: PRect);
|
ARect, DefaultRect: PRect);
|
||||||
|
|
||||||
@ -587,7 +589,6 @@ procedure WriteLRSReversedWords(s: TStream; p: Pointer; Count: integer);
|
|||||||
function FloatToLFMStr(const Value: extended; Precision, Digits: Integer
|
function FloatToLFMStr(const Value: extended; Precision, Digits: Integer
|
||||||
): string;
|
): string;
|
||||||
|
|
||||||
|
|
||||||
function CompareLRPositionLinkWithLFMPosition(Item1, Item2: Pointer): integer;
|
function CompareLRPositionLinkWithLFMPosition(Item1, Item2: Pointer): integer;
|
||||||
function CompareLRPositionLinkWithLRSPosition(Item1, Item2: Pointer): integer;
|
function CompareLRPositionLinkWithLRSPosition(Item1, Item2: Pointer): integer;
|
||||||
|
|
||||||
@ -793,6 +794,21 @@ begin
|
|||||||
Result := InitLazResourceComponent(Instance, RootAncestor);
|
Result := InitLazResourceComponent(Instance, RootAncestor);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function FindResourceLFM(ResName: string): HRSRC;
|
||||||
|
{$if (FPC_FULLVERSION>=20701) and defined(WinCE)}
|
||||||
|
var
|
||||||
|
u: UnicodeString;
|
||||||
|
begin
|
||||||
|
u:=ResName;
|
||||||
|
Result := FindResource(HInstance,PWideChar(u),Windows.RT_RCDATA);
|
||||||
|
end;
|
||||||
|
{$else}
|
||||||
|
begin
|
||||||
|
Result := FindResource(HInstance,PChar(ResName),
|
||||||
|
{$if (FPC_FULLVERSION>=20701) and defined(Windows)}Windows.{$endif}RT_RCDATA);
|
||||||
|
end;
|
||||||
|
{$endif}
|
||||||
|
|
||||||
procedure DefineRectProperty(Filer: TFiler; const Name: string; ARect,
|
procedure DefineRectProperty(Filer: TFiler; const Name: string; ARect,
|
||||||
DefaultRect: PRect);
|
DefaultRect: PRect);
|
||||||
var
|
var
|
||||||
@ -3089,9 +3105,7 @@ function InitLazResourceComponent(Instance: TComponent;
|
|||||||
{$ifdef UseRES}
|
{$ifdef UseRES}
|
||||||
if Stream = nil then
|
if Stream = nil then
|
||||||
begin
|
begin
|
||||||
FPResource := FindResource(HInstance, PChar(ResName),
|
FPResource := FindResourceLFM(ResName);
|
||||||
{$IF (FPC_FULLVERSION>=20701) and defined(Windows)}Windows.{$ENDIF}RT_RCDATA
|
|
||||||
);
|
|
||||||
if FPResource <> 0 then
|
if FPResource <> 0 then
|
||||||
Stream := TLazarusResourceStream.CreateFromHandle(HInstance, FPResource);
|
Stream := TLazarusResourceStream.CreateFromHandle(HInstance, FPResource);
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user