mirror of
https://github.com/VincentWei/MiniGUI.git
synced 2026-09-26 20:45:36 +08:00
use WS_EX_DIALOGBOX style for IsDialog() instead of sending message to window procedure
This commit is contained in:
@@ -194,6 +194,9 @@ int GUIAPI DialogBoxIndirectParamEx (PDLGTEMPLATE pDlgTemplate,
|
||||
if (hDlg == HWND_INVALID)
|
||||
return -1;
|
||||
|
||||
/* Since 5.0.0: use internal extended style for dialgbox */
|
||||
IncludeWindowExStyle (hDlg, WS_EX_DIALOGBOX);
|
||||
|
||||
//MiniGUI maybe change dialog owner in CreateMainWindow, so we
|
||||
//should update its owner by GetHosting.
|
||||
hOwner = GetHosting (hDlg);
|
||||
|
||||
@@ -2928,7 +2928,17 @@ BOOL GUIAPI IsControl (HWND hWnd)
|
||||
|
||||
BOOL GUIAPI IsDialog (HWND hWnd)
|
||||
{
|
||||
#if 0 /* Since 5.0.0: use the internal extended style WS_EX_DIALOGBOX */
|
||||
return (BOOL)SendAsyncMessage (hWnd, MSG_ISDIALOG, 0, 0);
|
||||
#else /* deprecated code */
|
||||
PMAINWIN pWin;
|
||||
|
||||
MG_CHECK_RET (MG_IS_MAIN_WINDOW(hWnd), FALSE);
|
||||
|
||||
pWin = MG_GET_WINDOW_PTR(hWnd);
|
||||
|
||||
return (pWin->dwExStyle & WS_EX_DIALOGBOX);
|
||||
#endif /* Since 5.0.0: use the internal extended style WS_EX_DIALOGBOX */
|
||||
}
|
||||
|
||||
HWND GUIAPI GetMainWindowHandle (HWND hWnd)
|
||||
|
||||
Reference in New Issue
Block a user