WS_EX_TRANSPARENT Specifies that a window created with this style is to be transparent. That is, any windows that are beneath the window are not obscured by the window. A window created with this style receives WM_PAINT messages only after all sibling windows beneath it have been updated.
SetLayeredWindowAttributes 等函数
回复人: nnue12 (书童) 2008-4-15 14:12:21
Re:SetLayeredWindowAttributes 等函数
这个函数是设置窗口透明用的,虽然也可以实现不接收鼠标消息但窗口也不见了 回复人: carr123 (秀才) 2008-4-15 14:13:22
透明度设置得恰当不就不透明了?
回复人: nnue12 (书童) 2008-4-15 14:15:32
Re:透明度设置得恰当不就不透明了?
完全透明才不接收鼠标消息,半透明的话还是会拦截鼠标消息的 回复人: carr123 (秀才) 2008-4-15 14:23:22
颜色透明与鼠标击空是可独立设置的。 不耦合。
回复人: nnue12 (书童) 2008-4-15 14:29:39
Re:颜色透明与鼠标击空是可独立设置的。 不耦合。
问题是怎么独立设,你说的函数只是设置窗口透明用的,不接收鼠标消息只是设置完全透明时附带的效果
dwNewLong |= WS_EX_TRANSPARENT |WS_EX_LAYERED;
SetWindowLong(hwnd, GWL_EXSTYLE, dwNewLong);