added more Delphi win32 compatibility functions

git-svn-id: trunk@3742 -
This commit is contained in:
mattias 2002-12-27 17:12:38 +00:00
parent 077d9b7202
commit 279a4f077c
12 changed files with 483 additions and 283 deletions

View File

@ -273,7 +273,7 @@ end;
function TDesignerDeviceContext.GetDCOrigin: TPoint; function TDesignerDeviceContext.GetDCOrigin: TPoint;
begin begin
if not (ddcDCOriginValid in FFlags) then begin if not (ddcDCOriginValid in FFlags) then begin
GetWindowOrgEx(FDC,FDCOrigin); GetWindowOrgEx(FDC,@FDCOrigin);
Include(FFlags,ddcDCOriginValid); Include(FFlags,ddcDCOriginValid);
end; end;
Result:=FDCOrigin; Result:=FDCOrigin;

View File

@ -442,6 +442,9 @@ type
TScreen = class(TComponent) TScreen = class(TComponent)
private private
FActiveControl: TWinControl;
FActiveCustomForm: TCustomForm;
FActiveForm: TForm;
FCursor: TCursor; FCursor: TCursor;
FCursorCount: integer; FCursorCount: integer;
FCursorList: PCursorRec; FCursorList: PCursorRec;
@ -450,6 +453,10 @@ type
FFonts : TStrings; FFonts : TStrings;
FFormList: TList; FFormList: TList;
FHintFont : TFont; FHintFont : TFont;
FLastActiveControl: TWinControl;
FLastActiveCustomForm: TCustomForm;
FOnActiveControlChange: TNotifyEvent;
FOnActiveFormChange: TNotifyEvent;
FPixelsPerInch : integer; FPixelsPerInch : integer;
FSaveFocusedList: TList; FSaveFocusedList: TList;
@ -466,10 +473,14 @@ type
procedure RemoveForm(FForm: TCustomForm); procedure RemoveForm(FForm: TCustomForm);
procedure SetCursor(const AValue: TCursor); procedure SetCursor(const AValue: TCursor);
procedure SetCursors(Index: Integer; const AValue: HCURSOR); procedure SetCursors(Index: Integer; const AValue: HCURSOR);
procedure UpdateLastActive;
public public
constructor Create(AOwner : TComponent); override; constructor Create(AOwner : TComponent); override;
destructor Destroy; Override; destructor Destroy; Override;
public public
property ActiveControl: TWinControl read FActiveControl;
property ActiveCustomForm: TCustomForm read FActiveCustomForm;
property ActiveForm: TForm read FActiveForm;
property Cursor: TCursor read FCursor write SetCursor; property Cursor: TCursor read FCursor write SetCursor;
property Cursors[Index: Integer]: HCURSOR read GetCursors write SetCursors; property Cursors[Index: Integer]: HCURSOR read GetCursors write SetCursors;
property FormCount: Integer read GetFormCount; property FormCount: Integer read GetFormCount;
@ -479,6 +490,10 @@ type
property HintFont : TFont read FHintFont; property HintFont : TFont read FHintFont;
property Height : Integer read Getheight; property Height : Integer read Getheight;
property Width : Integer read GetWidth; property Width : Integer read GetWidth;
property OnActiveControlChange: TNotifyEvent
read FOnActiveControlChange write FOnActiveControlChange;
property OnActiveFormChange: TNotifyEvent
read FOnActiveFormChange write FOnActiveFormChange;
end; end;

View File

@ -169,7 +169,15 @@ procedure TApplication.ControlDestroyed(AControl: TControl);
begin begin
if AControl=FMouseControl then FMouseControl:=nil; if AControl=FMouseControl then FMouseControl:=nil;
if AControl = MainForm then FMainForm:= nil; if AControl = MainForm then FMainForm:= nil;
if Screen.FActiveControl = AControl then Screen.FActiveControl := nil;
if Screen.FActiveCustomForm = AControl then
begin
Screen.FActiveCustomForm := nil;
Screen.FActiveForm := nil;
end;
if Screen.FFocusedForm = AControl then Screen.FFocusedForm := nil;
if FHintControl = AControl then FHintControl:=nil; if FHintControl = AControl then FHintControl:=nil;
Screen.UpdateLastActive;
end; end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
@ -843,6 +851,9 @@ end;
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.44 2002/12/27 17:12:37 mattias
added more Delphi win32 compatibility functions
Revision 1.43 2002/12/17 12:04:30 mattias Revision 1.43 2002/12/17 12:04:30 mattias
reduced flickering of hints reduced flickering of hints

View File

@ -228,7 +228,6 @@ procedure TCustomEdit.SetEchoMode(Val : TEchoMode);
begin begin
if (Val <> FEchoMode) then begin if (Val <> FEchoMode) then begin
FEchoMode:= Val; FEchoMode:= Val;
writeln('TCustomEdit.SetEchoMode ',FEchoMode=emPassword,' ',HandleAllocated);
if HandleAllocated then if HandleAllocated then
CNSendMessage(LM_SETPROPERTIES, Self, nil); CNSendMessage(LM_SETPROPERTIES, Self, nil);
end; end;
@ -310,6 +309,9 @@ end;
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.16 2002/12/27 17:12:37 mattias
added more Delphi win32 compatibility functions
Revision 1.15 2002/12/22 23:25:34 mattias Revision 1.15 2002/12/22 23:25:34 mattias
fixed setting TEdit properties after creating handle fixed setting TEdit properties after creating handle

View File

@ -130,7 +130,7 @@ end;
function TCustomListBox.GetTopIndex: Integer; function TCustomListBox.GetTopIndex: Integer;
begin begin
if HandleAllocated then if HandleAllocated then
FTopIndex:=CNSendMessage(LB_GETTOPINDEX, Self, nil); FTopIndex:=CNSendMessage(LM_LB_GETTOPINDEX, Self, nil);
Result := FTopIndex; Result := FTopIndex;
end; end;
@ -139,10 +139,9 @@ end;
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
procedure TCustomListBox.SetTopIndex(const AValue: Integer); procedure TCustomListBox.SetTopIndex(const AValue: Integer);
begin begin
if FTopIndex=AValue then exit;
FTopIndex:=AValue; FTopIndex:=AValue;
if HandleAllocated then if HandleAllocated then
CNSendMessage(LB_SETTOPINDEX, Self, Pointer(FTopIndex)); CNSendMessage(LM_LB_SETTOPINDEX, Self, Pointer(FTopIndex));
end; end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------

View File

@ -23,11 +23,7 @@
} }
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
Method: TCustomRadioGroup.Create constructor TCustomPanel.Create (AOwner : TComponent);
Params: AOwner: the owner of the class
Returns: Nothing
Constructor for the radiogroup
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
constructor TCustomPanel.Create (AOwner : TComponent); constructor TCustomPanel.Create (AOwner : TComponent);
begin begin

View File

@ -1,3 +1,5 @@
// included by forms.pp
{****************************************************************************** {******************************************************************************
TScreen TScreen
****************************************************************************** ******************************************************************************
@ -259,13 +261,21 @@ begin
end; end;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
Function: TScreen.MyFunction procedure TScreen.UpdateLastActive;
Params: AOwner: the owner of the class
Returns: String containing output from the function.
Description of the function for the class.
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
{function TScreen.MyFunction(AOwner: TComponent): String; procedure TScreen.UpdateLastActive;
begin begin
if FLastActiveCustomForm <> FActiveCustomForm then
begin
FLastActiveCustomForm := FActiveCustomForm;
if Assigned(FOnActiveFormChange) then FOnActiveFormChange(Self);
end;
if FLastActiveControl <> FActiveControl then
begin
FLastActiveControl := FActiveControl;
if Assigned(FOnActiveControlChange) then FOnActiveControlChange(Self);
end;
end;
// included by forms.pp
end;}

View File

@ -58,6 +58,7 @@ var
ScrollInfo: TScrollInfo; ScrollInfo: TScrollInfo;
begin begin
inherited CreateWnd; inherited CreateWnd;
if not HandleAllocated then RaiseGDBException('TScrollBar.CreateWnd HandleAllocated=false');
SetScrollRange(Handle, SB_CTL, FMin, FMax, False); SetScrollRange(Handle, SB_CTL, FMin, FMax, False);
ScrollInfo.cbSize := SizeOf(ScrollInfo); ScrollInfo.cbSize := SizeOf(ScrollInfo);
ScrollInfo.nPage := FPageSize; ScrollInfo.nPage := FPageSize;
@ -108,6 +109,7 @@ begin
Change; Change;
end; end;
if HandleAllocated then
CNSendMEssage(LM_SetProperties,self,nil); CNSendMEssage(LM_SetProperties,self,nil);
end; end;

View File

@ -1275,9 +1275,9 @@ End;
Retrieves the x-coordinates and y-coordinates of the window origin for the Retrieves the x-coordinates and y-coordinates of the window origin for the
specified device context. specified device context.
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
Function TWin32Object.GetWindowOrgEx(DC: HDC; Var P: TPoint): Integer; Function TWin32Object.GetWindowOrgEx(DC: HDC; P: PPoint): Integer;
Begin Begin
Result := Integer(Windows.GetWindowOrgEx(DC, @P)); Result := Integer(Windows.GetWindowOrgEx(DC, P));
End; End;
{------------------------------------------------------------------------------ {------------------------------------------------------------------------------
@ -2266,6 +2266,9 @@ end;
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.27 2002/12/27 17:12:38 mattias
added more Delphi win32 compatibility functions
Revision 1.26 2002/12/26 11:00:15 mattias Revision 1.26 2002/12/26 11:00:15 mattias
added included by to unitinfo and a few win32 functions added included by to unitinfo and a few win32 functions

View File

@ -98,7 +98,7 @@ Function GetTextColor(DC: HDC): TColorRef; Override;
Function GetTextExtentPoint(DC: HDC; Str: PChar; Count: Integer; Var Size: TSize): Boolean; Override; Function GetTextExtentPoint(DC: HDC; Str: PChar; Count: Integer; Var Size: TSize): Boolean; Override;
Function GetTextMetrics(DC: HDC; Var TM: TTextMetric): Boolean; Override; Function GetTextMetrics(DC: HDC; Var TM: TTextMetric): Boolean; Override;
Function GetWindowLong(Handle: HWND; Int: Integer): LongInt; Override; Function GetWindowLong(Handle: HWND; Int: Integer): LongInt; Override;
Function GetWindowOrgEx(DC: HDC; Var P: TPoint): Integer; Override; Function GetWindowOrgEx(DC: HDC; P: PPoint): Integer; Override;
Function GetWindowRect(Handle: HWND; Var Rect: TRect): Integer; Override; Function GetWindowRect(Handle: HWND; Var Rect: TRect): Integer; Override;
Function GetWindowSize(Handle : hwnd; var Width, Height: integer): boolean; override; Function GetWindowSize(Handle : hwnd; var Width, Height: integer): boolean; override;
@ -170,6 +170,9 @@ Procedure DeleteCriticalSection(var CritSection: TCriticalSection); Override;
{ ============================================================================= { =============================================================================
$Log$ $Log$
Revision 1.19 2002/12/27 17:12:38 mattias
added more Delphi win32 compatibility functions
Revision 1.18 2002/12/26 11:00:15 mattias Revision 1.18 2002/12/26 11:00:15 mattias
added included by to unitinfo and a few win32 functions added included by to unitinfo and a few win32 functions

View File

@ -35,6 +35,7 @@ the Delphi Windows unit. This is only done for compatibiltiy.
} }
unit LCLType; unit LCLType;
{$mode objfpc}{$H+} {$mode objfpc}{$H+}
interface interface
@ -1317,6 +1318,17 @@ const
WINDING = 2; WINDING = 2;
POLYFILL_LAST = 2; POLYFILL_LAST = 2;
{ StretchBlt() Modes }
BLACKONWHITE = 1;
WHITEONBLACK = 2;
COLORONCOLOR = 3;
HALFTONE = 4;
MAXSTRETCHBLTMODE = 4;
{ constants for CreateDIBitmap }
CBM_INIT = 4; { initialize bitmap }
type type
TFarProc = Pointer; TFarProc = Pointer;
@ -1759,6 +1771,9 @@ end.
{ {
$Log$ $Log$
Revision 1.31 2002/12/27 17:12:37 mattias
added more Delphi win32 compatibility functions
Revision 1.30 2002/12/25 13:30:36 mattias Revision 1.30 2002/12/25 13:30:36 mattias
added more windows funcs and fixed jump to compiler error end of file added more windows funcs and fixed jump to compiler error end of file

View File

@ -32,7 +32,6 @@ interface
uses Classes, SysUtils, vclGlobals, LCLType, GraphType; uses Classes, SysUtils, vclGlobals, LCLType, GraphType;
const const
//------------- //-------------
// Commands SENT TO the interface units // Commands SENT TO the interface units
// add also a description to a message at the end of this unit // add also a description to a message at the end of this unit
@ -142,10 +141,95 @@ const
LM_NB_Last = LM_NB_UpdateTab; LM_NB_Last = LM_NB_UpdateTab;
// TListBox // TListBox
LB_First = LM_NB_Last +1; LM_LB_First = LM_NB_Last +1;
LB_GETTOPINDEX = LB_First +1; LM_LB_GETTOPINDEX = LM_LB_First +1;
LB_SETTOPINDEX = LB_First +2; LM_LB_SETTOPINDEX = LM_LB_First +2;
LB_Last = LB_SETTOPINDEX; LM_LB_Last = LM_LB_SETTOPINDEX;
//-------------
// lcl messages
//
// This should be a list of LCL specific messages
// RECEIVED from the interface, here are no defines
// of messages send to the interface
//-------------
LM_USER = $400; // MWE: changed from $100 to $400 since they were in the windows range
WM_USER = LM_USER;
LM_DESTROY = LM_User+2;
LM_ACTIVATEITEM = LM_User+4;
LM_CHANGED = LM_User+5;
LM_FOCUS = LM_User+6;
LM_CLICKED = LM_User+7;
LM_PRESSED = LM_User+8;
LM_RELEASED = LM_User+9;
LM_MOVECURSOR = LM_User+10;
LM_ENTER = LM_User+11;
LM_LEAVE = LM_User+12;
//LM_SIZEALLOCATE = LM_User+13;
LM_CHECKRESIZE = LM_User+14;
//LM_SHOW = LM_User+15; // Windows Compatability
LM_INSERTTEXT = LM_User+16;
LM_DELETETEXT = LM_User+17;
LM_SETEDITABLE = LM_User+18;
LM_MOVEWORD = LM_User+19;
LM_MOVEPAGE = LM_User+20;
LM_MOVETOROW = LM_User+21;
LM_MOVETOCOLUMN = LM_User+22;
LM_KILLCHAR = LM_User+23;
LM_KILLWORD = LM_User+24;
LM_KILLLINE = LM_User+25;
LM_CUTTOCLIP = LM_User+26;
LM_COPYTOCLIP = LM_User+27;
LM_PASTEFROMCLIP = LM_User+28;
//LM_MOVERESIZE = LM_User+29;
LM_EXPOSEEVENT = LM_User+30;
LM_CONFIGUREEVENT = LM_User+31;
//LM_DRAW = LM_User+32; //LM_DRAW and LM_PAINT are the same.
LM_PAINT = LM_User+32;
LM_SHOWMODAL = LM_USER+33;
LM_SETFILTER = LM_USER+34;
LM_SETFILENAME = LM_USER+35;
LM_OK_CLICKED = LM_USER+36;
LM_CANCEL_CLICKED = LM_USER+37;
//LM_KEYDOWN = LM_User+38; // Windows Compatability
//LM_KEYUP = LM_USER+39; // Windows Compatability
LM_TIMER = LM_USER+40;
//LM_MOUSEBTNPRESS = LM_USER+41;
//LM_MOUSEBTNRELEASE = LM_USER+42;
LM_EXIT = LM_USER+60;
LM_SCREENINIT = LM_USER+61;
LM_CLOSEQUERY = LM_USER+62;
LM_DRAGSTART = LM_USER+63;
LM_DEACTIVATE = LM_USER+64; //used when a form is no longer in front
LM_MONTHCHANGED = LM_USER+65;
LM_YEARCHANGED = LM_USER+66;
LM_DAYCHANGED = LM_USER+67;
LM_MOUSEFIRST2 = LM_USER+68;
LM_LBUTTONTRIPLECLK = LM_USER+68;
LM_LBUTTONQUADCLK = LM_USER+69;
LM_MBUTTONTRIPLECLK = LM_USER+70;
LM_MBUTTONQUADCLK = LM_USER+71;
LM_RBUTTONTRIPLECLK = LM_USER+72;
LM_RBUTTONQUADCLK = LM_USER+73;
LM_MOUSEENTER = LM_USER+74;
LM_MOUSELEAVE = LM_USER+75;
LM_MOUSELAST2 = LM_RBUTTONQUADCLK;
LM_GRABFOCUS = LM_USER+79;
LM_DRAWLISTITEM = LM_User+80;
LM_INTERNALPAINT = LM_User + 90;
// these IDs are reserved for internal messages in the interfaces
LM_INTERFACEFIRST = LM_User+99;
LM_INTERFACELAST = LM_User+199;
LM_UNKNOWN = LM_INTERFACELAST+1;
//------------- //-------------
//end of messages that are sent to the interface //end of messages that are sent to the interface
@ -272,89 +356,6 @@ const
//------------- //-------------
//-------------
// lcl messages
//
// This should be a list of LCL specific messages
// RECEIVED from the interface, here are no defines
// of messages send to the interface
//-------------
LM_USER = $400; // MWE: changed from $100 to $400 since they were in the windows range
WM_USER = LM_USER;
LM_DESTROY = LM_User+2;
LM_ACTIVATEITEM = LM_User+4;
LM_CHANGED = LM_User+5;
LM_FOCUS = LM_User+6;
LM_CLICKED = LM_User+7;
LM_PRESSED = LM_User+8;
LM_RELEASED = LM_User+9;
LM_MOVECURSOR = LM_User+10;
LM_ENTER = LM_User+11;
LM_LEAVE = LM_User+12;
//LM_SIZEALLOCATE = LM_User+13;
LM_CHECKRESIZE = LM_User+14;
//LM_SHOW = LM_User+15; // Windows Compatability
LM_INSERTTEXT = LM_User+16;
LM_DELETETEXT = LM_User+17;
LM_SETEDITABLE = LM_User+18;
LM_MOVEWORD = LM_User+19;
LM_MOVEPAGE = LM_User+20;
LM_MOVETOROW = LM_User+21;
LM_MOVETOCOLUMN = LM_User+22;
LM_KILLCHAR = LM_User+23;
LM_KILLWORD = LM_User+24;
LM_KILLLINE = LM_User+25;
LM_CUTTOCLIP = LM_User+26;
LM_COPYTOCLIP = LM_User+27;
LM_PASTEFROMCLIP = LM_User+28;
//LM_MOVERESIZE = LM_User+29;
LM_EXPOSEEVENT = LM_User+30;
LM_CONFIGUREEVENT = LM_User+31;
//LM_DRAW = LM_User+32; //LM_DRAW and LM_PAINT are the same.
LM_PAINT = LM_User+32;
LM_SHOWMODAL = LM_USER+33;
LM_SETFILTER = LM_USER+34;
LM_SETFILENAME = LM_USER+35;
LM_OK_CLICKED = LM_USER+36;
LM_CANCEL_CLICKED = LM_USER+37;
//LM_KEYDOWN = LM_User+38; // Windows Compatability
//LM_KEYUP = LM_USER+39; // Windows Compatability
LM_TIMER = LM_USER+40;
//LM_MOUSEBTNPRESS = LM_USER+41;
//LM_MOUSEBTNRELEASE = LM_USER+42;
LM_EXIT = LM_USER+60;
LM_SCREENINIT = LM_USER+61;
LM_CLOSEQUERY = LM_USER+62;
LM_DRAGSTART = LM_USER+63;
LM_DEACTIVATE = LM_USER+64; //used when a form is no longer in front
LM_MONTHCHANGED = LM_USER+65;
LM_YEARCHANGED = LM_USER+66;
LM_DAYCHANGED = LM_USER+67;
LM_MOUSEFIRST2 = LM_USER+68;
LM_LBUTTONTRIPLECLK = LM_USER+68;
LM_LBUTTONQUADCLK = LM_USER+69;
LM_MBUTTONTRIPLECLK = LM_USER+70;
LM_MBUTTONQUADCLK = LM_USER+71;
LM_RBUTTONTRIPLECLK = LM_USER+72;
LM_RBUTTONQUADCLK = LM_USER+73;
LM_MOUSEENTER = LM_USER+74;
LM_MOUSELEAVE = LM_USER+75;
LM_MOUSELAST2 = LM_RBUTTONQUADCLK;
LM_GRABFOCUS = LM_USER+79;
LM_DRAWLISTITEM = LM_User+80;
LM_INTERNALPAINT = LM_User + 90;
// these IDs are reserved for internal messages in the interfaces
LM_INTERFACEFIRST = LM_User+99;
LM_INTERFACELAST = LM_User+199;
LM_UNKNOWN = LM_INTERFACELAST+1;
type type
UINT = LongWord; UINT = LongWord;
@ -831,8 +832,14 @@ Implementation
function GetMessageName(const AMessage: Integer): String; function GetMessageName(const AMessage: Integer): String;
begin begin
case AMessage of case AMessage of
//-------------
// Commands SENT TO the interface units
// add also a description to a message at the end of this unit
// here are no defines of message records sent to the interface
// These are declared in a later section
//-------------
LM_ComUser :Result:='LM_ComUser';
LM_Create :Result:='LM_Create'; LM_Create :Result:='LM_Create';
LM_Destroy : Result :='LM_Destroy ';
LM_SetLabel :Result:='LM_SetLabel'; LM_SetLabel :Result:='LM_SetLabel';
LM_SetLeft :Result:='LM_SetLeft'; LM_SetLeft :Result:='LM_SetLeft';
LM_SetTop :Result:='LM_SetTop'; LM_SetTop :Result:='LM_SetTop';
@ -846,7 +853,7 @@ begin
LM_SetName :Result:='LM_SetName'; LM_SetName :Result:='LM_SetName';
LM_RESIZECHILDREN :Result:='LM_RESIZECHILDREN'; LM_RESIZECHILDREN :Result:='LM_RESIZECHILDREN';
LM_ShowHide :Result:='LM_ShowHide'; LM_ShowHide :Result:='LM_ShowHide';
LM_AddPAge : Result :='LM_AddPAge '; LM_AddPage :Result:='LM_AddPage';
LM_GetLineCount :Result:='LM_GetLineCount'; LM_GetLineCount :Result:='LM_GetLineCount';
LM_SETTEXT :Result:='LM_SETTEXT'; LM_SETTEXT :Result:='LM_SETTEXT';
LM_GETTEXT :Result:='LM_GETTEXT'; LM_GETTEXT :Result:='LM_GETTEXT';
@ -859,39 +866,173 @@ begin
LM_Invalidate :Result:='LM_Invalidate'; LM_Invalidate :Result:='LM_Invalidate';
LM_SetPixel :Result:='LM_SetPixel'; LM_SetPixel :Result:='LM_SetPixel';
LM_GetPixel :Result:='LM_GetPixel'; LM_GetPixel :Result:='LM_GetPixel';
LM_SETPROPERTIES :Result:='LM_SETPROPERTIES'; LM_SETPROPERTIES :Result:='LM_SETPROPERTIES';
LM_SETVALUE :Result:='LM_SETVALUE'; LM_SETVALUE :Result:='LM_SETVALUE';
LM_GETVALUE :Result:='LM_GETVALUE'; LM_GETVALUE :Result:='LM_GETVALUE';
LM_ATTACHMENU :Result:='LM_ATTACHMENU'; LM_ATTACHMENU :Result:='LM_ATTACHMENU';
LM_TB_BUTTONCOUNT :Result:='LM_TB_BUTTONCOUNT'; LM_TB_BUTTONCOUNT :Result:='LM_TB_BUTTONCOUNT';
LM_INSERTTOOLBUTTON :Result:='LM_INSERTTOOLBUTTON'; LM_INSERTTOOLBUTTON :Result:='LM_INSERTTOOLBUTTON';
LM_DELETETOOLBUTTON :Result:='LM_DELETETOOLBUTTON'; LM_DELETETOOLBUTTON :Result:='LM_DELETETOOLBUTTON';
LM_SetCursor : Result :='LM_SetCursor ';
//LM_SetCursor :Result:='LM_SetCursor'; a LM_ComUser+48; We define this later for Windows compatability.
LM_IMAGECHANGED :Result:='LM_IMAGECHANGED'; LM_IMAGECHANGED :Result:='LM_IMAGECHANGED';
LM_LAYOUTCHANGED :Result:='LM_LAYOUTCHANGED'; LM_LAYOUTCHANGED :Result:='LM_LAYOUTCHANGED';
LM_BTNDEFAULT_CHANGED :Result:='LM_BTNDEFAULT_CHANGED'; LM_BTNDEFAULT_CHANGED :Result:='LM_BTNDEFAULT_CHANGED';
LM_LOADXPM :Result:='LM_LOADXPM'; LM_LOADXPM :Result:='LM_LOADXPM';
LM_DRAGINFOCHANGED :Result:='LM_DRAGINFOCHANGED'; LM_DRAGINFOCHANGED :Result:='LM_DRAGINFOCHANGED';
//LM_SETENABLED :Result:='LM_SETENABLED'; //LM_SETENABLED :Result:='LM_SETENABLED';
LM_BRINGTOFRONT :Result:='LM_BRINGTOFRONT'; LM_BRINGTOFRONT :Result:='LM_BRINGTOFRONT';
LM_CB_GETCOUNT : Result :='LM_CB_GETCOUNT '; LM_POPUPSHOW :Result:='LM_POPUPSHOW';
LM_RECREATEWND :Result:='LM_RECREATEWND';
LM_SETFORMICON :Result:='LM_SETFORMICON'; LM_SETFORMICON :Result:='LM_SETFORMICON';
LM_MINIMIZE :Result:='LM_MINIMIZE';
LM_SETDESIGNING :Result:='LM_SETDESIGNING';
LM_SETSHORTCUT :Result:='LM_SETSHORTCUT'; LM_SETSHORTCUT :Result:='LM_SETSHORTCUT';
LM_SETGEOMETRY :Result:='LM_SETGEOMETRY'; LM_SETGEOMETRY :Result:='LM_SETGEOMETRY';
LM_GETITEMS :Result:='LM_GETITEMS'; LM_GETITEMS :Result:='LM_GETITEMS';
LM_GETITEMINDEX :Result:='LM_GETITEMINDEX'; LM_GETITEMINDEX :Result:='LM_GETITEMINDEX';
LM_SETITEMINDEX :Result:='LM_SETITEMINDEX'; LM_SETITEMINDEX :Result:='LM_SETITEMINDEX';
LM_GETSELTEXT :Result:='LM_GETSELTEXT';
LM_SETSELTEXT :Result:='LM_SETSELTEXT';
LM_GETSELSTART :Result:='LM_GETSELSTART';
LM_SETSELSTART :Result:='LM_SETSELSTART';
LM_GETSELLEN :Result:='LM_GETSELLEN';
LM_SETSELLEN :Result:='LM_SETSELLEN';
LM_GETLIMITTEXT :Result:='LM_GETLIMITTEXT';
LM_SETLIMITTEXT :Result:='LM_SETLIMITTEXT';
LM_SORT :Result:='LM_SORT'; LM_SORT :Result:='LM_SORT';
LM_GETSELCOUNT :Result:='LM_GETSELCOUNT';
LM_GETSEL :Result:='LM_GETSEL';
LM_SETSEL :Result:='LM_SETSEL';
LM_SETSELMODE :Result:='LM_SETSELMODE'; LM_SETSELMODE :Result:='LM_SETSELMODE';
LM_SETBORDER :Result:='LM_SETBORDER'; LM_SETBORDER :Result:='LM_SETBORDER';
LM_SCREENINIT : Result :='LM_SCREENINIT ';
// additional for TNoteBook // TListView
//LM_LV_FIRST :Result:='LM_LV_FIRST';
LM_LV_ADDITEM :Result:='LM_LV_ADDITEM';
LM_LV_CHANGEITEM :Result:='LM_LV_CHANGEITEM';
LM_LV_DELETEITEM :Result:='LM_LV_DELETEITEM';
LM_LV_SELECTITEM :Result:='LM_LV_SELECTITEM';
//LM_LV_LAST :Result:='LM_LV_LAST';
// TComboBox
//LM_CB_FIRST :Result:='LM_CB_FIRST';
LM_CB_GETCOUNT :Result:='LM_CB_GETCOUNT';
LM_CB_GETTEXT :Result:='LM_CB_GETTEXT';
LM_CB_ADDTEXT :Result:='LM_CB_ADDTEXT';
//LM_CB_LAST :Result:='LM_CB_LAST';
// TNoteBook
//LM_NB_First :Result:='LM_NB_First';
LM_NB_UpdateTab :Result:='LM_NB_UpdateTab'; LM_NB_UpdateTab :Result:='LM_NB_UpdateTab';
//LM_NB_Last :Result:='LM_NB_Last';
// TListBox
//LM_LB_First :Result:='LM_B_First';
LM_LB_GETTOPINDEX :Result:='LM_LB_GETTOPINDEX';
LM_LB_SETTOPINDEX :Result:='LM_LB_SETTOPINDEX';
//LM_LB_Last :Result:='LM_LB_Last';
//-------------
// lcl messages
//
// This should be a list of LCL specific messages
// RECEIVED from the interface, here are no defines
// of messages send to the interface
//-------------
LM_USER :Result:='LM_USER';
//WM_USER :Result:='';
LM_DESTROY :Result:='LM_DESTROY';
LM_ACTIVATEITEM :Result:='LM_ACTIVATEITEM';
LM_CHANGED :Result:='LM_CHANGED';
LM_FOCUS :Result:='LM_FOCUS';
LM_CLICKED :Result:='LM_CLICKED';
LM_PRESSED :Result:='LM_PRESSED';
LM_RELEASED :Result:='LM_RELEASED';
LM_MOVECURSOR :Result:='LM_MOVECURSOR';
LM_ENTER :Result:='LM_ENTER';
LM_LEAVE :Result:='LM_LEAVE';
//LM_SIZEALLOCATE :Result:='LM_SIZEALLOCATE';
LM_CHECKRESIZE :Result:='LM_CHECKRESIZE';
//LM_SHOW :Result:='LM_SHOW';
LM_INSERTTEXT :Result:='LM_INSERTTEXT';
LM_DELETETEXT :Result:='LM_DELETETEXT';
LM_SETEDITABLE :Result:='LM_SETEDITABLE';
LM_MOVEWORD :Result:='LM_MOVEWORD';
LM_MOVEPAGE :Result:='LM_MOVEPAGE';
LM_MOVETOROW :Result:='LM_MOVETOROW';
LM_MOVETOCOLUMN :Result:='LM_MOVETOCOLUMN';
LM_KILLCHAR :Result:='LM_KILLCHAR';
LM_KILLWORD :Result:='LM_KILLWORD';
LM_KILLLINE :Result:='LM_KILLLINE';
LM_CUTTOCLIP :Result:='LM_CUTTOCLIP';
LM_COPYTOCLIP :Result:='LM_COPYTOCLIP';
LM_PASTEFROMCLIP :Result:='LM_PASTEFROMCLIP';
//LM_MOVERESIZE :Result:='LM_MOVERESIZE';
LM_EXPOSEEVENT :Result:='LM_EXPOSEEVENT';
LM_CONFIGUREEVENT :Result:='LM_CONFIGUREEVENT';
//LM_DRAW :Result:='LM_DRAW';
LM_PAINT :Result:='LM_PAINT';
LM_SHOWMODAL :Result:='LM_SHOWMODAL';
LM_SETFILTER :Result:='LM_SETFILTER';
LM_SETFILENAME :Result:='LM_SETFILENAME';
LM_OK_CLICKED :Result:='LM_OK_CLICKED';
LM_CANCEL_CLICKED :Result:='LM_CANCEL_CLICKED';
//LM_KEYDOWN :Result:='LM_KEYDOWN';
//LM_KEYUP :Result:='LM_KEYUP';
LM_TIMER :Result:='LM_TIMER';
//LM_MOUSEBTNPRESS :Result:='LM_MOUSEBTNPRESS';
//LM_MOUSEBTNRELEASE :Result:='LM_MOUSEBTNRELEASE';
LM_EXIT :Result:='LM_EXIT';
LM_SCREENINIT :Result:='LM_SCREENINIT';
LM_CLOSEQUERY :Result:='LM_CLOSEQUERY';
LM_DRAGSTART :Result:='LM_DRAGSTART';
LM_DEACTIVATE :Result:='LM_DEACTIVATE';
LM_MONTHCHANGED :Result:='LM_MONTHCHANGED';
LM_YEARCHANGED :Result:='LM_YEARCHANGED';
LM_DAYCHANGED :Result:='LM_DAYCHANGED';
//LM_MOUSEFIRST2 :Result:='';
LM_LBUTTONTRIPLECLK :Result:='LM_LBUTTONTRIPLECLK';
LM_LBUTTONQUADCLK :Result:='LM_LBUTTONQUADCLK';
LM_MBUTTONTRIPLECLK :Result:='LM_MBUTTONTRIPLECLK';
LM_MBUTTONQUADCLK :Result:='LM_MBUTTONQUADCLK';
LM_RBUTTONTRIPLECLK :Result:='LM_RBUTTONTRIPLECLK';
LM_RBUTTONQUADCLK :Result:='LM_RBUTTONQUADCLK';
LM_MOUSEENTER :Result:='LM_MOUSEENTER';
LM_MOUSELEAVE :Result:='LM_MOUSELEAVE';
//LM_MOUSELAST2 :Result:='';
LM_GRABFOCUS :Result:='LM_GRABFOCUS';
LM_DRAWLISTITEM :Result:='LM_DRAWLISTITEM';
LM_INTERNALPAINT :Result:='LM_INTERNALPAINT';
// these IDs are reserved for internal messages in the interfaces
LM_INTERFACEFIRST :Result:='LM_INTERFACEFIRST';
LM_INTERFACELAST :Result:='LM_INTERFACELAST';
LM_UNKNOWN :Result:='LM_UNKNOWN';
else else
Result := Format('Unknown message 0x%x (%d)', [AMessage, AMessage]); Result := Format('Unknown message 0x%x (%d)', [AMessage, AMessage]);
end; end;
Result := Trim(Result); Result := Trim(Result);
end; end;
@ -899,6 +1040,9 @@ end.
{ {
$Log$ $Log$
Revision 1.44 2002/12/27 17:12:37 mattias
added more Delphi win32 compatibility functions
Revision 1.43 2002/12/27 08:46:32 mattias Revision 1.43 2002/12/27 08:46:32 mattias
changes for fpc 1.1 changes for fpc 1.1