|
窗口_消息循环_对话框 | | |
|
窗口句柄 | 整数型 | | | |
父窗口句柄 | 整数型 | | | |
如果真 (父窗口句柄 ≠ 0
)
SendMessageW (父窗口句柄,
#WM_MOUSELEAVE, 0, 0
)
判断循环首 (IsWindow (窗口句柄
))

如果 (GetMessageW (Msg, 0, 0, 0
) = 0
) 
跳出循环 ()

如果真 (Msg.hwnd ≠ 窗口句柄
)

如果真 (Msg.message > 254
且 Msg.message < 264
或 Msg.message > 511
且 Msg.message < 526
)


如果真 (Msg.message = 513
或 Msg.message = 515
或 Msg.message = 516
或 Msg.message = 518
或 Msg.message = 519
或 Msg.message = 521
或 Msg.message = 523
或 Msg.message = 525
)


SendMessageW (Msg.hwnd,
#WM_SYSCHAR, 0, 0
) 








SetTopWindow (窗口句柄
)

到循环尾 ()


TranslateMessage (Msg)
DispatchMessageW (Msg
)

判断循环尾 ()变量名 | 类 型 | 静态 | 数组 | 备 注 |
hForeWnd | 整数型 | | |
dwForeID | 整数型 | | |
dwCurID | 整数型 | | |
hForeWnd =
GetForegroundWindow ()dwForeID =
GetWindowThreadProcessId (hWnd, 0
)dwCurID =
GetCurrentThreadId ()AttachThreadInput (dwCurID, dwForeID,
真)ShowWindow (hWnd,
#SW_SHOWNORMAL )SetForegroundWindow (hWnd
)AttachThreadInput (dwCurID, dwForeID,
假)返回 (真)