SendMessage(hwnd, WM_NCACTIVATE, True, 0)
SendMessage(hwnd, WM_NCACTIVATE, False, 0)
就像IsWindowVisible判斷是否顯示視窗一樣能直接判斷 而不是GetActiveWindow、GetForegroundWindow來判斷
uj5u.com熱心網友回復:
個人意見:視窗是否接受訊息是一個偽命題。
視窗對任何訊息都接收,區別只在于是接收后丟棄、處理后丟棄、處理后再交給默認處理程序處理、……
歡迎樓下大神拍磚。
uj5u.com熱心網友回復:
你沒有明白我的意思 我需要的是判斷視窗接受這個訊息后的狀態,并不是他會不會去接受這個訊息
就是這兩個狀態
SendMessage(hwnd, WM_NCACTIVATE, True, 0)
SendMessage(hwnd, WM_NCACTIVATE, False, 0)
uj5u.com熱心網友回復:
就是用 GetActiveWindow 進行比較判斷。某個視窗是否是活動視窗和它是否回應這兩個訊息無關。
uj5u.com熱心網友回復:
我不是想判斷視窗是否回應或者活動什么的 我問的問題我感覺已經很清楚了 哎 為啥就不能救救我呢
uj5u.com熱心網友回復:
頂一下 看看有沒有大神能給解答一下uj5u.com熱心網友回復:
你發個(手機)短訊息給別人,別人看沒看你沒法知道的。WM_NCACTIVATE 也一樣。
真不知道你在想什么?
uj5u.com熱心網友回復:
就說win7系統吧 別的系統我不知道 接受SendMessage(hwnd, WM_NCACTIVATE, True, 0)訊息的視窗關閉視窗的叉叉是會變紅的
我覺得吧會不會你技識訓不夠,而不是真的不能判斷。可能我是菜鳥,但你自己想想是不是這么回事。這這樣吧,問多了也累。沒人知道我就只能自己研究著吧。
uj5u.com熱心網友回復:
sendmessage有回傳值,了解下回傳值的意義The WM_NCACTIVATE message is sent to a window when its nonclient area needs to be changed to indicate an active or inactive state.
WM_NCACTIVATE
fActive = (BOOL) wParam; // new state of the title bar or icon
Parameters
fActive
Value of wParam. Specifies when a title bar or icon needs to be changed to indicate an active or inactive state. If an active title bar or icon is to be drawn, the fActive parameter is TRUE. It is FALSE for an inactive title bar or icon.
Return Values
When the fActive parameter is FALSE, an application should return TRUE to indicate that Windows should proceed with the default processing, or it should return FALSE to prevent the title bar or icon from being deactivated. When fActive is TRUE, the return value is ignored.
Default Action
The DefWindowProc function draws the title bar or icon title in its active colors when the fActive parameter is TRUE and in its inactive colors when fActive is FALSE.
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/82853.html
標籤:API
上一篇:求大神幫幫忙啊
下一篇:關于如何限定因變數的取值
