mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-13 11:49:24 +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
|
uses
|
||||||
Buttons, StdCtrls, LCLlinux, SysUtils, FileCtrl, LCLStrConsts;
|
Buttons, StdCtrls, LCLlinux, SysUtils, FileCtrl, LCLStrConsts, LCLType;
|
||||||
|
|
||||||
const
|
const
|
||||||
cMtCaption : array [TMsgDlgType] of string =
|
cMtCaption : array [TMsgDlgType] of string =
|
||||||
@ -313,6 +313,9 @@ end.
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$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
|
Revision 1.15 2002/07/04 11:46:00 lazarus
|
||||||
MG: moved resourcestring to lclstrconsts.pas
|
MG: moved resourcestring to lclstrconsts.pas
|
||||||
|
|
||||||
|
@ -39,6 +39,8 @@ type
|
|||||||
Internal class used to build a MessageBox.
|
Internal class used to build a MessageBox.
|
||||||
}
|
}
|
||||||
TMessageBox = class (TForm)
|
TMessageBox = class (TForm)
|
||||||
|
procedure MessageBoxKeyDown(Sender: TObject; var Key: Word;
|
||||||
|
Shift: TShiftState);
|
||||||
private
|
private
|
||||||
FBitmap : TBitmap;
|
FBitmap : TBitmap;
|
||||||
FDlgType : TMsgDlgType;
|
FDlgType : TMsgDlgType;
|
||||||
@ -99,6 +101,7 @@ begin
|
|||||||
FButtons := [mbOk];
|
FButtons := [mbOk];
|
||||||
FRelayoutNeeded := false;
|
FRelayoutNeeded := false;
|
||||||
FUpdateCounter := 0;
|
FUpdateCounter := 0;
|
||||||
|
OnKeyDown:=@MessageBoxKeyDown;
|
||||||
OnActivate:=@FormActivate;
|
OnActivate:=@FormActivate;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -173,6 +176,23 @@ begin
|
|||||||
Result:=Canvas.TextHeight('ABCDEFGHIJKLMNOPQRSTUVWXYZgp09')+8;
|
Result:=Canvas.TextHeight('ABCDEFGHIJKLMNOPQRSTUVWXYZgp09')+8;
|
||||||
end;
|
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
|
Method: TMessageBox.SetMessage
|
||||||
Params: value - text to be displayed in the message box
|
Params: value - text to be displayed in the message box
|
||||||
@ -475,6 +495,9 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
Revision 1.10 2002/06/06 07:23:24 lazarus
|
||||||
MG: small fixes to reduce form repositioing
|
MG: small fixes to reduce form repositioing
|
||||||
|
|
||||||
|
@ -685,7 +685,7 @@ type
|
|||||||
|
|
||||||
|
|
||||||
{ Bitmap Header Definition }
|
{ Bitmap Header Definition }
|
||||||
PBitmap = ^TBitmap;
|
PBitmap = ^TagBitmap;
|
||||||
tagBITMAP = packed record
|
tagBITMAP = packed record
|
||||||
bmType: Longint;
|
bmType: Longint;
|
||||||
bmWidth: Longint;
|
bmWidth: Longint;
|
||||||
@ -695,7 +695,6 @@ type
|
|||||||
bmBitsPixel: Word;
|
bmBitsPixel: Word;
|
||||||
bmBits: Pointer;
|
bmBits: Pointer;
|
||||||
end;
|
end;
|
||||||
TBitmap = tagBITMAP;
|
|
||||||
BITMAP = tagBITMAP;
|
BITMAP = tagBITMAP;
|
||||||
|
|
||||||
{ ********************************** }
|
{ ********************************** }
|
||||||
@ -716,7 +715,7 @@ type
|
|||||||
PDIBSection = ^TDIBSection;
|
PDIBSection = ^TDIBSection;
|
||||||
|
|
||||||
tagDIBSECTION = packed record
|
tagDIBSECTION = packed record
|
||||||
dsBm: TBitmap;
|
dsBm: TagBitmap;
|
||||||
dsBmih: pointer;//TBitmapInfoHeader;
|
dsBmih: pointer;//TBitmapInfoHeader;
|
||||||
dsBitfields: array[0..2] of DWORD;
|
dsBitfields: array[0..2] of DWORD;
|
||||||
dshSection: THandle;
|
dshSection: THandle;
|
||||||
@ -1406,6 +1405,9 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
Revision 1.7 2002/06/04 15:17:22 lazarus
|
||||||
MG: improved TFont for XLFD font names
|
MG: improved TFont for XLFD font names
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user