?
also hier die lösung.
dann muss es korrekterweise so aussehen.
denn NUR die 2 zeilen nutzen nichts:
#define WS_EX_LAYERED 0x80000
#define LWA_ALPHA 2
HWND hWnd=this->m_hWnd;
typedef DWORD (WINAPI *PSLWA)(HWND, DWORD, BYTE, DWORD);
PSLWA pSetLayeredWindowAttributes;
HMODULE hDLL = LoadLibrary ("user32");
pSetLayeredWindowAttributes = (PSLWA) GetProcAddress(hDLL,"SetLayeredWindowAttributes");
if (pSetLayeredWindowAttributes != NULL) {
SetWindowLong (hWnd, GWL_EXSTYLE, (GetWindowLong (hWnd, GWL_EXSTYLE) |WS_EX_LAYERED));
pSetLayeredWindowAttributes (hWnd, 0, 255*0.9, LWA_ALPHA);
}
Wenn noch einer weiss wie man es kürzen kann, lasst euch nur aus