006
23.09.2004, 13:28 Uhr
~Talkabout
Gast
|
C++: |
// Vergroessert das Fenster nach unten hin this->SetWindowPos(this, 0, 0, rect.right-rect.left, 340, SWP_NOMOVE|SWP_NOZORDER);
// Transparenzfunktion BOOL MakeWindowTransparent(HWND hWnd, int percent){ if(!m_hDLL){ m_hDLL = GetModuleHandle("user32"); if(!m_hDLL) return FALSE;
pSetLayeredWindowAttributes = (PSLWA) GetProcAddress(m_hDLL, "SetLayeredWindowAttributes"); }
if (pSetLayeredWindowAttributes == NULL){ return FALSE; }
SetWindowLong(hWnd, GWL_EXSTYLE , GetWindowLong(hWnd, GWL_EXSTYLE) | WS_EX_LAYERED);
if (GetLastError()) return FALSE;
/* Now, we need to set the 'layered window attributes'. This * is where the alpha values get set. */ int result = pSetLayeredWindowAttributes (hWnd, RGB(255,255,255), (int)(percent*2.55), LWA_ALPHA); return result; }
|
Dieser Post wurde am 23.09.2004 um 15:46 Uhr von mike editiert. |