Make the window transparent

xiaoxiao2021-03-06  40

// Add WS_EX_LAYERED extension attribute, you must add this property setWindowlong (this-> getsafehwnd (), gwl_exstyle, getWindowlong (this-> getsafehwnd (), gwl_exstyle) ^ 0x80000);

// Call the function in USER32.DLL Hinstance Hinst = LoadLibrary ("User32.dll"); if (hinst) {typedef Bool (WinApi * Myfunc) (HWND, ColorRef, Byte, DWORD); MyFunc Fun = NULL; // Get the setlayeredWindowAttributes function pointer fun = (myfunc) getProcaddress (Hinst, "SetlayeredWindowAttributes); if (fun) Fun (this-> getsafehwnd (), 0, 80, 2); freeElibrary (hinst);

转载请注明原文地址:https://www.9cbs.com/read-75162.html

New Post(0)