Skip to content
Topics

win32 + cpp

84 results. Clear

A Win32 dialog that displays the current Windows version string, with a ShellAbout entry in the system menu.

26 years ago

A Win32 dialog demo showing how to detect a checkbox click and read its state with IsDlgButtonChecked.

26 years ago

A minimal C program that opens a file with CreateFile and prints its size in bytes using GetFileSize.

26 years ago

A C program that shows the standard print dialog and sends a line of text to the chosen printer using GDI.

26 years ago

A C++ class that implements a full page-based memory allocator (Alloc, CAlloc, ReAlloc, Free, FreeAll) on top of a file-backed memory-mapped region.

26 years ago

A pair of minimal C console programs — a named-pipe server built with CreateNamedPipe and a client that opens it and writes a message.

26 years ago

A C console utility that attaches to a process by PID with DebugActiveProcess, leaving it suspended until the debugger detaches.

26 years ago

NT Fiber

Article

A minimal C++ program that converts the main thread to a fiber, creates a second fiber, and switches between them.

26 years ago

A C console program that prints system memory statistics — physical, page file, and virtual — using GlobalMemoryStatus.

27 years ago

A Win32 dialog example that builds a TreeView with an image list, adds nested nodes, and sub-classes the control to add its own behavior.

27 years ago

The IContextMenu implementation from the Project Epsilon shell extension — adding a menu item with a bitmap and launching the associated program on selection.

27 years ago

A C program that connects to a network share with WNetAddConnection, queries it with WNetGetConnection, and disconnects with WNetCancelConnection — each with full error reporting.

27 years ago

Change Case

Article

LCase, UCase and MCase string helpers built on strlwr/strupr with a rotating buffer of results.

27 years ago

Basic Window

Article

The smallest complete Win32 window program: register a class, create a window, run the message loop.

27 years ago

A C helper function that wraps GetOpenFileName with file-type filters, a default extension, and an initial directory.

27 years ago

A dialog demo that displays an animated cursor or icon loaded from a resource or file.

27 years ago

A minimal pair of programs — a DLL exporting two functions and a console app that loads it at runtime with LoadLibrary/GetProcAddress.

27 years ago

The COM plumbing of a Win32 shell extension DLL — DllGetClassObject, the class factory, reference counting, and QueryInterface across all six shell extension interfaces.

27 years ago

A C console program that reports system uptime in days, hours, minutes, and seconds from GetTickCount.

27 years ago

Helper functions and a server/client pair for creating, opening, and mapping named shared memory backed by a file.

27 years ago

A C function that replaces every occurrence of a substring with another substring, building the result into a caller-supplied buffer.

27 years ago

A function that fills a 65 by 256 byte substitution table from a single build value using XOR mixing.

28 years ago

A hand-rolled C substring search that returns the index of the first occurrence, written before reaching for strstr.

28 years ago

Four small C functions that return the current, temp, Windows, and system directories, each using a static buffer ring to stay safe across repeated calls.

28 years ago

A Win32 technique that animates a window sliding up into view from below the desktop edge, driven by a worker thread.

28 years ago

Hash Table

Article

A public-domain C hash table (by Jerry Coffin) with insert, lookup, delete, enumerate, and free operations, plus a driver that exercises the full lifecycle.

28 years ago

A C++ program that writes a DWORD to a file with ofstream and reads it back with ifstream — raw binary I/O through the standard streams.

28 years ago

AllocConsole

Article

A snippet that attaches a console to a GUI process and redirects stdout into it.

28 years ago

A C program that queries a drive's volume name, file system, and capability flags with GetVolumeInformation.

28 years ago

A console snippet that spawns a second thread with CreateThread and lets both threads print in parallel.

28 years ago

A console snippet that identifies the running Windows version from GetVersionEx and prints it with build number.

28 years ago

Three tiny C utilities — shutdown, restart, and logoff — each a confirmation dialog followed by one call to ExitWindowsEx.

28 years ago

A Win32 example of running a dialog non-modally with CreateDialog plus a message loop, instead of the blocking DialogBox call.

28 years ago

A minimal DllMain skeleton for a server-side extension DLL, handling process and thread attach/detach with initialization hooks.

28 years ago

A portable registry helper library — create, delete (including recursive via SHDeleteKey), and get/set string, DWORD, and binary values.

29 years ago

Signal Event

Article

A pair of C programs demonstrating cross-process synchronization with a named event — one waits on it, the other finds and signals it.

29 years ago

A Win32 dialog that displays the system tick count updating as fast as the timer allows — a minimal high-frequency UI refresh example.

29 years ago

App Template

Article

A minimal Win32 dialog application skeleton with single-instance mutex and a spinning OpenGL logo about box.

29 years ago

A Win32 dialog example that builds a ListView with columns, a small icon image list, ten rows of data, custom text color, and sorting.

29 years ago

A complete C++ tray-icon wrapper — create, update, and destroy a Shell_NotifyIcon entry with a right-click menu and TaskbarCreated recovery.

29 years ago

C++ Classes

Article

A minimal example of declaring a C++ class with public members and using an instance of it.

29 years ago

A header of named constants for every ASCII control character, with a test program that prints their values.

29 years ago

CreateKey

Article

A snippet that creates a new registry key under HKEY_CLASSES_ROOT with RegCreateKeyEx.

29 years ago

DiskType

Article

A console snippet that walks every drive letter and reports its type with GetDriveType.

29 years ago

Date-Time

Article

A snippet that formats the current date and time with GetDateFormat and GetTimeFormat.

30 years ago

A C++ class implementing a page-chained memory allocator (Alloc, CAlloc, ReAlloc, Free) over a single fixed-size virtual memory block.

30 years ago

A minimal Win32 splash screen — a borderless dialog with a bitmap that stays up for five seconds driven by a timer.

30 years ago

DLL Skeleton

Article

A minimal C DLL with a set of exported system and string functions, plus a console test driver that calls every export.

30 years ago

A console snippet that opens a raw disk handle and issues an IOCTL_STORAGE_EJECT_MEDIA control code.

30 years ago

Kill Process

Article

A C console utility that attaches to a running process by PID using DebugActiveProcess and terminates it.

30 years ago

A Win32 dialog application demonstrating ListBox message handling — inserting and deleting items via LB_INSERTSTRING and LB_DELETESTRING.

30 years ago

Time Display

Article

A C function that formats the current local time as HH:MM:SS using time, localtime, and strftime.

30 years ago

A C helper that calls RegisterServiceProcess to make the current process count as a Windows service, resolved dynamically from kernel32.

31 years ago

A standalone Win32 program that creates a month calendar common control in its own window.

31 years ago

A complete extended stored procedure (XSP) for SQL Server 2000 that takes a row count and returns that many rows with a greeting message.

31 years ago

Two exported functions that test whether a TCP or UDP port on a host is in use.

31 years ago

AVI Control

Article

A dialog demo that plays an AVI file inside a window using the common controls Animate class.

31 years ago

Load Cursor

Article

A Win32 dialog example showing how to load cursors from system resources, compiled resources, and an .ani file on disk, then apply them with SetClassLong.

31 years ago

The minimal Win32 dialog procedure — set title and icon, wire up an edit box and static text, run a one-second timer.

31 years ago

Named Mutex

Article

A C program that creates a named mutex and uses GetLastError to detect whether another process already holds it.

31 years ago

True Wait

Article

A C helper that performs a timed wait on a background thread, flipping a flag when the interval elapses so the caller can keep working meanwhile.

31 years ago
An unhandled error has occurred. Reload 🗙