This repository contains examples of Windows GUI applications using the Win32 API. Each example demonstrates specific aspects of Win32 development, such as window creation, event handling, and custom rendering.
Basic Win32 window creation Message loop and event handling User interaction via buttons and menus Custom drawing with GDI Dialog boxes and additional UI elements ##🛠 Installation Clone the repository: git clone https://github.com/avelic5/Win32GUIExamples-.git Open the project in any C development environment that supports Win32 API (e.g., Visual Studio, Code::Blocks, MinGW, CMake with Ninja, etc.). Compile and run the examples using the provided source files.
Below are descriptions of each example.
This example demonstrates how to draw the Olympic Rings using the GDI in a Win32 application. It covers:
- Handling WM_PAINT messages
- Drawing circles in different colors to create the Olympic rings
- Using BeginPaint and EndPaint for efficient rendering
This example allows the user to input two separate messages and then combines them by pressing a button. Key features include:
- Capturing user input through text fields
- Dynamically updating the window with the merged message after button click
- Handling WM_COMMAND for button interaction
In this example, the user enters a message, and after pressing a button, a new window pops up displaying that message. Key concepts:
- Capturing and handling user input
- Creating and managing multiple windows
- Displaying a message in a new window
This example shows how to create a button that starts a timer to track the time elapsed after it is pressed. Features include:
- Starting a timer when the button is clicked
- Displaying the time elapsed since the button press
- Handling WM_TIMER for time updates
This example allows the user to input a number, which then determines the size of two circles: one on the left and one on the right. It covers:
Capturing user input
- Dynamically adjusting UI elements
- Redrawing circles based on the selected value
- Handling WM_PAINT for real-time updates
This example simulates a simple musical note selection interface. The user can press a button to display one of the musical notes: Do, Re, Mi, Fa, So, La. Key features include:
- Creating buttons for each musical note
- Handling button click events
- Updating the window to display the selected note





