The Notes Taking Widget is a Windows application built using the Win32 API that provides a simple way to take notes. It creates a resizable and movable window where users can quickly jot down their thoughts. The widget can be toggled using a keyboard shortcut (Ctrl + Q
).
- Create a resizable and movable notes window.
- Toggle the visibility of the notes window using the keyboard shortcut
Ctrl + Q
. - The notes window remains on top of other windows (
WS_EX_TOPMOST
style).
This application requires a Windows operating system to run.
- Clone or download the repository to your local machine.
- Open the project in a compatible C++ development environment (e.g., Visual Studio).
- Build and run the application.
- The notes widget window will appear.
- To show or hide the notes window, press
Ctrl + Q
. - You can move the notes window by clicking and dragging its title bar.
- Resize the notes window by dragging its edges.
Window.h
- Header file for theWindow
class that manages the notes window.Window.cpp
- Implementation of theWindow
class, including window creation, message processing, and keyboard hook.mainWindow.cpp
- Entry point of the application, where theWindow
class is instantiated, and the main loop is run.
The Window
class manages the notes widget's behavior and appearance.
Constructor: Initializes the window class and creates the main notes window.
Methods:
ShowAtCursor()
: Positions the window at the current cursor position.ToggleWindowVisibility()
: Shows or hides the window based on its current visibility state.processMessages()
: Processes Windows messages and returns a boolean indicating whether the application should continue running.SaveNoteToCSV()
: Saves the entered note to a CSV file when Enter is pressed or the "Note Down" button is clicked.
Static Methods:
KeyboardHookCallback()
: Handles keyboard hook events, specifically toggling the widget's visibility whenCtrl + Q
is pressed.
Member Variables:
m_hInstance
: Handle to the instance of the application.m_hWnd
: Handle to the main notes window.windowHidden
: Indicates whether the notes window is currently hidden.g_keyboardHook
: Static member to store the keyboard hook.
Contributions This Repository is Open to all Contributions and Ideas.