mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-18 20:59:08 +02:00
fixed LM_ShowModal for win32 intf from Karl
git-svn-id: trunk@4460 -
This commit is contained in:
parent
9e14920dec
commit
ad6c403825
@ -654,7 +654,7 @@ begin
|
|||||||
Result := ExtractFileName(GetExeName);
|
Result := ExtractFileName(GetExeName);
|
||||||
Ext := ExtractFileExt(Result);
|
Ext := ExtractFileExt(Result);
|
||||||
If Ext <> '' then
|
If Ext <> '' then
|
||||||
Delete(Result, Length(Result) - Length(Ext) - 1, Length(Ext) + 1);
|
Delete(Result, Length(Result) - Length(Ext) + 1, Length(Ext));
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
Result := FTitle;
|
Result := FTitle;
|
||||||
@ -1098,6 +1098,9 @@ end;
|
|||||||
{ =============================================================================
|
{ =============================================================================
|
||||||
|
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.60 2003/08/09 16:30:33 mattias
|
||||||
|
fixed LM_ShowModal for win32 intf from Karl
|
||||||
|
|
||||||
Revision 1.59 2003/07/16 16:53:59 mattias
|
Revision 1.59 2003/07/16 16:53:59 mattias
|
||||||
added TApplication.CaptureExceptions
|
added TApplication.CaptureExceptions
|
||||||
|
|
||||||
|
@ -22,6 +22,35 @@
|
|||||||
{ callback routines }
|
{ callback routines }
|
||||||
{*************************************************************}
|
{*************************************************************}
|
||||||
|
|
||||||
|
{-----------------------------------------------------------------------------
|
||||||
|
Function: DisableWindowsProc
|
||||||
|
Params: Window - handle of toplevel windows to be disabled
|
||||||
|
Data - handle of current window
|
||||||
|
Returns: Whether the enumeration should continue
|
||||||
|
|
||||||
|
Used in LM_SHOWMODAL to disable the windows of applicaion thread except the current
|
||||||
|
-----------------------------------------------------------------------------}
|
||||||
|
Function DisableWindowsProc(Window: Hwnd; Data: LParam): LongBool; StdCall;
|
||||||
|
Begin
|
||||||
|
Result:=true;
|
||||||
|
If Data <> Window Then
|
||||||
|
EnableWindow(Window,False);
|
||||||
|
End;
|
||||||
|
|
||||||
|
{-----------------------------------------------------------------------------
|
||||||
|
Function: EnableWindowsProc
|
||||||
|
Params: Window - handle of toplevel windows to be enabled
|
||||||
|
Data - nothing
|
||||||
|
Returns: Whether the enumeration should continue
|
||||||
|
|
||||||
|
Used in LM_SHOWMODAL to enable the windows of applicaion thread
|
||||||
|
-----------------------------------------------------------------------------}
|
||||||
|
Function EnableWindowsProc(Window: Hwnd; Data: LParam): LongBool; StdCall;
|
||||||
|
Begin
|
||||||
|
Result:=true;
|
||||||
|
EnableWindow(Window,True);
|
||||||
|
End;
|
||||||
|
|
||||||
{-----------------------------------------------------------------------------
|
{-----------------------------------------------------------------------------
|
||||||
Function: PropEnumProc
|
Function: PropEnumProc
|
||||||
Params: Window - The window with the property
|
Params: Window - The window with the property
|
||||||
@ -609,6 +638,9 @@ end;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.46 2003/08/09 16:30:33 mattias
|
||||||
|
fixed LM_ShowModal for win32 intf from Karl
|
||||||
|
|
||||||
Revision 1.45 2003/07/31 19:56:50 mattias
|
Revision 1.45 2003/07/31 19:56:50 mattias
|
||||||
fixed double messages SETLabel
|
fixed double messages SETLabel
|
||||||
|
|
||||||
|
@ -666,9 +666,11 @@ activate_time : the time at which the activation event occurred.
|
|||||||
Finally
|
Finally
|
||||||
StrDispose(PStr);
|
StrDispose(PStr);
|
||||||
End;
|
End;
|
||||||
End;
|
End
|
||||||
SetWindowLong(Handle, GWL_STYLE, GetWindowLong(Handle, GWL_Style) Or WS_DLGFRAME);
|
Else begin
|
||||||
|
EnumThreadWindows(GetWindowThreadProcessId(Handle,nil),@DisableWindowsProc, Handle);
|
||||||
ShowWindow(Handle, SW_Show);
|
ShowWindow(Handle, SW_Show);
|
||||||
|
end;
|
||||||
End;
|
End;
|
||||||
LM_TB_BUTTONCOUNT:
|
LM_TB_BUTTONCOUNT:
|
||||||
Begin
|
Begin
|
||||||
@ -2194,6 +2196,9 @@ Begin
|
|||||||
Else
|
Else
|
||||||
Begin
|
Begin
|
||||||
Assert(False, 'TRACE: [TWin32Object.ShowHide] Hiding the window');
|
Assert(False, 'TRACE: [TWin32Object.ShowHide] Hiding the window');
|
||||||
|
If Sender Is TCustomForm then
|
||||||
|
If fsModal in TCustomForm(Sender).FormState then
|
||||||
|
EnumThreadWindows(GetWindowThreadProcessId(Handle,nil),@EnableWindowsProc, Handle);
|
||||||
ShowWindow(Handle, SW_HIDE);
|
ShowWindow(Handle, SW_HIDE);
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
@ -2729,6 +2734,9 @@ End;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
|
Revision 1.81 2003/08/09 16:30:34 mattias
|
||||||
|
fixed LM_ShowModal for win32 intf from Karl
|
||||||
|
|
||||||
Revision 1.80 2003/07/30 21:56:32 marc
|
Revision 1.80 2003/07/30 21:56:32 marc
|
||||||
* Fixed LM_APPENDTEXT buffer overrun
|
* Fixed LM_APPENDTEXT buffer overrun
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user