C++ Examples with Graphical UIs ⬆
![]() |
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".
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 build
clean 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