typedef DWORD (WINAPI *PSLWA)(HWND, DWORD, BYTE, DWORD); static PSLWA pSetLayeredWindowAttributes = NULL; static BOOL initialized = FALSE; BOOL MakeWindowTransparent(HWND hWnd, unsigned char factor) { /* First, see if we can get the API call we need. If we've tried * once, we don't need to try again. */ if (!initialized) { HMODULE hDLL = LoadLibrary ("user32"); pSetLayeredWindowAttributes = (PSLWA) GetProcAddress(hDLL, "SetLayeredWindowAttributes"); initialized = TRUE; } /* ... elided ... */ }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)