mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 19:29:34 +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);
|
||||
Ext := ExtractFileExt(Result);
|
||||
If Ext <> '' then
|
||||
Delete(Result, Length(Result) - Length(Ext) - 1, Length(Ext) + 1);
|
||||
Delete(Result, Length(Result) - Length(Ext) + 1, Length(Ext));
|
||||
end
|
||||
else
|
||||
Result := FTitle;
|
||||
@ -1098,6 +1098,9 @@ end;
|
||||
{ =============================================================================
|
||||
|
||||
$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
|
||||
added TApplication.CaptureExceptions
|
||||
|
||||
|
@ -22,6 +22,35 @@
|
||||
{ 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
|
||||
Params: Window - The window with the property
|
||||
@ -609,6 +638,9 @@ end;
|
||||
|
||||
{
|
||||
$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
|
||||
fixed double messages SETLabel
|
||||
|
||||
|
@ -666,9 +666,11 @@ activate_time : the time at which the activation event occurred.
|
||||
Finally
|
||||
StrDispose(PStr);
|
||||
End;
|
||||
End;
|
||||
SetWindowLong(Handle, GWL_STYLE, GetWindowLong(Handle, GWL_Style) Or WS_DLGFRAME);
|
||||
ShowWindow(Handle, SW_Show);
|
||||
End
|
||||
Else begin
|
||||
EnumThreadWindows(GetWindowThreadProcessId(Handle,nil),@DisableWindowsProc, Handle);
|
||||
ShowWindow(Handle, SW_Show);
|
||||
end;
|
||||
End;
|
||||
LM_TB_BUTTONCOUNT:
|
||||
Begin
|
||||
@ -2194,6 +2196,9 @@ Begin
|
||||
Else
|
||||
Begin
|
||||
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);
|
||||
End;
|
||||
End;
|
||||
@ -2729,6 +2734,9 @@ End;
|
||||
|
||||
{
|
||||
$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
|
||||
* Fixed LM_APPENDTEXT buffer overrun
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user