mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-23 05:19:31 +02:00
MG: removed ambigious TBitmap from LCLType and added Escape key to MessageDlgs
git-svn-id: trunk@1795 -
This commit is contained in:
parent
48e9d401cb
commit
80f0f1d9ed
@ -248,7 +248,7 @@ implementation
|
||||
|
||||
|
||||
uses
|
||||
Buttons, StdCtrls, LCLlinux, SysUtils, FileCtrl, LCLStrConsts;
|
||||
Buttons, StdCtrls, LCLlinux, SysUtils, FileCtrl, LCLStrConsts, LCLType;
|
||||
|
||||
const
|
||||
cMtCaption : array [TMsgDlgType] of string =
|
||||
@ -313,6 +313,9 @@ end.
|
||||
{ =============================================================================
|
||||
|
||||
$Log$
|
||||
Revision 1.16 2002/07/29 13:39:06 lazarus
|
||||
MG: removed ambigious TBitmap from LCLType and added Escape key to MessageDlgs
|
||||
|
||||
Revision 1.15 2002/07/04 11:46:00 lazarus
|
||||
MG: moved resourcestring to lclstrconsts.pas
|
||||
|
||||
|
@ -39,6 +39,8 @@ type
|
||||
Internal class used to build a MessageBox.
|
||||
}
|
||||
TMessageBox = class (TForm)
|
||||
procedure MessageBoxKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
private
|
||||
FBitmap : TBitmap;
|
||||
FDlgType : TMsgDlgType;
|
||||
@ -99,6 +101,7 @@ begin
|
||||
FButtons := [mbOk];
|
||||
FRelayoutNeeded := false;
|
||||
FUpdateCounter := 0;
|
||||
OnKeyDown:=@MessageBoxKeyDown;
|
||||
OnActivate:=@FormActivate;
|
||||
end;
|
||||
|
||||
@ -173,6 +176,23 @@ begin
|
||||
Result:=Canvas.TextHeight('ABCDEFGHIJKLMNOPQRSTUVWXYZgp09')+8;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TMessageBox.MessageBoxKeyDown
|
||||
|
||||
OnKeyDown Event handler for messages dialogs.
|
||||
The 'Escape' key has the same meaning as a Cancel or Abort click.
|
||||
------------------------------------------------------------------------------}
|
||||
procedure TMessageBox.MessageBoxKeyDown(Sender: TObject; var Key: Word;
|
||||
Shift: TShiftState);
|
||||
begin
|
||||
if (Key=VK_Escape) then begin
|
||||
if mbCancel in FButtons then
|
||||
ModalResult:=mrCancel
|
||||
else if mbAbort in FButtons then
|
||||
ModalResult:=mrAbort;
|
||||
end;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
Method: TMessageBox.SetMessage
|
||||
Params: value - text to be displayed in the message box
|
||||
@ -475,6 +495,9 @@ end;
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.11 2002/07/29 13:39:07 lazarus
|
||||
MG: removed ambigious TBitmap from LCLType and added Escape key to MessageDlgs
|
||||
|
||||
Revision 1.10 2002/06/06 07:23:24 lazarus
|
||||
MG: small fixes to reduce form repositioing
|
||||
|
||||
|
@ -685,7 +685,7 @@ type
|
||||
|
||||
|
||||
{ Bitmap Header Definition }
|
||||
PBitmap = ^TBitmap;
|
||||
PBitmap = ^TagBitmap;
|
||||
tagBITMAP = packed record
|
||||
bmType: Longint;
|
||||
bmWidth: Longint;
|
||||
@ -695,7 +695,6 @@ type
|
||||
bmBitsPixel: Word;
|
||||
bmBits: Pointer;
|
||||
end;
|
||||
TBitmap = tagBITMAP;
|
||||
BITMAP = tagBITMAP;
|
||||
|
||||
{ ********************************** }
|
||||
@ -716,7 +715,7 @@ type
|
||||
PDIBSection = ^TDIBSection;
|
||||
|
||||
tagDIBSECTION = packed record
|
||||
dsBm: TBitmap;
|
||||
dsBm: TagBitmap;
|
||||
dsBmih: pointer;//TBitmapInfoHeader;
|
||||
dsBitfields: array[0..2] of DWORD;
|
||||
dshSection: THandle;
|
||||
@ -1406,6 +1405,9 @@ end.
|
||||
|
||||
{
|
||||
$Log$
|
||||
Revision 1.8 2002/07/29 13:39:07 lazarus
|
||||
MG: removed ambigious TBitmap from LCLType and added Escape key to MessageDlgs
|
||||
|
||||
Revision 1.7 2002/06/04 15:17:22 lazarus
|
||||
MG: improved TFont for XLFD font names
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user