Browse Source

Using .lrs instead of .rc

lainz 8 years ago
parent
commit
e77538b06a
4 changed files with 23 additions and 5 deletions
  1. 6 4
      bclistbox.pas
  2. 17 0
      bcpaperlistbox.lrs
  3. 0 1
      bcpaperlistbox.rc
  4. BIN
      shadow.png

+ 6 - 4
bclistbox.pas

@@ -60,8 +60,6 @@ implementation
 uses
 uses
   PropEdits;
   PropEdits;
 
 
-{$R bcpaperlistbox.rc}
-
 procedure Register;
 procedure Register;
 begin
 begin
   RegisterComponents('BGRA Controls', [TBCListBox]);
   RegisterComponents('BGRA Controls', [TBCListBox]);
@@ -89,9 +87,9 @@ end;
 
 
 procedure TBCPaperPanel.LoadShadowFromBitmapResource;
 procedure TBCPaperPanel.LoadShadowFromBitmapResource;
 var
 var
-  res: TResourceStream;
+  res: TLazarusResourceStream;
 begin
 begin
-  res := TResourceStream.Create(HInstance, 'SHADOW', RT_RCDATA);
+  res := TLazarusResourceStream.Create('SHADOW', nil);
   FShadow := TBGRASliceScaling.Create(res);
   FShadow := TBGRASliceScaling.Create(res);
   FShadow.Margins := Margins(6, 9, 6, 9);
   FShadow.Margins := Margins(6, 9, 6, 9);
   res.Free;
   res.Free;
@@ -154,4 +152,8 @@ begin
   Self.BorderStyle := bsNone;
   Self.BorderStyle := bsNone;
 end;
 end;
 
 
+initialization
+
+{$I bcpaperlistbox.lrs}
+
 end.
 end.

+ 17 - 0
bcpaperlistbox.lrs

@@ -0,0 +1,17 @@
+LazarusResources.Add('SHADOW','PNG',[
+  #137'PNG'#13#10#26#10#0#0#0#13'IHDR'#0#0#0#20#0#0#0#19#8#3#0#0#0#167'R'#221
+  +#135#0#0#0'fPLTE'#174#174#174#182#182#182#195#195#195#196#196#196#201#201#201
+  +#208#208#208#209#209#209#215#215#215#219#219#219#220#220#220#221#221#221#222
+  +#222#222#224#224#224#226#226#226#228#228#228#231#231#231#232#232#232#234#234
+  +#234#235#235#235#236#236#236#237#237#237#239#239#239#240#240#240#241#241#241
+  +#242#242#242#243#243#243#244#244#244#245#245#245#246#246#246#247#247#247#248
+  +#248#248#249#249#249#250#250#250#255#255#255#246#159#203#11#0#0#0#164'IDATx'
+  +#156#149#208#203#14#131' '#16'@Q'#172'oE'#197#7#136'0'#12#246#255#127#178'#'
+  +#196#210'E'#187#232#221#144#156'L'#2#3';'#191#196#254'CO!u'#157'7'#146'8'#7
+  +#148's'#24#148#144#8#204#17'2@|'#161#247#206'>'#223'YG'#179#132#8':'#161#6#12
+  +#232#142'-'#225'v'#184#136#187'H('#246#128#8'jL8*'#192#128'rH8'#200#27'?''#z'
+  +#212'SS=2'#198#178'G'#213'L:'#222#238#205#204#235#178#200#243#162#172#249'l'
+  +#194';O'#15'R'#240#190'k'#219#174#231'B'#130#143#187#163'U'#235'2S'#203#170
+  +','#222#191'D'#203'[CYZ'#253#231#127#190#0'3'#140')'#163#214'Vn'#22#0#0#0#0
+  +'IEND'#174'B`'#130
+]);

+ 0 - 1
bcpaperlistbox.rc

@@ -1 +0,0 @@
-SHADOW RCDATA "shadow.png"

BIN
shadow.png