Advertisement
Zodihax

ZodiMizer

Nov 2nd, 2013
404
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.67 KB | None | 0 0
  1. // First register whatever hotkey you want,
  2. // then get the hWnd for ET and save to hWndET,
  3. // then run the below code whenever the hotkey is pressed.
  4. // If you use same resolution in game and on desktop,
  5. // comment everything except the ShowWindow-functions
  6.  
  7. WINDOWPLACEMENT ETwp;
  8. GetWindowPlacement(hWndET, &ETwp);
  9.     if (ETwp.showCmd == SW_SHOWMINIMIZED) {
  10.         ShowWindow(hWndET, SW_RESTORE);            
  11.         HWND hWndETCon = FindWindowExA(FindWindow(0, "ET Console"), NULL, "Edit", 0);
  12.         SendMessage(hWndETCon, WM_SETTEXT, 0, (LPARAM) "vid_restart");
  13.         SendMessage(hWndETCon, WM_CHAR, 13, 0);
  14.     } else {
  15.         ShowWindow(hWndET, SW_MINIMIZE);
  16.         ChangeDisplaySettings(NULL,0);
  17.         }
  18.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement