利用SendMessage()如何使窗口完全透明化?请不吝指教!
我已获得句柄利用如下消息:::SendMessage(m_mainHwnd, WM_STYLECHANGED, GWL_EXSTYLE^0x80000, NULL);如何准确付参。
我已获得句柄利用如下消息:::SendMessage(m_mainHwnd, WM_STYLECHANGED, GWL_EXSTYLE^0x80000, NULL);如何准确付参。
typedef BOOL (WINAPI *lpfnSetLayeredWindowAttributes)(HWND hWnd,
COLORREF crKey,
BYTE bAlpha,
DWORD dwFlags); lpfnSetLayeredWindowAttributes SetLayeredWindowAttributes; HMODULE hUser32 = GetModuleHandle("user32.dll");
SetLayeredWindowAttributes = (lpfnSetLayeredWindowAttributes)GetProcAddress(hUser32,
"SetLayeredWindowAttributes"); SetWindowLong(GetSafeHwnd(),
GWL_EXSTYLE,
GetWindowLong(GetSafeHwnd(),
GWL_EXSTYLE) | WS_EX_LAYERED); SetLayeredWindowAttributes(m_hWnd, 0, 128, LWA_ALPHA); FreeLibrary(hUser32);