-#ifdef __WXMSW__
-
-// on supported windows systems (Win2000 and greater), this function
-// will make a frame window transparent by a certain amount
-static void MakeWindowTransparent(wxWindow* wnd, int amount)
-{
- // this API call is not in all SDKs, only the newer ones, so
- // we will runtime bind this
- typedef DWORD (WINAPI *PSETLAYEREDWINDOWATTR)(HWND, DWORD, BYTE, DWORD);
- static PSETLAYEREDWINDOWATTR pSetLayeredWindowAttributes = NULL;
- static HMODULE h = NULL;
- HWND hwnd = (HWND)wnd->GetHWND();
-
- if (!h)
- h = LoadLibrary(_T("user32"));
-
- if (!pSetLayeredWindowAttributes)
- {
- pSetLayeredWindowAttributes =
- (PSETLAYEREDWINDOWATTR)GetProcAddress(h,"SetLayeredWindowAttributes");
- }
-
- if (pSetLayeredWindowAttributes == NULL)
- return;
-
- LONG exstyle = GetWindowLong(hwnd, GWL_EXSTYLE);
- if (0 == (exstyle & 0x80000) /*WS_EX_LAYERED*/)
- SetWindowLong(hwnd, GWL_EXSTYLE, exstyle | 0x80000 /*WS_EX_LAYERED*/);
-
- pSetLayeredWindowAttributes(hwnd, 0, (BYTE)amount, 2 /*LWA_ALPHA*/);
-}
-
-#endif