Skip to content

Latest commit

 

History

History

gui-examples

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

C++ Examples with Graphical UIs

ISO C++ project Directory gui-examples\ contains C++ code examples from various websites which use the Win32 API on Windows.
It also includes build scripts (batch files, Make scripts) for experimenting with C++ on a Windows machine.

The code examples presented below can be built/run with the following tools:

Build tool Build file Parent file Environment(s)
cmd.exe build.bat   Windows only
make.exe Makefile Makefile.inc Any a)
a) Here "Any" means "tested on Windows, Cygwin, MSYS2 and UNIX".
 

simple-window Example

Example simple-window is presented in the online document theForger's Win32 API Tutorial; it has the following directory structure :

> tree /a /f . | findstr /v /b [A-Z]
|   00download.txt
|   build.bat
|   build.sh
|   CMakeLists.txt
|   Doxyfile
|   Makefile
\---src
        main.cpp

Command buildclean run generates and executes the C++ program build\Release\simple-windows.exe :

> build -verbose clean run
Delete directory "build"
Configuration: Release Platform: x64
Generate configuration files into directory "build"
Generate executable "simple-window.exe"
Execute "build\Release\simple-window.exe"


> make clean run
"C:/opt/msys64/usr/bin/rm.exe" -rf "build"
"C:/opt/msys64/mingw64/bin/g++.exe"  --std=c++17 -O2 -Wall -Wno-unused-variable  -o build/Release/simple-window.exe src/main.cpp -Wl,--subsystem,windows
build/Release/simple-window.exe

mics/March 2025