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