├── .gitattributes ├── MousePuff_resources.rc ├── Five.ico ├── blank.cur ├── Spy ├── Spy.res ├── Spy_Icon.ico ├── Spy.cpp ├── UnitMain.h ├── UnitMain.dfm ├── UnitMain.cpp └── Spy.cbproj ├── Hider ├── Hider.res ├── shared.h ├── Hider.cpp └── Hider.cbproj ├── MousePuff.res ├── MousePuff_Icon.ico ├── .gitignore ├── README.md ├── MousePuff.cpp ├── ProjectGroupMousePuff.groupproj ├── Main.h ├── Main.dfm ├── Main.cpp └── MousePuff.cbproj /.gitattributes: -------------------------------------------------------------------------------- 1 | * -text 2 | -------------------------------------------------------------------------------- /MousePuff_resources.rc: -------------------------------------------------------------------------------- 1 | Cursor_Blank Cursor "blank.cur" 2 | -------------------------------------------------------------------------------- /Five.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setsumi/MousePuff/HEAD/Five.ico -------------------------------------------------------------------------------- /blank.cur: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setsumi/MousePuff/HEAD/blank.cur -------------------------------------------------------------------------------- /Spy/Spy.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setsumi/MousePuff/HEAD/Spy/Spy.res -------------------------------------------------------------------------------- /Hider/Hider.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setsumi/MousePuff/HEAD/Hider/Hider.res -------------------------------------------------------------------------------- /MousePuff.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setsumi/MousePuff/HEAD/MousePuff.res -------------------------------------------------------------------------------- /Spy/Spy_Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setsumi/MousePuff/HEAD/Spy/Spy_Icon.ico -------------------------------------------------------------------------------- /MousePuff_Icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/setsumi/MousePuff/HEAD/MousePuff_Icon.ico -------------------------------------------------------------------------------- /Hider/shared.h: -------------------------------------------------------------------------------- 1 | #define LEASED_WNDCLASS L"MousePuffLeasedWindowClass" 2 | #define LEASED_WNDTITLE L"MousePuff Leased Window" 3 | #define WMM_SHOWPOINTER WM_USER+1 4 | #define WMM_HIDEPOINTER WM_USER+2 5 | 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Build dirs 2 | /Debug 3 | /Release 4 | /Win64 5 | /build 6 | __astcache 7 | __history 8 | __recovery 9 | 10 | # Intermediate Build files 11 | *.gch 12 | *.map 13 | *.obj 14 | *.pch 15 | *.tds 16 | 17 | *.~* 18 | *.#* 19 | 20 | *.local 21 | *.stat 22 | *.dsk 23 | 24 | # Output files 25 | #/**/*.dll 26 | #/**/*.lib 27 | #/**/*.exe 28 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MousePuff 2 | 3 | GUI app for Windows to hide Mouse Pointer. 4 | 5 | [![GitHub release (latest by date)](https://img.shields.io/github/v/release/setsumi/mousepuff?style=for-the-badge)](https://github.com/setsumi/MousePuff/releases) 6 | 7 | ![image](https://user-images.githubusercontent.com/5970554/210588113-13905d96-1c1b-4857-b706-83ab8859a1ab.png) 8 | -------------------------------------------------------------------------------- /Spy/Spy.cpp: -------------------------------------------------------------------------------- 1 | // --------------------------------------------------------------------------- 2 | 3 | #include 4 | #pragma hdrstop 5 | USEFORM("UnitMain.cpp", FormMain); 6 | 7 | // --------------------------------------------------------------------------- 8 | int PASCAL wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int) 9 | { 10 | try 11 | { 12 | Application->Initialize(); 13 | Application->Title = "Active Window Info"; 14 | Application->CreateForm(__classid(TFormMain), &FormMain); 15 | Application->Run(); 16 | } 17 | catch (Exception &exception) 18 | { 19 | Application->ShowException(&exception); 20 | } 21 | return 0; 22 | } 23 | // --------------------------------------------------------------------------- 24 | -------------------------------------------------------------------------------- /Spy/UnitMain.h: -------------------------------------------------------------------------------- 1 | // --------------------------------------------------------------------------- 2 | 3 | #ifndef UnitMainH 4 | #define UnitMainH 5 | // --------------------------------------------------------------------------- 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | 14 | // --------------------------------------------------------------------------- 15 | class TFormMain : public TForm 16 | { 17 | __published: // IDE-managed Components 18 | TTimer *TimerPoll; 19 | TMemo *memoInfo; 20 | TStatusBar *StatusBar1; 21 | 22 | void __fastcall TimerPollTimer(TObject *Sender); 23 | 24 | public: // User declarations 25 | 26 | // User declarations 27 | __fastcall TFormMain(TComponent* Owner); 28 | __fastcall ~TFormMain(); 29 | }; 30 | 31 | // --------------------------------------------------------------------------- 32 | extern PACKAGE TFormMain *FormMain; 33 | // --------------------------------------------------------------------------- 34 | #endif 35 | -------------------------------------------------------------------------------- /Spy/UnitMain.dfm: -------------------------------------------------------------------------------- 1 | object FormMain: TFormMain 2 | Left = 506 3 | Top = 250 4 | BorderIcons = [biSystemMenu, biMinimize] 5 | Caption = 'Active Window Info Spy' 6 | ClientHeight = 124 7 | ClientWidth = 393 8 | Color = clBtnFace 9 | Font.Charset = DEFAULT_CHARSET 10 | Font.Color = clWindowText 11 | Font.Height = -11 12 | Font.Name = 'MS Sans Serif' 13 | Font.Style = [] 14 | FormStyle = fsStayOnTop 15 | OldCreateOrder = False 16 | ShowHint = True 17 | PixelsPerInch = 96 18 | TextHeight = 13 19 | object memoInfo: TMemo 20 | Left = 0 21 | Top = 0 22 | Width = 393 23 | Height = 124 24 | Align = alClient 25 | BevelInner = bvLowered 26 | Lines.Strings = ( 27 | 'Activate the target window...') 28 | ScrollBars = ssBoth 29 | TabOrder = 0 30 | WordWrap = False 31 | end 32 | object StatusBar1: TStatusBar 33 | Left = 377 34 | Top = 105 35 | Width = 16 36 | Height = 19 37 | Align = alCustom 38 | Anchors = [akRight, akBottom] 39 | Panels = <> 40 | SimplePanel = True 41 | end 42 | object TimerPoll: TTimer 43 | Interval = 300 44 | OnTimer = TimerPollTimer 45 | Left = 80 46 | Top = 16 47 | end 48 | end 49 | -------------------------------------------------------------------------------- /MousePuff.cpp: -------------------------------------------------------------------------------- 1 | // --------------------------------------------------------------------------- 2 | 3 | #include 4 | #include 5 | #include 6 | #pragma hdrstop 7 | 8 | // --------------------------------------------------------------------------- 9 | USEFORM("Main.cpp", FormMousePuff1); 10 | //--------------------------------------------------------------------------- 11 | int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int) 12 | { 13 | try 14 | { 15 | Application->Initialize(); 16 | Application->MainFormOnTaskBar = true; 17 | Application->CreateForm(__classid(TFormMousePuff1), &FormMousePuff1); 18 | TIniFile *ini = new TIniFile(ChangeFileExt(Application->ExeName, ".ini")); 19 | Application->ShowMainForm = ini->ReadInteger(L"MAIN", L"StartToTray", 0) == 0; 20 | delete ini; 21 | // read command line (overrides config) 22 | for (int i = 1; i <= ParamCount(); i++) 23 | { 24 | if (LowerCase(ParamStr(i)) == "-tray") 25 | { 26 | Application->ShowMainForm = false; 27 | break; 28 | } 29 | } 30 | 31 | Application->Run(); 32 | } 33 | catch (Exception &exception) 34 | { 35 | Application->ShowException(&exception); 36 | } 37 | catch (...) 38 | { 39 | try 40 | { 41 | throw Exception(""); 42 | } 43 | catch (Exception &exception) 44 | { 45 | Application->ShowException(&exception); 46 | } 47 | } 48 | return 0; 49 | } 50 | // --------------------------------------------------------------------------- 51 | -------------------------------------------------------------------------------- /ProjectGroupMousePuff.groupproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | {19751AE9-D280-4F77-ACD8-F2EF63BAB103} 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | Default.Personality.12 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /Main.h: -------------------------------------------------------------------------------- 1 | // --------------------------------------------------------------------------- 2 | 3 | #ifndef MainH 4 | #define MainH 5 | // --------------------------------------------------------------------------- 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | // --------------------------------------------------------------------------- 14 | class TFormMousePuff1 : public TForm 15 | { 16 | __published: // IDE-managed Components 17 | TTimer *timerPuff; 18 | TRadioButton *radioBtnGlobal; 19 | TRadioButton *radioBtnProgram; 20 | TTrayIcon *trayIcon; 21 | TUpDown *udTimeout; 22 | TEdit *editTimeout; 23 | TLabel *Label3; 24 | TButton *btnSpy; 25 | TButton *btnHide; 26 | TButton *btnHelp; 27 | TButton *btnExit; 28 | TCheckBox *chkStartToTray; 29 | TCheckBox *chkEnabled; 30 | TPageControl *pageControl1; 31 | TTabSheet *tabsheetTitle; 32 | TTabSheet *tabsheetClass; 33 | TMemo *memoTitle; 34 | TMemo *memoClass; 35 | TTabSheet *tabsheetExe; 36 | TMemo *memoExe; 37 | TTimer *timerKb; 38 | TLabel *Label1; 39 | TCheckBox *chkHideTrayIcon; 40 | TTimer *timerResetHook; 41 | 42 | void __fastcall FormCreate(TObject *Sender); 43 | void __fastcall FormDestroy(TObject *Sender); 44 | void __fastcall timerPuffTimer(TObject *Sender); 45 | void __fastcall trayIconClick(TObject *Sender); 46 | void __fastcall btnSpyClick(TObject *Sender); 47 | void __fastcall radioBtnGlobalClick(TObject *Sender); 48 | void __fastcall btnHideClick(TObject *Sender); 49 | void __fastcall btnHelpClick(TObject *Sender); 50 | void __fastcall btnExitClick(TObject *Sender); 51 | void __fastcall FormKeyDown(TObject *Sender, WORD &Key, TShiftState Shift); 52 | void __fastcall chkEnabledClick(TObject *Sender); 53 | void __fastcall timerKbTimer(TObject *Sender); 54 | void __fastcall editTimeoutChange(TObject *Sender); 55 | void __fastcall chkHideTrayIconClick(TObject *Sender); 56 | void __fastcall timerResetHookTimer(TObject *Sender); 57 | 58 | protected: 59 | void __fastcall WndProc(TMessage& Message); 60 | 61 | private: // User declarations 62 | void Save(); 63 | void Load(); 64 | UnicodeString ProgramVer(); 65 | 66 | public: // User declarations 67 | __fastcall TFormMousePuff1(TComponent* Owner); 68 | 69 | bool TargetProgram(); 70 | void TimerReset(); 71 | void HookReset(); 72 | }; 73 | 74 | // --------------------------------------------------------------------------- 75 | extern PACKAGE TFormMousePuff1 *FormMousePuff1; 76 | // --------------------------------------------------------------------------- 77 | #endif 78 | -------------------------------------------------------------------------------- /Hider/Hider.cpp: -------------------------------------------------------------------------------- 1 | // --------------------------------------------------------------------- 2 | #include 3 | #include 4 | #pragma hdrstop 5 | 6 | #include "shared.h" 7 | 8 | HWND hLeasedWnd = NULL; 9 | 10 | // --------------------------------------------------------------------------- 11 | HWND SetWindowOwner(HWND hwnd, HWND hwndOwner) 12 | { 13 | if ((GetWindowLong(hwnd, GWL_STYLE) & WS_CHILD) || (GetWindowLong(hwndOwner, 14 | GWL_STYLE) & WS_CHILD)) 15 | return NULL; 16 | return (HWND)SetWindowLongPtr(hwnd, GWLP_HWNDPARENT, (LONG_PTR)hwndOwner); 17 | } 18 | 19 | // --------------------------------------------------------------------- 20 | LRESULT CALLBACK LeasedWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) 21 | { 22 | switch (uMsg) 23 | { 24 | case WMM_SHOWPOINTER: 25 | if (SetWindowOwner(hLeasedWnd, (HWND)wParam)) 26 | while (ShowCursor(TRUE) <= -1); 27 | return 0; 28 | case WMM_HIDEPOINTER: 29 | if (SetWindowOwner(hLeasedWnd, (HWND)wParam)) 30 | while (ShowCursor(FALSE) >= 0); 31 | return 0; 32 | case WM_DESTROY: 33 | PostQuitMessage(0); 34 | } 35 | return DefWindowProc(hwnd, uMsg, wParam, lParam); 36 | } 37 | 38 | // --------------------------------------------------------------------- 39 | int WINAPI _tWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPTSTR lpCmdLine, 40 | int nCmdShow) 41 | { 42 | MSG msg = 43 | {0}; 44 | BOOL bRet; 45 | 46 | // to not break under heavy CPU load 47 | SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS); 48 | 49 | // prevent multiple instances 50 | if (FindWindow(LEASED_WNDCLASS, LEASED_WNDTITLE)) 51 | { 52 | return 0; 53 | } 54 | 55 | try 56 | { 57 | // register window class 58 | WNDCLASSEX wc = 59 | {sizeof(WNDCLASSEX), CS_DBLCLKS, LeasedWindowProc, 0L, 0L, hInstance, NULL, NULL, 60 | NULL, NULL, LEASED_WNDCLASS, NULL}; 61 | if (!RegisterClassEx(&wc)) 62 | { 63 | throw Exception(L"RegisterClassEx() failed"); 64 | } 65 | 66 | // create window 67 | hLeasedWnd = CreateWindow(LEASED_WNDCLASS, LEASED_WNDTITLE, WS_OVERLAPPEDWINDOW, 68 | 0, 0, 320, 200, NULL, NULL, hInstance, NULL); 69 | if (!hLeasedWnd) 70 | { 71 | throw Exception(L"CreateWindow() failed"); 72 | } 73 | 74 | // show window 75 | // ShowWindow(hLeasedWnd, SW_SHOW); 76 | // UpdateWindow(hLeasedWnd); 77 | 78 | // start message loop 79 | while ((bRet = GetMessage(&msg, NULL, 0, 0)) != 0) 80 | { 81 | if (bRet == -1) 82 | { 83 | throw Exception(L"GetMessage() failed"); 84 | } 85 | else 86 | { 87 | TranslateMessage(&msg); 88 | DispatchMessage(&msg); 89 | } 90 | } 91 | } 92 | catch (Exception &e) 93 | { 94 | MessageBox(NULL, e.Message.c_str(), LEASED_WNDTITLE, MB_OK | MB_ICONERROR); 95 | } 96 | 97 | // return the exit code to the system 98 | return msg.wParam; 99 | } 100 | // --------------------------------------------------------------------- 101 | -------------------------------------------------------------------------------- /Spy/UnitMain.cpp: -------------------------------------------------------------------------------- 1 | // --------------------------------------------------------------------------- 2 | 3 | #include 4 | #include 5 | #include 6 | #pragma hdrstop 7 | 8 | #include "UnitMain.h" 9 | // --------------------------------------------------------------------------- 10 | #pragma package(smart_init) 11 | #pragma resource "*.dfm" 12 | TFormMain *FormMain; 13 | 14 | HWND prevWnd = NULL; 15 | 16 | BOOL sm_EnableTokenPrivilege(LPCTSTR pszPrivilege) 17 | { 18 | HANDLE hToken = 0; 19 | TOKEN_PRIVILEGES tkp = 20 | {0}; 21 | 22 | // Get a token for this process. 23 | 24 | if (!OpenProcessToken(GetCurrentProcess(), TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, 25 | &hToken)) 26 | { 27 | return FALSE; 28 | } 29 | 30 | // Get the LUID for the privilege. 31 | 32 | if (LookupPrivilegeValue(NULL, pszPrivilege, &tkp.Privileges[0].Luid)) 33 | { 34 | tkp.PrivilegeCount = 1; // one privilege to set 35 | 36 | tkp.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED; 37 | 38 | // Set the privilege for this process. 39 | 40 | AdjustTokenPrivileges(hToken, FALSE, &tkp, 0, (PTOKEN_PRIVILEGES)NULL, 0); 41 | 42 | if (GetLastError() != ERROR_SUCCESS) 43 | return FALSE; 44 | 45 | return TRUE; 46 | } 47 | 48 | return FALSE; 49 | } 50 | 51 | void CopyToClipboard(UnicodeString text) 52 | { 53 | // copy to clipboard 54 | HGLOBAL hGlobal = GlobalAlloc(GMEM_DDESHARE | GMEM_MOVEABLE, 55 | (text.Length() + 1)*sizeof(wchar_t)); 56 | if (hGlobal) 57 | { 58 | void *data = GlobalLock(hGlobal); 59 | if (data) 60 | { 61 | memcpy(data, text.w_str(), (text.Length() + 1) * sizeof(wchar_t)); 62 | GlobalUnlock(hGlobal); 63 | if (OpenClipboard(NULL)) 64 | { 65 | EmptyClipboard(); 66 | SetClipboardData(CF_UNICODETEXT, hGlobal); 67 | CloseClipboard(); 68 | } 69 | else 70 | data = 0; 71 | } 72 | if (!data) 73 | { 74 | GlobalFree(hGlobal); 75 | } 76 | } 77 | } 78 | 79 | // --------------------------------------------------------------------------- 80 | UnicodeString GetWindowClassPlus(HWND hwnd) 81 | { 82 | wchar_t *tbuf = new wchar_t[2048]; 83 | tbuf[0] = L'\0'; 84 | GetClassName(hwnd, tbuf, 2047); 85 | UnicodeString ret(tbuf); 86 | delete[]tbuf; 87 | return ret; 88 | } 89 | 90 | // --------------------------------------------------------------------------- 91 | UnicodeString GetWindowTextPlus(HWND hwnd) 92 | { 93 | UnicodeString ret; 94 | LRESULT textlen = SendMessage(hwnd, WM_GETTEXTLENGTH, (WPARAM)0, (LPARAM)0); 95 | if (textlen) 96 | { 97 | wchar_t *tbuf = new wchar_t[textlen + 1]; 98 | SendMessage(hwnd, WM_GETTEXT, (WPARAM)(textlen + 1), (LPARAM)tbuf); 99 | ret = tbuf; 100 | delete[]tbuf; 101 | } 102 | return ret; 103 | } 104 | 105 | // --------------------------------------------------------------------------- 106 | UnicodeString GetWindowTitlePlus(HWND hwnd) 107 | { 108 | wchar_t *tbuf = new wchar_t[2048]; 109 | tbuf[0] = L'\0'; 110 | GetWindowText(hwnd, tbuf, 2047); 111 | UnicodeString ret(tbuf); 112 | delete[]tbuf; 113 | return ret; 114 | } 115 | 116 | // --------------------------------------------------------------------------- 117 | __fastcall TFormMain::TFormMain(TComponent* Owner) : TForm(Owner) 118 | { 119 | sm_EnableTokenPrivilege(SE_DEBUG_NAME); 120 | } 121 | 122 | // --------------------------------------------------------------------------- 123 | __fastcall TFormMain::~TFormMain() 124 | { 125 | } 126 | 127 | // --------------------------------------------------------------------------- 128 | void __fastcall TFormMain::TimerPollTimer(TObject* /* Sender */) 129 | { 130 | TimerPoll->Enabled = false; 131 | HWND wnd = ::GetForegroundWindow(); 132 | if (wnd == Handle) 133 | { // redetect on activate self and then go back 134 | prevWnd = NULL; 135 | } 136 | if (wnd && wnd != Handle && wnd != prevWnd) 137 | { 138 | prevWnd = wnd; 139 | memoInfo->Lines->Clear(); 140 | memoInfo->Lines->Add 141 | (L">>>>>>>>>> Window Title | Class | Executable path | Dimensions <<<<<<<<"); 142 | 143 | memoInfo->Lines->Add(GetWindowTitlePlus(wnd).Trim()); 144 | 145 | memoInfo->Lines->Add(GetWindowClassPlus(wnd).Trim()); 146 | 147 | DWORD pid; 148 | GetWindowThreadProcessId(wnd, &pid); 149 | HANDLE ph = OpenProcess(PROCESS_ALL_ACCESS, FALSE, pid); 150 | wchar_t name[MAX_PATH]; 151 | DWORD size = MAX_PATH; 152 | // GetProcessImageFileName(ph, name, MAX_PATH); 153 | // memoInfo->Lines->Add(name); 154 | QueryFullProcessImageName(ph, 0, name, &size); 155 | CloseHandle(ph); 156 | memoInfo->Lines->Add(name); 157 | 158 | RECT rect = 159 | {0}; 160 | if (S_OK == DwmGetWindowAttribute(wnd, DWMWA_EXTENDED_FRAME_BOUNDS, &rect, 161 | sizeof(RECT))) 162 | { 163 | UnicodeString str; 164 | str.sprintf(L"%d, %d (%d, %d)", rect.left, rect.top, rect.right - rect.left, 165 | rect.bottom - rect.top); 166 | memoInfo->Lines->Add(str); 167 | } 168 | } 169 | TimerPoll->Enabled = true; 170 | } 171 | // --------------------------------------------------------------------------- 172 | -------------------------------------------------------------------------------- /Main.dfm: -------------------------------------------------------------------------------- 1 | object FormMousePuff1: TFormMousePuff1 2 | Left = 0 3 | Top = 0 4 | BorderIcons = [biSystemMenu] 5 | BorderStyle = bsSingle 6 | Caption = 'MousePuff (Hide Mouse Pointer)' 7 | ClientHeight = 248 8 | ClientWidth = 360 9 | Color = clBtnFace 10 | Font.Charset = DEFAULT_CHARSET 11 | Font.Color = clWindowText 12 | Font.Height = -11 13 | Font.Name = 'Tahoma' 14 | Font.Style = [] 15 | KeyPreview = True 16 | OldCreateOrder = False 17 | ShowHint = True 18 | OnCreate = FormCreate 19 | OnDestroy = FormDestroy 20 | OnKeyDown = FormKeyDown 21 | PixelsPerInch = 96 22 | TextHeight = 13 23 | object Label3: TLabel 24 | Left = 128 25 | Top = 13 26 | Width = 102 27 | Height = 13 28 | Caption = 'Hide after idling (sec)' 29 | end 30 | object Label1: TLabel 31 | Left = 259 32 | Top = 70 33 | Width = 36 34 | Height = 13 35 | Caption = '------->' 36 | end 37 | object pageControl1: TPageControl 38 | Left = 8 39 | Top = 65 40 | Width = 287 41 | Height = 152 42 | ActivePage = tabsheetClass 43 | TabOrder = 0 44 | object tabsheetTitle: TTabSheet 45 | Hint = 'Full or partial window title' 46 | Caption = 'Window Title' 47 | ExplicitLeft = 0 48 | ExplicitTop = 0 49 | ExplicitWidth = 0 50 | ExplicitHeight = 0 51 | object memoTitle: TMemo 52 | Left = 0 53 | Top = 0 54 | Width = 279 55 | Height = 124 56 | Align = alClient 57 | ScrollBars = ssBoth 58 | TabOrder = 0 59 | WordWrap = False 60 | end 61 | end 62 | object tabsheetClass: TTabSheet 63 | Caption = 'Window Class' 64 | ImageIndex = 1 65 | ExplicitLeft = 0 66 | ExplicitTop = 0 67 | ExplicitWidth = 0 68 | ExplicitHeight = 0 69 | object memoClass: TMemo 70 | Left = 0 71 | Top = 0 72 | Width = 279 73 | Height = 124 74 | Align = alClient 75 | ScrollBars = ssBoth 76 | TabOrder = 0 77 | WordWrap = False 78 | end 79 | end 80 | object tabsheetExe: TTabSheet 81 | Hint = 'Full or partial exe path' 82 | Caption = 'Executable' 83 | ImageIndex = 2 84 | ExplicitLeft = 0 85 | ExplicitTop = 0 86 | ExplicitWidth = 0 87 | ExplicitHeight = 0 88 | object memoExe: TMemo 89 | Left = 0 90 | Top = 0 91 | Width = 279 92 | Height = 124 93 | Align = alClient 94 | ScrollBars = ssBoth 95 | TabOrder = 0 96 | WordWrap = False 97 | end 98 | end 99 | end 100 | object radioBtnGlobal: TRadioButton 101 | Left = 12 102 | Top = 12 103 | Width = 105 104 | Height = 18 105 | Hint = 'Hide always' 106 | Caption = 'Global' 107 | Checked = True 108 | TabOrder = 6 109 | TabStop = True 110 | OnClick = radioBtnGlobalClick 111 | end 112 | object radioBtnProgram: TRadioButton 113 | Left = 12 114 | Top = 38 115 | Width = 105 116 | Height = 21 117 | Hint = 'Hide only when specific window is active' 118 | Caption = 'Program Specific' 119 | TabOrder = 7 120 | OnClick = radioBtnGlobalClick 121 | end 122 | object udTimeout: TUpDown 123 | Left = 285 124 | Top = 10 125 | Width = 16 126 | Height = 21 127 | Associate = editTimeout 128 | Min = 1 129 | Position = 3 130 | TabOrder = 9 131 | end 132 | object editTimeout: TEdit 133 | Left = 243 134 | Top = 10 135 | Width = 42 136 | Height = 21 137 | ReadOnly = True 138 | TabOrder = 8 139 | Text = '3' 140 | OnChange = editTimeoutChange 141 | end 142 | object btnSpy: TButton 143 | Left = 301 144 | Top = 65 145 | Width = 53 146 | Height = 25 147 | Hint = 'Determine title, class and executable of windows' 148 | Caption = 'Spy...' 149 | TabOrder = 1 150 | OnClick = btnSpyClick 151 | end 152 | object btnHide: TButton 153 | Left = 300 154 | Top = 215 155 | Width = 53 156 | Height = 25 157 | Hint = 'Hide (Esc)' 158 | Caption = #8600' Hide '#8600 159 | TabOrder = 3 160 | OnClick = btnHideClick 161 | end 162 | object btnHelp: TButton 163 | Left = 315 164 | Top = 8 165 | Width = 26 166 | Height = 25 167 | Hint = 'Help information (F1)' 168 | Caption = '?' 169 | TabOrder = 10 170 | OnClick = btnHelpClick 171 | end 172 | object btnExit: TButton 173 | Left = 301 174 | Top = 163 175 | Width = 53 176 | Height = 25 177 | Hint = 'Terminate program (Alt+F4)' 178 | Caption = #215' Exit '#215 179 | TabOrder = 2 180 | OnClick = btnExitClick 181 | end 182 | object chkStartToTray: TCheckBox 183 | Left = 151 184 | Top = 223 185 | Width = 134 186 | Height = 17 187 | Caption = 'Start minimized to tray' 188 | TabOrder = 5 189 | end 190 | object chkEnabled: TCheckBox 191 | Left = 133 192 | Top = 39 193 | Width = 124 194 | Height = 17 195 | Hint = 'Deactivate program function' 196 | Caption = 'Enabled (Ctrl+E)' 197 | Checked = True 198 | Font.Charset = DEFAULT_CHARSET 199 | Font.Color = clWindowText 200 | Font.Height = -11 201 | Font.Name = 'Tahoma' 202 | Font.Style = [fsBold] 203 | ParentFont = False 204 | State = cbChecked 205 | TabOrder = 11 206 | OnClick = chkEnabledClick 207 | end 208 | object chkHideTrayIcon: TCheckBox 209 | Left = 32 210 | Top = 223 211 | Width = 97 212 | Height = 17 213 | Hint = 'Hint: In case of completely hidden, run program again to show' 214 | Caption = 'Hide tray icon' 215 | TabOrder = 4 216 | OnClick = chkHideTrayIconClick 217 | end 218 | object timerPuff: TTimer 219 | Enabled = False 220 | OnTimer = timerPuffTimer 221 | Left = 80 222 | Top = 116 223 | end 224 | object trayIcon: TTrayIcon 225 | Hint = 'MousePuff (Hide Mouse Pointer)' 226 | Icon.Data = { 227 | 0000010001002020100000000000E80200001600000028000000200000004000 228 | 0000010004000000000080020000000000000000000000000000000000000000 229 | 000000008000008000000080800080000000800080008080000080808000C0C0 230 | C0000000FF0000FF000000FFFF00FF000000FF00FF00FFFF0000FFFFFF004444 231 | 4444444444444444444444444444444444444444444444444444444444444444 232 | 4444444444444444444444444444444444444444444444444444444444444444 233 | 4444444444444444444444444444444444444444444884444444444444444444 234 | 444444444448F4444444444444444444444444444448F4444444444444444444 235 | 4444444444487444444444444444444444444444444884444444444444444444 236 | 444444444448F7444444444444444444444444444447FF744444444444444444 237 | 444444444444FFF844444444444444444444444444448FFF4444444444444444 238 | 4444444444447FFF844444444444444444444444474448FFF444444444444444 239 | 444444447F74448FF744444444444444444444448F844447F744444444444444 240 | 44444448FFF8444484444444444444444444447F88FF84778444444444444444 241 | 44444787448FFFF774444444444444444444477F8448FF874444444444444444 242 | 44444478877477444444444444444444444444777F4444444444444444444444 243 | 4444444788444444444444444444444444444444884444444444444444444444 244 | 4444444478444444444444444444444444444444477444444444444444444444 245 | 4444444447744444444444444444444444444444447444444444444444444444 246 | 4444444444444444444444444444444444444444444444444444444444440000 247 | 0000000000000000000000000000000000000000000000000000000000000000 248 | 0000000000000000000000000000000000000000000000000000000000000000 249 | 0000000000000000000000000000000000000000000000000000000000000000 250 | 000000000000000000000000000000000000000000000000000000000000} 251 | OnClick = trayIconClick 252 | Left = 36 253 | Top = 116 254 | end 255 | object timerKb: TTimer 256 | Enabled = False 257 | Interval = 300 258 | OnTimer = timerKbTimer 259 | Left = 126 260 | Top = 115 261 | end 262 | object timerResetHook: TTimer 263 | Enabled = False 264 | Interval = 500 265 | OnTimer = timerResetHookTimer 266 | Left = 188 267 | Top = 113 268 | end 269 | end 270 | -------------------------------------------------------------------------------- /Spy/Spy.cbproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | {D51E998E-8579-4699-9540-F9CDA5BEF000} 4 | CppVCLApplication 5 | Spy.cpp 6 | Release 7 | 18.4 8 | VCL 9 | True 10 | Win32 11 | 1 12 | Application 13 | 14 | 15 | true 16 | 17 | 18 | true 19 | Base 20 | true 21 | 22 | 23 | true 24 | Base 25 | true 26 | 27 | 28 | true 29 | Base 30 | true 31 | 32 | 33 | true 34 | Cfg_1 35 | true 36 | true 37 | 38 | 39 | true 40 | Cfg_1 41 | true 42 | true 43 | 44 | 45 | true 46 | Base 47 | true 48 | 49 | 50 | true 51 | Cfg_2 52 | true 53 | true 54 | 55 | 56 | true 57 | Cfg_2 58 | true 59 | true 60 | 61 | 62 | ..\..\WinPick 0.0.0.3\WinPick;..\..\MousePuff\Spy;$(IncludePath) 63 | rtl.lib;vcl.lib 64 | 5 65 | <_TCHARMapping>wchar_t 66 | true 67 | rtl.bpi;vcl.bpi;vclx.bpi;bcbsmp.bpi;dbrtl.bpi;vcldb.bpi;adortl.bpi;ibsmp.bpi;bdertl.bpi;vcldbx.bpi;teeui.bpi;teedb.bpi;tee.bpi;dss.bpi;ibxpress.bpi;dsnap.bpi;vclie.bpi;inetdb.bpi;inet.bpi;webdsnap.bpi;bcbie.bpi;bcboffice2k.bpi;$(PackageImports) 68 | JPHNE 69 | .\;$(BDS)\lib;$(BDS)\lib\obj;$(DCC_UnitSearchPath) 70 | Windows 71 | -I$(BDS)\include;$(BDS)\include\vcl;$(BDS)\include\dinkumware 72 | $(BDS)\include;$(BDS)\include\vcl;$(BRCC_IncludePath) 73 | true 74 | $(BDS)\include;$(BCC_IncludePath) 75 | true 76 | .\;$(BDS)\lib;$(BDS)\lib\obj;$(DCC_IncludePath) 77 | $(BDS)\include;$(BDS)\include\vcl;$(TASM_IncludePath) 78 | . 79 | true 80 | true 81 | /w2 82 | rtl.lib;vcl.lib 83 | true 84 | ..\..\WinPick 0.0.0.3\WinPick;..\..\MousePuff\Spy;$(BDS)\lib\obj;$(BDS)\lib;$(BDS)\lib\psdk;$(ILINK_LibraryPath) 85 | true 86 | -M 87 | false 88 | true 89 | Spy 90 | Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) 91 | true 92 | 1033 93 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= 94 | 95 | 96 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) 97 | Debug 98 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;ProgramID= 99 | $(BDS)\bin\default_app.manifest 100 | Spy_Icon.ico 101 | UNICODE;_UNICODE;$(Defines) 102 | _DEBUG;$(BRCC_Defines) 103 | _DEBUG;$(TASM_Defines) 104 | exe 105 | -Vx -r- -k -Ve 106 | true 107 | $(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_44.png 108 | $(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png 109 | $(BDSINCLUDE)\windows\vcl;$(IncludePath) 110 | 111 | 112 | $(BDSINCLUDE)\windows\vcl;$(IncludePath) 113 | $(BDS)\bin\default_app.manifest 114 | Spy_Icon.ico 115 | UNICODE;_UNICODE;$(Defines) 116 | _DEBUG;$(BRCC_Defines) 117 | _DEBUG;$(TASM_Defines) 118 | true 119 | $(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_44.png 120 | $(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png 121 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) 122 | Debug 123 | CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= 124 | 125 | 126 | false 127 | $(BDS)\lib\debug;$(ILINK_LibraryPath);$(ILINK_LibraryPath) 128 | Debug 129 | DEBUG;$(DCC_Define);$(DCC_Define) 130 | Full 131 | -M -V 132 | true 133 | true 134 | 135 | 136 | true 137 | true 138 | _DEBUG;$(Defines) 139 | _DEBUG;$(BCC_Defines);$(BCC_Defines) 140 | -Vx -r- -k -Ve -k 141 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;ProgramID= 142 | 143 | 144 | _DEBUG;$(Defines) 145 | _DEBUG;$(BCC_Defines);$(BCC_Defines) 146 | true 147 | true 148 | 149 | 150 | false 151 | true 152 | Release 153 | -M -$O+ 154 | None 155 | $(BDS)\lib\release;$(ILINK_LibraryPath);$(ILINK_LibraryPath) 156 | true 157 | 158 | 159 | true 160 | true 161 | NDEBUG;$(Defines) 162 | NDEBUG;$(BCC_Defines);$(BCC_Defines) 163 | -Vx -r- -k -Ve -r 164 | CompanyName=;FileDescription=MousePuff by furniture;FileVersion=1.6.1.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.6.1.0;Comments=;ProgramID= 165 | ..\Release 166 | 6 167 | requireAdministrator 168 | 1 169 | 170 | 171 | NDEBUG;$(Defines) 172 | NDEBUG;$(BCC_Defines);$(BCC_Defines) 173 | true 174 | true 175 | 176 | 177 | 178 | -1 179 | 0 180 | 181 | 182 | -1 183 | 1 184 | 185 | 186 | 2 187 |
FormMain
188 | UnitMain.h 189 | 0 190 |
191 | 192 | 193 | Cfg_2 194 | Base 195 | 196 | 197 | Base 198 | 199 | 200 | Cfg_1 201 | Base 202 | 203 |
204 | 205 | 206 | CPlusPlusBuilder.Personality.12 207 | CppVCLApplication 208 | 209 | 210 | 211 | True 212 | False 213 | 1 214 | 0 215 | 0 216 | 0 217 | False 218 | False 219 | False 220 | False 221 | False 222 | 1033 223 | 1252 224 | 225 | 226 | 227 | Active Window Spy by furniture 228 | 1.0.0.0 229 | 230 | 231 | 232 | 233 | 234 | 1.0.0.0 235 | 236 | 237 | 238 | $(BCB)\source\vcl 239 | 240 | 241 | 242 | 243 | 244 | 245 | False 246 | 247 | False 248 | 249 | 250 | 251 | False 252 | 253 | 254 | True 255 | False 256 | 257 | 258 | 0 259 | 0 260 | 0 261 | 262 | 263 | 1 264 | 1 265 | 1 266 | 267 | 268 | Spy.cpp 269 | 270 | 271 | False 272 | True 273 | True 274 | False 275 | 276 | 277 | DBExpress Enterprise Data Explorer Integration 278 | Embarcadero C++Builder Office 2000 Servers Package 279 | Embarcadero C++Builder Office XP Servers Package 280 | 281 | 282 | 283 | True 284 | False 285 | 286 | 287 | 12 288 | 289 | 290 |
291 | -------------------------------------------------------------------------------- /Main.cpp: -------------------------------------------------------------------------------- 1 | // --------------------------------------------------------------------------- 2 | #include 3 | #include 4 | #pragma hdrstop 5 | 6 | #include "Main.h" 7 | #include "Hider/shared.h" 8 | 9 | // --------------------------------------------------------------------------- 10 | #pragma package(smart_init) 11 | #pragma resource "*.dfm" 12 | TFormMousePuff1 *FormMousePuff1; 13 | 14 | HINSTANCE hInstance = NULL; 15 | HHOOK hMouseHook = NULL, hKbdHook = NULL; 16 | HCURSOR hCurBlank = NULL; 17 | HWND hWindow = NULL; // form handle 18 | bool FastTermination = false; 19 | bool DebugMode = false; 20 | HWINEVENTHOOK hWinEventHook = NULL; 21 | 22 | // --------------------------------------------------------------------------- 23 | String GetWindowClassPlus(HWND hwnd) 24 | { 25 | wchar_t tbuf[2048]; 26 | tbuf[0] = L'\0'; 27 | GetClassName(hwnd, tbuf, 2047); 28 | return tbuf; 29 | } 30 | 31 | String GetWindowTitlePlus(HWND hwnd) 32 | { 33 | wchar_t tbuf[2048]; 34 | tbuf[0] = L'\0'; 35 | GetWindowText(hwnd, tbuf, 2047); 36 | return tbuf; 37 | } 38 | 39 | String GetWindowExePlus(HWND hwnd) 40 | { 41 | DWORD pid = 0; 42 | wchar_t tbuf[2048] = 43 | {0}; 44 | DWORD size = 2048; 45 | GetWindowThreadProcessId(hwnd, &pid); 46 | HANDLE ph = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_VM_READ, FALSE, pid); 47 | QueryFullProcessImageName(ph, 0, tbuf, &size); 48 | CloseHandle(ph); 49 | return tbuf; 50 | } 51 | 52 | void RunExe(String cmdline) 53 | { 54 | STARTUPINFO si; 55 | PROCESS_INFORMATION pi; 56 | ZeroMemory(&si, sizeof(si)); 57 | si.cb = sizeof(si); 58 | ZeroMemory(&pi, sizeof(pi)); 59 | if (CreateProcess(NULL, cmdline.w_str(), NULL, NULL, FALSE, CREATE_NO_WINDOW, NULL, 60 | NULL, &si, &pi)) 61 | { 62 | CloseHandle(pi.hThread); 63 | CloseHandle(pi.hProcess); 64 | } 65 | else 66 | { 67 | throw Exception(L"RunExe(\"" + cmdline + L"\") failed"); 68 | } 69 | } 70 | 71 | // --------------------------------------------------------------------------- 72 | String TFormMousePuff1::ProgramVer() 73 | { 74 | String ret; 75 | DWORD hnd = 0, vis; 76 | if (0 != (vis = GetFileVersionInfoSize(GetModuleName(NULL).w_str(), &hnd))) 77 | { 78 | BYTE *data = new BYTE[vis]; 79 | if (GetFileVersionInfo(GetModuleName(NULL).w_str(), hnd, vis, data)) 80 | { 81 | UINT ilen = 0; 82 | 83 | struct LANGANDCODEPAGE 84 | { 85 | WORD wLanguage; 86 | WORD wCodePage; 87 | }*lpTranslate; 88 | 89 | // Read first language and code page 90 | if (VerQueryValue(data, L"\\VarFileInfo\\Translation", 91 | (LPVOID*)&lpTranslate, &ilen)) 92 | { 93 | String str; 94 | str.printf(L"\\StringFileInfo\\%04x%04x\\FileVersion", 95 | lpTranslate->wLanguage, lpTranslate->wCodePage); 96 | // Retrieve file version for language and code page 97 | wchar_t *pver = NULL; 98 | if (VerQueryValue(data, str.w_str(), (LPVOID*)&pver, &ilen)) 99 | { 100 | ret = pver; 101 | } 102 | } 103 | } 104 | delete[]data; 105 | } 106 | return ret; 107 | } 108 | 109 | // --------------------------------------------------------------------------- 110 | void TFormMousePuff1::TimerReset() 111 | { 112 | timerPuff->Enabled = false; 113 | timerPuff->Interval = udTimeout->Position * 1000; 114 | timerPuff->Enabled = true; 115 | } 116 | 117 | // --------------------------------------------------------------------------- 118 | void TFormMousePuff1::Save() 119 | { 120 | memoTitle->Lines->SaveToFile(L"title.ini"); 121 | memoClass->Lines->SaveToFile(L"class.ini"); 122 | memoExe->Lines->SaveToFile(L"executable.ini"); 123 | 124 | TIniFile *ini = new TIniFile(ChangeFileExt(Application->ExeName, ".ini")); 125 | ini->WriteInteger(L"MAIN", L"Global", radioBtnGlobal->Checked ? 1 : 0); 126 | ini->WriteInteger(L"MAIN", L"Timeout", udTimeout->Position); 127 | ini->WriteInteger(L"MAIN", L"StartToTray", chkStartToTray->Checked ? 1 : 0); 128 | ini->WriteInteger(L"MAIN", L"WinPageIndex", pageControl1->TabIndex); 129 | ini->WriteInteger(L"MAIN", L"HideTrayIcon", chkHideTrayIcon->Checked ? 1 : 0); 130 | ini->WriteInteger(L"MAIN", L"DebugMode", DebugMode ? 1 : 0); 131 | delete ini; 132 | } 133 | 134 | // --------------------------------------------------------------------------- 135 | void TFormMousePuff1::Load() 136 | { 137 | if (FileExists(L"title.ini")) 138 | memoTitle->Lines->LoadFromFile(L"title.ini"); 139 | if (FileExists(L"class.ini")) 140 | memoClass->Lines->LoadFromFile(L"class.ini"); 141 | if (FileExists(L"executable.ini")) 142 | memoExe->Lines->LoadFromFile(L"executable.ini"); 143 | 144 | TIniFile *ini = new TIniFile(ChangeFileExt(Application->ExeName, ".ini")); 145 | if (ini->ReadInteger(L"MAIN", L"Global", 1) == 1) 146 | radioBtnGlobal->Checked = true; 147 | else 148 | radioBtnProgram->Checked = true; 149 | udTimeout->Position = ini->ReadInteger(L"MAIN", L"Timeout", 3); 150 | chkStartToTray->Checked = ini->ReadInteger(L"MAIN", L"StartToTray", 0) == 1; 151 | pageControl1->TabIndex = ini->ReadInteger(L"MAIN", L"WinPageIndex", 0); 152 | chkHideTrayIcon->Checked = ini->ReadInteger(L"MAIN", L"HideTrayIcon", 0) == 1; 153 | DebugMode = ini->ReadInteger(L"MAIN", L"DebugMode", 0) == 1; 154 | delete ini; 155 | 156 | TimerReset(); 157 | } 158 | 159 | // --------------------------------------------------------------------------- 160 | bool TFormMousePuff1::TargetProgram() 161 | { 162 | bool rv = false; 163 | HWND hw = ::GetForegroundWindow(); 164 | String query; 165 | if (hw) 166 | { 167 | // compare title 168 | if (memoTitle->Lines->Count) 169 | { 170 | query = GetWindowTitlePlus(hw); 171 | for (int i = 0; i < memoTitle->Lines->Count; i++) 172 | { 173 | if (query.Pos(memoTitle->Lines->Strings[i])) 174 | { 175 | rv = true; 176 | goto target; 177 | } 178 | } 179 | } 180 | // compare class 181 | if (memoClass->Lines->Count) 182 | { 183 | query = GetWindowClassPlus(hw); 184 | for (int i = 0; i < memoClass->Lines->Count; i++) 185 | { 186 | if (query == memoClass->Lines->Strings[i]) 187 | { 188 | rv = true; 189 | goto target; 190 | } 191 | } 192 | } 193 | // compare exe 194 | if (memoExe->Lines->Count) 195 | { 196 | query = GetWindowExePlus(hw); 197 | for (int i = 0; i < memoExe->Lines->Count; i++) 198 | { 199 | if (query.Pos(memoExe->Lines->Strings[i])) 200 | { 201 | rv = true; 202 | goto target; 203 | } 204 | } 205 | } 206 | } 207 | target: 208 | return rv; 209 | } 210 | 211 | // --------------------------------------------------------------------------- 212 | void MyProcShowCursor(bool show) 213 | { 214 | HWND hHider = FindWindow(LEASED_WNDCLASS, LEASED_WNDTITLE); 215 | if (hHider) 216 | { 217 | POINT pt; 218 | GetCursorPos(&pt); 219 | HWND hTarget = GetAncestor(WindowFromPoint(pt), GA_ROOT); 220 | // HWND hTarget = GetForegroundWindow(); 221 | PostMessage(hHider, show ? WMM_SHOWPOINTER : WMM_HIDEPOINTER, (WPARAM)hTarget, 0); 222 | if (show) 223 | { 224 | // do it again, sometimes above is not enough 225 | PostMessage(hHider, WMM_SHOWPOINTER, (WPARAM)hTarget, 0); 226 | } 227 | } 228 | } 229 | 230 | const DWORD cursorID[] = 231 | {OCR_APPSTARTING, OCR_NORMAL, OCR_CROSS, OCR_HAND, OCR_IBEAM, OCR_NO, OCR_SIZEALL, 232 | OCR_SIZENESW, OCR_SIZENS, OCR_SIZENWSE, OCR_SIZEWE, OCR_UP, OCR_WAIT, 233 | 32651 /* OCR_HELP */ }; 234 | 235 | void MyShowCursor(bool show, bool force = false) 236 | { 237 | static bool visible = true; 238 | 239 | if (show != visible || force) 240 | { 241 | visible = show; 242 | 243 | // debug sound 244 | if (DebugMode) 245 | { 246 | MessageBeep(show ? 0 : MB_ICONERROR); 247 | } 248 | 249 | if (show) 250 | { 251 | SystemParametersInfo(SPI_SETCURSORS, 0, NULL, 0); 252 | MyProcShowCursor(show); 253 | } 254 | else 255 | { 256 | for (size_t i = 0; i < (sizeof(cursorID) / sizeof(*cursorID)); i++) 257 | { 258 | SetSystemCursor(CopyCursor(hCurBlank), cursorID[i]); 259 | } 260 | MyProcShowCursor(show); 261 | } 262 | } 263 | } 264 | 265 | // --------------------------------------------------------------------------- 266 | LRESULT CALLBACK LLHookMouseProc(int nCode, WPARAM wParam, LPARAM lParam) 267 | { 268 | if (nCode == HC_ACTION) // allowed to process message 269 | { 270 | FormMousePuff1->TimerReset(); 271 | MyShowCursor(true); 272 | } 273 | return CallNextHookEx(hMouseHook, nCode, wParam, lParam); 274 | } 275 | 276 | // --------------------------------------------------------------------------- 277 | LRESULT CALLBACK LLHookKeyboardProc(int nCode, WPARAM wParam, LPARAM lParam) 278 | { 279 | if (nCode == HC_ACTION) // allowed to process message now 280 | { 281 | if (!FormMousePuff1->radioBtnGlobal->Checked) // ignore keyboard in global mode 282 | { 283 | if (!FormMousePuff1->timerKb->Enabled) // suppress fast keyboard processind 284 | FormMousePuff1->timerKb->Enabled = true; 285 | } 286 | } 287 | return CallNextHookEx(hKbdHook, nCode, wParam, lParam); 288 | } 289 | 290 | // --------------------------------------------------------------------------- 291 | void MyUnhook() 292 | { 293 | // release hooks 294 | if (hMouseHook) 295 | { 296 | UnhookWindowsHookEx(hMouseHook); 297 | hMouseHook = NULL; 298 | } 299 | if (hKbdHook) 300 | { 301 | UnhookWindowsHookEx(hKbdHook); 302 | hKbdHook = NULL; 303 | } 304 | } 305 | 306 | // --------------------------------------------------------------------------- 307 | void MyHook() 308 | { 309 | MyUnhook(); 310 | // set up hooks 311 | hMouseHook = SetWindowsHookEx(WH_MOUSE_LL, (HOOKPROC)LLHookMouseProc, 312 | GetModuleHandle(NULL), NULL); 313 | if (!hMouseHook) 314 | throw Exception(L"SetWindowsHookEx(WH_MOUSE_LL) failed"); 315 | hKbdHook = SetWindowsHookEx(WH_KEYBOARD_LL, (HOOKPROC)LLHookKeyboardProc, 316 | GetModuleHandle(NULL), NULL); 317 | if (!hKbdHook) 318 | throw Exception(L"SetWindowsHookEx(WH_KEYBOARD_LL) failed"); 319 | } 320 | 321 | // --------------------------------------------------------------------------- 322 | void __fastcall TFormMousePuff1::timerKbTimer(TObject *Sender) 323 | { 324 | timerKb->Enabled = false; 325 | TimerReset(); 326 | MyShowCursor(!TargetProgram()); 327 | } 328 | 329 | // --------------------------------------------------------------------------- 330 | static BOOL CALLBACK checkInstanceCallback(HWND hWnd, LPARAM lparam) 331 | { 332 | // Activate another instance if already running 333 | if (hWnd != hWindow && SameStr(GetWindowClassPlus(hWnd), L"TFormMousePuff1")) 334 | { 335 | if (!IsWindowVisible(hWnd)) 336 | ShowWindow(hWnd, SW_SHOW); 337 | SetForegroundWindow(hWnd); 338 | FastTermination = true; 339 | exit(0); // Terminate myself 340 | } 341 | return TRUE; 342 | } 343 | 344 | // --------------------------------------------------------------------------- 345 | void CALLBACK winEventProc(HWINEVENTHOOK hook, DWORD event, HWND hwnd, LONG idObject, 346 | LONG idChild, DWORD dwEventThread, DWORD dwmsEventTime) 347 | { 348 | FormMousePuff1->HookReset(); 349 | } 350 | 351 | // --------------------------------------------------------------------------- 352 | void __fastcall TFormMousePuff1::FormCreate(TObject *Sender) 353 | { 354 | hInstance = (HINSTANCE)GetWindowLong(Handle, GWL_HINSTANCE); 355 | hWindow = Handle; 356 | 357 | // to not break under heavy CPU load 358 | SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS); 359 | 360 | // Check if another instance is already running 361 | EnumWindows(checkInstanceCallback, NULL); 362 | 363 | // register system notifications to repair hooks 364 | if (FALSE == WTSRegisterSessionNotification(hWindow, NOTIFY_FOR_THIS_SESSION)) 365 | throw Exception(L"INIT: WTSRegisterSessionNotification() failed"); 366 | 367 | hWinEventHook = SetWinEventHook(EVENT_SYSTEM_DESKTOPSWITCH, 368 | EVENT_SYSTEM_DESKTOPSWITCH, NULL, winEventProc, 0, 0, 369 | WINEVENT_OUTOFCONTEXT /* | WINEVENT_SKIPOWNPROCESS */); 370 | if (!hWinEventHook) 371 | throw Exception(L"INIT: SetWinEventHook() failed"); 372 | 373 | // set up hooks 374 | MyHook(); 375 | // load config 376 | Load(); 377 | // read command line (overrides config) 378 | bool noicon = false; 379 | for (int i = 1; i <= ParamCount(); i++) 380 | { 381 | if (LowerCase(ParamStr(i)) == "-noicon") 382 | { 383 | noicon = true; 384 | break; 385 | } 386 | } 387 | if (!noicon) // if no parameter then decide by config 388 | { 389 | trayIcon->Visible = !chkHideTrayIcon->Checked; 390 | } 391 | 392 | // load blank cursor from resource 393 | hCurBlank = LoadCursor(hInstance, L"Cursor_Blank"); 394 | if (hCurBlank == NULL) 395 | throw Exception(L"INIT: LoadCursor() failed"); 396 | 397 | // run custom app based pointers hider 398 | // as NON-elevated to avoid breaking global hook based applications 399 | if (FileExists(L"Hider.exe")) 400 | { 401 | RunExe(L"explorer.exe Hider.exe"); 402 | } 403 | } 404 | 405 | // --------------------------------------------------------------------------- 406 | void __fastcall TFormMousePuff1::FormDestroy(TObject *Sender) 407 | { 408 | WTSUnRegisterSessionNotification(Handle); 409 | if (hWinEventHook) 410 | { 411 | UnhookWinEvent(hWinEventHook); 412 | } 413 | MyUnhook(); 414 | Save(); 415 | MyShowCursor(true, true); 416 | DestroyCursor(hCurBlank); 417 | 418 | if (!FastTermination) 419 | { 420 | HWND hHider = FindWindow(LEASED_WNDCLASS, LEASED_WNDTITLE); 421 | if (hHider) 422 | PostMessage(hHider, WM_CLOSE, 0, 0); 423 | } 424 | } 425 | 426 | // --------------------------------------------------------------------------- 427 | __fastcall TFormMousePuff1::TFormMousePuff1(TComponent* Owner) : TForm(Owner) 428 | { 429 | } 430 | 431 | // --------------------------------------------------------------------------- 432 | void __fastcall TFormMousePuff1::timerPuffTimer(TObject *Sender) 433 | { 434 | timerPuff->Enabled = false; 435 | if (radioBtnGlobal->Checked || TargetProgram()) 436 | { 437 | MyShowCursor(false); 438 | } 439 | } 440 | 441 | // --------------------------------------------------------------------------- 442 | void __fastcall TFormMousePuff1::trayIconClick(TObject *Sender) 443 | { 444 | if (this->Visible) 445 | { 446 | this->Hide(); 447 | } 448 | else 449 | { 450 | this->Show(); 451 | ::SetForegroundWindow(Handle); 452 | } 453 | } 454 | 455 | // --------------------------------------------------------------------------- 456 | void __fastcall TFormMousePuff1::btnSpyClick(TObject *Sender) 457 | { 458 | RunExe(L"Spy.exe"); 459 | } 460 | 461 | // --------------------------------------------------------------------------- 462 | void __fastcall TFormMousePuff1::radioBtnGlobalClick(TObject *Sender) 463 | { 464 | TimerReset(); 465 | } 466 | 467 | // --------------------------------------------------------------------------- 468 | void __fastcall TFormMousePuff1::btnHideClick(TObject *Sender) 469 | { 470 | Hide(); 471 | } 472 | 473 | // --------------------------------------------------------------------------- 474 | void __fastcall TFormMousePuff1::btnHelpClick(TObject *Sender) 475 | { 476 | MessageBox(Handle, (Caption + L"\nversion " + ProgramVer() + 477 | L"\n\nCommand line parameters:\n-tray\tstart minimized to tray" + 478 | L"\n-noicon\tdo not display tray icon" + 479 | L"\n\nNote 1: If both parameters are used, run program again to show its window." + 480 | L"\nNote 2: Command line parameters override UI options." + 481 | L"\nNote 3: Window Title and Executable Path can be partial string.").w_str(), 482 | L"Information", MB_OK | MB_ICONINFORMATION); 483 | } 484 | 485 | // --------------------------------------------------------------------------- 486 | void __fastcall TFormMousePuff1::btnExitClick(TObject *Sender) 487 | { 488 | Close(); 489 | } 490 | 491 | // --------------------------------------------------------------------------- 492 | void __fastcall TFormMousePuff1::FormKeyDown(TObject *Sender, WORD &Key, 493 | TShiftState Shift) 494 | { 495 | if (Key == VK_ESCAPE) 496 | { 497 | btnHideClick(this); 498 | } 499 | else if (Key == 'E' && Shift.Contains(ssCtrl)) 500 | { 501 | chkEnabled->Checked = !chkEnabled->Checked; 502 | } 503 | else if (Key == VK_F1) 504 | { 505 | btnHelpClick(NULL); 506 | } 507 | } 508 | 509 | // --------------------------------------------------------------------------- 510 | void __fastcall TFormMousePuff1::chkEnabledClick(TObject *Sender) 511 | { 512 | timerPuff->Enabled = false; 513 | if (!chkEnabled->Checked) 514 | { 515 | MyUnhook(); 516 | MyShowCursor(true, true); 517 | } 518 | else 519 | { 520 | MyHook(); 521 | TimerReset(); 522 | } 523 | } 524 | 525 | // --------------------------------------------------------------------------- 526 | void __fastcall TFormMousePuff1::WndProc(TMessage& Message) 527 | { 528 | switch (Message.Msg) 529 | { 530 | case WM_SHOWWINDOW: 531 | if (Message.WParam == TRUE) 532 | { 533 | Show(); // repair VCL on raw ShowWindow() call 534 | } 535 | break; 536 | case WM_SETTINGCHANGE: 537 | case WM_DISPLAYCHANGE: 538 | case WM_DEVICECHANGE: 539 | case WM_WTSSESSION_CHANGE: 540 | HookReset(); 541 | break; 542 | } 543 | 544 | TForm::WndProc(Message); 545 | } 546 | 547 | // --------------------------------------------------------------------------- 548 | void TFormMousePuff1::HookReset() 549 | { 550 | if (chkEnabled->Checked) 551 | { 552 | timerResetHook->Enabled = false; 553 | timerResetHook->Enabled = true; 554 | } 555 | } 556 | 557 | // --------------------------------------------------------------------------- 558 | void __fastcall TFormMousePuff1::timerResetHookTimer(TObject *Sender) 559 | { 560 | timerResetHook->Enabled = false; 561 | MyHook(); 562 | // MessageBeep(0); 563 | } 564 | 565 | // --------------------------------------------------------------------------- 566 | void __fastcall TFormMousePuff1::editTimeoutChange(TObject *Sender) 567 | { 568 | TimerReset(); 569 | } 570 | 571 | // --------------------------------------------------------------------------- 572 | void __fastcall TFormMousePuff1::chkHideTrayIconClick(TObject *Sender) 573 | { 574 | trayIcon->Visible = !chkHideTrayIcon->Checked; 575 | } 576 | // --------------------------------------------------------------------------- 577 | -------------------------------------------------------------------------------- /Hider/Hider.cbproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | {209D88AC-2335-4B2F-B358-D56B276FCC86} 4 | 18.4 5 | VCL 6 | Hider.cpp 7 | True 8 | Release 9 | Win32 10 | 1 11 | Application 12 | 13 | 14 | true 15 | 16 | 17 | true 18 | Base 19 | true 20 | 21 | 22 | true 23 | Base 24 | true 25 | 26 | 27 | true 28 | Base 29 | true 30 | 31 | 32 | true 33 | Cfg_1 34 | true 35 | true 36 | 37 | 38 | true 39 | Cfg_1 40 | true 41 | true 42 | 43 | 44 | true 45 | Base 46 | true 47 | 48 | 49 | true 50 | Cfg_2 51 | true 52 | true 53 | 54 | 55 | true 56 | Cfg_2 57 | true 58 | true 59 | 60 | 61 | Hider 62 | SDIPCH.h 63 | bdertl;inetdbbde;MetropolisUILiveTile;vcldbx;vclribbon;$(PackageImports) 64 | <_TCHARMapping>wchar_t 65 | true 66 | CppVCLApplication 67 | System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace) 68 | $(BDS)\bin\cbuilder_PROJECTICON.ico 69 | JPHNE 70 | true 71 | true 72 | .\$(Platform)\$(Config) 73 | .\$(Platform)\$(Config) 74 | false 75 | true 76 | true 77 | vcl.lib;rtl.lib 78 | 79 | 80 | exe 81 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) 82 | $(BDSINCLUDE)\windows\vcl;$(IncludePath) 83 | true 84 | 1033 85 | $(BDS)\bin\default_app.manifest 86 | CompanyName=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.0.0.0;Comments=;ProgramID=com.embarcadero.$(MSBuildProjectName);FileDescription=$(MSBuildProjectName);ProductName=$(MSBuildProjectName) 87 | true 88 | $(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_44.png 89 | $(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png 90 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png 91 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png 92 | 93 | 94 | 1033 95 | $(BDS)\bin\default_app.manifest 96 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) 97 | true 98 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= 99 | true 100 | $(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_44.png 101 | $(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png 102 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_44.png 103 | $(BDS)\bin\Artwork\Windows\UWP\delphi_UwpDefault_150.png 104 | 105 | 106 | false 107 | true 108 | false 109 | true 110 | false 111 | None 112 | DEBUG 113 | true 114 | true 115 | true 116 | true 117 | Full 118 | true 119 | $(BDSLIB)\$(PLATFORM)\debug;$(ILINK_LibraryPath) 120 | 121 | 122 | _DEBUG;$(Defines) 123 | Debug 124 | true 125 | 1033 126 | true 127 | vcl.lib;rtl.lib 128 | 129 | 130 | _DEBUG;$(Defines) 131 | 132 | 133 | None 134 | 135 | 136 | NDEBUG;$(Defines) 137 | vcl.lib;rtl.lib 138 | false 139 | true 140 | 6 141 | 6 142 | 1033 143 | CompanyName=;FileVersion=1.6.6.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductVersion=1.6.6.0;Comments=;ProgramID=;FileDescription=MousePuff by furniture;ProductName= 144 | true 145 | false 146 | None 147 | ..\Release 148 | ..\MousePuff_Icon.ico 149 | Debug 150 | 151 | 152 | NDEBUG;$(Defines) 153 | 154 | 155 | 156 | 0 157 | 158 | 159 | 1 160 | 161 | 162 | 2 163 | 164 | 165 | Cfg_2 166 | Base 167 | 168 | 169 | Base 170 | 171 | 172 | Cfg_1 173 | Base 174 | 175 | 176 | 177 | CPlusPlusBuilder.Personality.12 178 | CppVCLApplication 179 | 180 | 181 | 182 | False 183 | False 184 | 1 185 | 0 186 | 0 187 | 0 188 | False 189 | False 190 | False 191 | False 192 | False 193 | 1033 194 | 1252 195 | 196 | 197 | 198 | 199 | 1.0.0.0 200 | 201 | 202 | 203 | 204 | 205 | 1.0.0.0 206 | 207 | 208 | 209 | False 210 | True 211 | True 212 | False 213 | 214 | 215 | Hider.cpp 216 | 217 | 218 | DBExpress Enterprise Data Explorer Integration 219 | Embarcadero C++Builder Office 2000 Servers Package 220 | Embarcadero C++Builder Office XP Servers Package 221 | 222 | 223 | 224 | True 225 | False 226 | 227 | 228 | 229 | 230 | true 231 | 232 | 233 | 234 | 235 | true 236 | 237 | 238 | 239 | 240 | true 241 | 242 | 243 | 244 | 245 | true 246 | 247 | 248 | 249 | 250 | true 251 | 252 | 253 | 254 | 255 | true 256 | 257 | 258 | 259 | 260 | .\ 261 | true 262 | 263 | 264 | 265 | 266 | true 267 | 268 | 269 | 270 | 271 | true 272 | 273 | 274 | 275 | 276 | Hider.tds 277 | true 278 | 279 | 280 | 281 | 282 | true 283 | 284 | 285 | 286 | 287 | true 288 | 289 | 290 | 291 | 292 | Hider.exe 293 | true 294 | 295 | 296 | 297 | 298 | 1 299 | 300 | 301 | Contents\MacOS 302 | 1 303 | 304 | 305 | Contents\MacOS 306 | 0 307 | 308 | 309 | 310 | 311 | classes 312 | 1 313 | 314 | 315 | 316 | 317 | library\lib\armeabi-v7a 318 | 1 319 | 320 | 321 | 322 | 323 | library\lib\armeabi 324 | 1 325 | 326 | 327 | 328 | 329 | library\lib\mips 330 | 1 331 | 332 | 333 | 334 | 335 | library\lib\armeabi-v7a 336 | 1 337 | 338 | 339 | 340 | 341 | res\drawable 342 | 1 343 | 344 | 345 | 346 | 347 | res\values 348 | 1 349 | 350 | 351 | 352 | 353 | res\drawable 354 | 1 355 | 356 | 357 | 358 | 359 | res\drawable-xxhdpi 360 | 1 361 | 362 | 363 | 364 | 365 | res\drawable-ldpi 366 | 1 367 | 368 | 369 | 370 | 371 | res\drawable-mdpi 372 | 1 373 | 374 | 375 | 376 | 377 | res\drawable-hdpi 378 | 1 379 | 380 | 381 | 382 | 383 | res\drawable-xhdpi 384 | 1 385 | 386 | 387 | 388 | 389 | res\drawable-small 390 | 1 391 | 392 | 393 | 394 | 395 | res\drawable-normal 396 | 1 397 | 398 | 399 | 400 | 401 | res\drawable-large 402 | 1 403 | 404 | 405 | 406 | 407 | res\drawable-xlarge 408 | 1 409 | 410 | 411 | 412 | 413 | 1 414 | 415 | 416 | Contents\MacOS 417 | 1 418 | 419 | 420 | 0 421 | 422 | 423 | 424 | 425 | Contents\MacOS 426 | 1 427 | .framework 428 | 429 | 430 | 0 431 | 432 | 433 | 434 | 435 | 1 436 | .dylib 437 | 438 | 439 | 1 440 | .dylib 441 | 442 | 443 | 1 444 | .dylib 445 | 446 | 447 | Contents\MacOS 448 | 1 449 | .dylib 450 | 451 | 452 | 0 453 | .dll;.bpl 454 | 455 | 456 | 457 | 458 | 1 459 | .dylib 460 | 461 | 462 | 1 463 | .dylib 464 | 465 | 466 | 1 467 | .dylib 468 | 469 | 470 | Contents\MacOS 471 | 1 472 | .dylib 473 | 474 | 475 | 0 476 | .bpl 477 | 478 | 479 | 480 | 481 | 0 482 | 483 | 484 | 0 485 | 486 | 487 | 0 488 | 489 | 490 | 0 491 | 492 | 493 | Contents\Resources\StartUp\ 494 | 0 495 | 496 | 497 | 0 498 | 499 | 500 | 501 | 502 | 1 503 | 504 | 505 | 1 506 | 507 | 508 | 1 509 | 510 | 511 | 512 | 513 | 1 514 | 515 | 516 | 1 517 | 518 | 519 | 1 520 | 521 | 522 | 523 | 524 | 1 525 | 526 | 527 | 1 528 | 529 | 530 | 1 531 | 532 | 533 | 534 | 535 | 1 536 | 537 | 538 | 1 539 | 540 | 541 | 1 542 | 543 | 544 | 545 | 546 | 1 547 | 548 | 549 | 1 550 | 551 | 552 | 1 553 | 554 | 555 | 556 | 557 | 1 558 | 559 | 560 | 1 561 | 562 | 563 | 1 564 | 565 | 566 | 567 | 568 | 1 569 | 570 | 571 | 1 572 | 573 | 574 | 1 575 | 576 | 577 | 578 | 579 | 1 580 | 581 | 582 | 583 | 584 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 585 | 1 586 | 587 | 588 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 589 | 1 590 | 591 | 592 | 593 | 594 | 1 595 | 596 | 597 | 1 598 | 599 | 600 | 601 | 602 | ..\ 603 | 1 604 | 605 | 606 | ..\ 607 | 1 608 | 609 | 610 | 611 | 612 | 1 613 | 614 | 615 | 1 616 | 617 | 618 | 1 619 | 620 | 621 | 622 | 623 | 1 624 | 625 | 626 | 1 627 | 628 | 629 | 1 630 | 631 | 632 | 633 | 634 | ..\ 635 | 1 636 | 637 | 638 | 639 | 640 | Contents 641 | 1 642 | 643 | 644 | 645 | 646 | Contents\Resources 647 | 1 648 | 649 | 650 | 651 | 652 | library\lib\armeabi-v7a 653 | 1 654 | 655 | 656 | 1 657 | 658 | 659 | 1 660 | 661 | 662 | 1 663 | 664 | 665 | 1 666 | 667 | 668 | Contents\MacOS 669 | 1 670 | 671 | 672 | 0 673 | 674 | 675 | 676 | 677 | 1 678 | 679 | 680 | 1 681 | 682 | 683 | 684 | 685 | Assets 686 | 1 687 | 688 | 689 | Assets 690 | 1 691 | 692 | 693 | 694 | 695 | Assets 696 | 1 697 | 698 | 699 | Assets 700 | 1 701 | 702 | 703 | 704 | 705 | 706 | 707 | 708 | 709 | 710 | 711 | 712 | 713 | 12 714 | 715 | 716 | 717 | 718 | 719 | -------------------------------------------------------------------------------- /MousePuff.cbproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | {D2255A84-CBA7-4110-92CA-BD5EA9F95FAC} 4 | 18.4 5 | MousePuff.cpp 6 | Release 7 | VCL 8 | True 9 | Win32 10 | 1 11 | Application 12 | 13 | 14 | true 15 | 16 | 17 | true 18 | Base 19 | true 20 | 21 | 22 | true 23 | Base 24 | true 25 | 26 | 27 | true 28 | Base 29 | true 30 | 31 | 32 | true 33 | Cfg_1 34 | true 35 | true 36 | 37 | 38 | true 39 | Cfg_1 40 | true 41 | true 42 | 43 | 44 | true 45 | Base 46 | true 47 | 48 | 49 | true 50 | Cfg_2 51 | true 52 | true 53 | 54 | 55 | true 56 | Cfg_2 57 | true 58 | true 59 | 60 | 61 | <_TCHARMapping>wchar_t 62 | rtl.lib;vcl.lib 63 | true 64 | vcl.bpi;rtl.bpi;bcbie.bpi;vclx.bpi;vclactnband.bpi;xmlrtl.bpi;bcbsmp.bpi;dbrtl.bpi;vcldb.bpi;vcldbx.bpi;bdertl.bpi;dsnap.bpi;dsnapcon.bpi;TeeUI.bpi;TeeDB.bpi;Tee.bpi;adortl.bpi;IndyCore.bpi;IndySystem.bpi;IndyProtocols.bpi;$(PackageImports) 65 | rtl.lib;vcl.lib 66 | CppVCLApplication 67 | JPHNE 68 | ..\MousePuff;$(BDS)\include;$(CG_BOOST_ROOT);$(IncludePath) 69 | ..\MousePuff;$(BDS)\lib;$(BDS)\lib\obj;$(BDS)\lib\psdk;$(ILINK_LibraryPath) 70 | false 71 | true 72 | MousePuff 73 | Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) 74 | 1033 75 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= 76 | true 77 | 78 | 79 | $(BDSINCLUDE)\windows\vcl;$(IncludePath) 80 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) 81 | Debug 82 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;ProgramID= 83 | $(BDS)\bin\default_app.manifest 84 | MousePuff_Icon.ico 85 | UNICODE;_UNICODE;OEMRESOURCE;$(Defines) 86 | exe 87 | true 88 | $(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_44.png 89 | $(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png 90 | 91 | 92 | $(BDSINCLUDE)\windows\vcl;$(IncludePath) 93 | $(BDS)\bin\default_app.manifest 94 | MousePuff_Icon.ico 95 | UNICODE;_UNICODE;OEMRESOURCE;$(Defines) 96 | true 97 | $(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_44.png 98 | $(BDS)\bin\Artwork\Windows\UWP\cppreg_UwpDefault_150.png 99 | Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace) 100 | Debug 101 | CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= 102 | 103 | 104 | false 105 | true 106 | false 107 | true 108 | false 109 | Debug 110 | true 111 | None 112 | DEBUG 113 | true 114 | true 115 | true 116 | $(BDS)\lib\debug;$(ILINK_LibraryPath) 117 | true 118 | Full 119 | true 120 | 121 | 122 | true 123 | true 124 | _DEBUG;$(Defines) 125 | CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=;ProgramID= 126 | 127 | 128 | _DEBUG;$(Defines) 129 | true 130 | true 131 | 132 | 133 | Release 134 | $(BDS)\lib\release;$(ILINK_LibraryPath) 135 | None 136 | 137 | 138 | true 139 | true 140 | NDEBUG;$(Defines) 141 | CompanyName=;FileDescription=MousePuff by furniture;FileVersion=1.6.6.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.6.6.0;Comments=;ProgramID= 142 | 6 143 | requireAdministrator 144 | 6 145 | None 146 | 147 | 148 | NDEBUG;$(Defines) 149 | true 150 | true 151 | 0 152 | CompanyName=;FileDescription=$(MSBuildProjectName);FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProgramID=com.embarcadero.$(MSBuildProjectName);ProductName=$(MSBuildProjectName);ProductVersion=1.0.0.0;Comments= 153 | 154 | 155 | 156 | Cursor 157 | Cursor_Blank 158 | 159 | 160 |
FormMousePuff1
161 | Main.h 162 | 2 163 |
164 | 165 | 0 166 | 167 | 168 | 1 169 | 170 | 171 | 172 | Cfg_2 173 | Base 174 | 175 | 176 | Base 177 | 178 | 179 | Cfg_1 180 | Base 181 | 182 |
183 | 184 | 185 | CPlusPlusBuilder.Personality.12 186 | CppVCLApplication 187 | 188 | 189 | 190 | MousePuff.cpp 191 | 192 | 193 | True 194 | False 195 | 1 196 | 2 197 | 0 198 | 0 199 | False 200 | False 201 | False 202 | False 203 | False 204 | 1033 205 | 1252 206 | 207 | 208 | 209 | MousePuff by furniture 210 | 1.2.0.0 211 | 212 | 213 | 214 | 215 | 216 | 1.2.0.0 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | False 226 | 227 | 228 | 229 | 230 | 231 | 232 | False 233 | 234 | False 235 | 236 | True 237 | False 238 | 239 | 240 | False 241 | True 242 | True 243 | False 244 | 245 | 246 | DBExpress Enterprise Data Explorer Integration 247 | Embarcadero C++Builder Office 2000 Servers Package 248 | Embarcadero C++Builder Office XP Servers Package 249 | 250 | 251 | 252 | True 253 | False 254 | 255 | 256 | 257 | 258 | true 259 | 260 | 261 | 262 | 263 | true 264 | 265 | 266 | 267 | 268 | true 269 | 270 | 271 | 272 | 273 | true 274 | 275 | 276 | 277 | 278 | true 279 | 280 | 281 | 282 | 283 | .\ 284 | true 285 | 286 | 287 | 288 | 289 | true 290 | 291 | 292 | 293 | 294 | true 295 | 296 | 297 | 298 | 299 | true 300 | 301 | 302 | 303 | 304 | true 305 | 306 | 307 | 308 | 309 | MousePuff.exe 310 | true 311 | 312 | 313 | 314 | 315 | .\ 316 | true 317 | 318 | 319 | 320 | 321 | true 322 | 323 | 324 | 325 | 326 | 1 327 | 328 | 329 | Contents\MacOS 330 | 1 331 | 332 | 333 | Contents\MacOS 334 | 0 335 | 336 | 337 | 338 | 339 | classes 340 | 1 341 | 342 | 343 | 344 | 345 | library\lib\armeabi-v7a 346 | 1 347 | 348 | 349 | 350 | 351 | library\lib\armeabi 352 | 1 353 | 354 | 355 | 356 | 357 | library\lib\mips 358 | 1 359 | 360 | 361 | 362 | 363 | library\lib\armeabi-v7a 364 | 1 365 | 366 | 367 | 368 | 369 | res\drawable 370 | 1 371 | 372 | 373 | 374 | 375 | res\values 376 | 1 377 | 378 | 379 | 380 | 381 | res\drawable 382 | 1 383 | 384 | 385 | 386 | 387 | res\drawable-xxhdpi 388 | 1 389 | 390 | 391 | 392 | 393 | res\drawable-ldpi 394 | 1 395 | 396 | 397 | 398 | 399 | res\drawable-mdpi 400 | 1 401 | 402 | 403 | 404 | 405 | res\drawable-hdpi 406 | 1 407 | 408 | 409 | 410 | 411 | res\drawable-xhdpi 412 | 1 413 | 414 | 415 | 416 | 417 | res\drawable-small 418 | 1 419 | 420 | 421 | 422 | 423 | res\drawable-normal 424 | 1 425 | 426 | 427 | 428 | 429 | res\drawable-large 430 | 1 431 | 432 | 433 | 434 | 435 | res\drawable-xlarge 436 | 1 437 | 438 | 439 | 440 | 441 | 1 442 | 443 | 444 | Contents\MacOS 445 | 1 446 | 447 | 448 | 0 449 | 450 | 451 | 452 | 453 | Contents\MacOS 454 | 1 455 | .framework 456 | 457 | 458 | 0 459 | 460 | 461 | 462 | 463 | 1 464 | .dylib 465 | 466 | 467 | 1 468 | .dylib 469 | 470 | 471 | 1 472 | .dylib 473 | 474 | 475 | Contents\MacOS 476 | 1 477 | .dylib 478 | 479 | 480 | 0 481 | .dll;.bpl 482 | 483 | 484 | 485 | 486 | 1 487 | .dylib 488 | 489 | 490 | 1 491 | .dylib 492 | 493 | 494 | 1 495 | .dylib 496 | 497 | 498 | Contents\MacOS 499 | 1 500 | .dylib 501 | 502 | 503 | 0 504 | .bpl 505 | 506 | 507 | 508 | 509 | 0 510 | 511 | 512 | 0 513 | 514 | 515 | 0 516 | 517 | 518 | 0 519 | 520 | 521 | Contents\Resources\StartUp\ 522 | 0 523 | 524 | 525 | 0 526 | 527 | 528 | 529 | 530 | 1 531 | 532 | 533 | 1 534 | 535 | 536 | 1 537 | 538 | 539 | 540 | 541 | 1 542 | 543 | 544 | 1 545 | 546 | 547 | 1 548 | 549 | 550 | 551 | 552 | 1 553 | 554 | 555 | 1 556 | 557 | 558 | 1 559 | 560 | 561 | 562 | 563 | 1 564 | 565 | 566 | 1 567 | 568 | 569 | 1 570 | 571 | 572 | 573 | 574 | 1 575 | 576 | 577 | 1 578 | 579 | 580 | 1 581 | 582 | 583 | 584 | 585 | 1 586 | 587 | 588 | 1 589 | 590 | 591 | 1 592 | 593 | 594 | 595 | 596 | 1 597 | 598 | 599 | 1 600 | 601 | 602 | 1 603 | 604 | 605 | 606 | 607 | 1 608 | 609 | 610 | 611 | 612 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 613 | 1 614 | 615 | 616 | ..\$(PROJECTNAME).app.dSYM\Contents\Resources\DWARF 617 | 1 618 | 619 | 620 | 621 | 622 | 1 623 | 624 | 625 | 1 626 | 627 | 628 | 629 | 630 | ..\ 631 | 1 632 | 633 | 634 | ..\ 635 | 1 636 | 637 | 638 | 639 | 640 | 1 641 | 642 | 643 | 1 644 | 645 | 646 | 1 647 | 648 | 649 | 650 | 651 | 1 652 | 653 | 654 | 1 655 | 656 | 657 | 1 658 | 659 | 660 | 661 | 662 | ..\ 663 | 1 664 | 665 | 666 | 667 | 668 | Contents 669 | 1 670 | 671 | 672 | 673 | 674 | Contents\Resources 675 | 1 676 | 677 | 678 | 679 | 680 | library\lib\armeabi-v7a 681 | 1 682 | 683 | 684 | 1 685 | 686 | 687 | 1 688 | 689 | 690 | 1 691 | 692 | 693 | 1 694 | 695 | 696 | Contents\MacOS 697 | 1 698 | 699 | 700 | 0 701 | 702 | 703 | 704 | 705 | 1 706 | 707 | 708 | 1 709 | 710 | 711 | 712 | 713 | Assets 714 | 1 715 | 716 | 717 | Assets 718 | 1 719 | 720 | 721 | 722 | 723 | Assets 724 | 1 725 | 726 | 727 | Assets 728 | 1 729 | 730 | 731 | 732 | 733 | 734 | 735 | 736 | 737 | 738 | 739 | 740 | 741 | 12 742 | 743 | 744 | 745 |
746 | --------------------------------------------------------------------------------