This project is a simple Windows application that allows users to send the "Insert" key to a selected window from a list of currently visible windows. The application enumerates all visible windows, populates a combo box with their titles, and sends the "Insert" key to the selected window when a button is clicked.
- Enumerates and displays visible windows in a combo box.
- Sends the "Insert" key to the selected window.
- Simple and easy-to-use graphical interface.
- Windows operating system
- Visual Studio or any compatible C++ development environment
-
Clone the repository:
git clone https://github.com/yourusername/On-Screen-Insert-Key.git
-
Open the project in Visual Studio.
-
Build the project:
- Select
Buildfrom the menu. - Click
Build Solution.
- Select
Important: The application must be run in administrator mode to function properly. This is because sending key inputs to other windows requires elevated privileges.
To run the application as an administrator:
- Locate the executable file of the application or the Visual Studio project file.
- Right-click the file.
- Select "Run as administrator" from the context menu.
- Confirm any prompts from the User Account Control (UAC) dialog to allow the application to run with elevated privileges.
- Launch the application as an administrator.
- The combo box will be populated with the titles of currently visible windows.
- Select a window from the combo box.
- Click the "Insert" button to send the "Insert" key to the selected window.
CLASS_NAME: The name of the window class.WINDOW_TITLE: The title of the window.hwndComboBox,hwndButton: Handles for the combo box and button.windowHandles: A vector to store the handles of the enumerated windows.
- EnumWindowsProc: Callback function used by
EnumWindowsto enumerate all top-level windows. - PopulateComboBox: Clears and repopulates the combo box and
windowHandlesvector. - SendInsertKeyToWindow: Sends the "Insert" key to the specified window.
- WindowProc: Processes messages sent to the window.
- wWinMain: The entry point of the application.
This project is licensed under the MIT License - see the LICENSE file for details.
- Fork the repository.
- Create your feature branch (
git checkout -b feature/AmazingFeature). - Commit your changes (
git commit -m 'Add some AmazingFeature'). - Push to the branch (
git push origin feature/AmazingFeature). - Open a pull request.
- Inspiration from various Windows API examples and tutorials.