Advertisement
Tkap1

Untitled

Sep 22nd, 2022 (edited)
880
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.41 KB | None | 0 0
  1. LONG_PTR style = GetWindowLongPtrA(
  2.     window.handle,
  3.     GWL_EXSTYLE
  4. );
  5.  
  6. style |= WS_EX_TOPMOST | WS_EX_LAYERED;
  7.  
  8. SetWindowLongPtrA(
  9.     window.handle,
  10.     GWL_EXSTYLE,
  11.     style
  12. );
  13.  
  14. BOOL result = SetWindowPos(
  15.     window.handle,
  16.     (HWND)-1,
  17.     0,
  18.     0,
  19.     0,
  20.     0,
  21.     SWP_NOMOVE | SWP_NOSIZE | SWP_NOZORDER | SWP_FRAMECHANGED
  22. );
  23. assert(result);
  24.  
  25. SetLayeredWindowAttributes(window.handle, RGB(0, 0, 0), 128, LWA_ALPHA);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement