1 { KOL MCK } // Do not remove this line!
8 uses Windows
, Messages
, ShellAPI
, KOL
{$IFNDEF KOL_MCK}, mirror
, Classes
,
9 mckObjs
, Controls
, mckCtrls
{$ENDIF};
12 Windows
, Messages
, SysUtils
, Classes
, Graphics
, Controls
, Forms
, Dialogs
,
18 {$I MCKfakeClasses.inc}
25 KOLProject1
: TKOLProject
;
27 MainMenu1
: TKOLMainMenu
;
29 procedure Button1Click(Sender
: PObj
);
31 { Private declarations }
33 { Public declarations }
37 Form1
{$IFDEF KOL_MCK} : PForm1
{$ELSE} : TForm1
{$ENDIF} ;
40 procedure NewForm1( var Result
: PForm1
; AParent
: PControl
);
45 {$IFNDEF KOL_MCK} {$R *.DFM} {$ENDIF}
51 var CurH
: Integer = 29;
53 procedure TForm1
.Button1Click(Sender
: PObj
);
55 TmpBmp
, OldBmp
: PBitmap
;
58 Bmp
:= MainMenu1
.ItemBitmap
[ 1 ];
61 H
:= GetSystemMetrics( SM_CYMENUCHECK
);
62 if H
= CurH
then Exit
;
63 TmpBmp
:= NewDIBBitmap( H
, H
, pf24bit
);
64 OldBmp
:= NewBitmap( CurH
, CurH
);
66 SetStretchBltMode( TmpBmp
.Canvas
.Handle
, HALFTONE
);
67 SetBrushOrgEx( TmpBmp
.Canvas
.Handle
, 0, 0, nil );
68 StretchBlt( TmpBmp
.Canvas
.Handle
, 0, 0, H
, H
, OldBmp
.Canvas
.Handle
, 0, 0,
69 CurH
, CurH
, SRCCOPY
);
70 //TmpBmp.SaveToFile( 'c:\test.bmp' );
77 MainMenu1
.ItemBitmap
[ 1 ] := Bmp
;