QQ2013窗口透明度设置
运行压缩包里程序可以设置QQ2013窗口透明度~ 程序代码如下: bool g_bFirst=true; BYTE m_btAlpha=128; BOOL CALLBACK EnumWindowsProc(HWND hWnd,LPARAM lParam) { if (hWnd==NULL) return FALSE; CHAR szBuf[1000]={0}; GetClassNameA(hWnd, szBuf, 1000); if (strcmp(szBuf, "TXGuiFoundation")==0) { if (g_bFirst) { GetWindowTextA(hWnd, szBuf, 1000); if (szBuf[0]=='Q' && szBuf[1]=='Q') { ShowWindow(hWnd, SW_RESTORE); ShowWindow(hWnd, SW_SHOWNORMAL); g_bFirst=false; } } LONG lStyle=GetWindowLong(hWnd,GWL_EXSTYLE) ; ::SetWindowLong(hWnd, GWL_EXSTYLE, lStyle|WS_EX_LAYERED); ::SetLayeredWindowAttributes(hWnd, 0, m_btAlpha, LWA_ALPHA); } return TRUE; } ; ::SetWindowLong(hWnd, GWL_EXSTYLE, lStyle|WS_EX_LAYERED); ::SetLayeredWindowAttributes(hWnd, 0, m_btAlpha, LWA_ALPHA); } return TRUE; }