Common Controls - Calendar
A dialog demo for the date and time picker common controls, with the full ICC_ flag reference.
A dialog demo for the date and time picker common controls, with the full ICC_ flag reference.
A C program that writes to and reads back an NTFS Alternate Data Stream using plain fopen with a file:stream name.
A C++ function that recursively walks a directory tree with FindFirstFile/FindNextFile, printing every file it finds.
A Win32 dialog that displays the current Windows version string, with a ShellAbout entry in the system menu.
A Win32 dialog demo showing how to detect a checkbox click and read its state with IsDlgButtonChecked.
A C console program that copies a file two ways — character at a time with fscanf, then in 512-byte buffered chunks after seeking back to the start.
A minimal C program that opens a file with CreateFile and prints its size in bytes using GetFileSize.
A C program that shows the standard print dialog and sends a line of text to the chosen printer using GDI.
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.
A pair of minimal C console programs — a named-pipe server built with CreateNamedPipe and a client that opens it and writes a message.
A Win32 dialog example showing how to read the state of radio buttons with IsDlgButtonChecked.
A C console utility that attaches to a process by PID with DebugActiveProcess, leaving it suspended until the debugger detaches.
A minimal C++ program that converts the main thread to a fiber, creates a second fiber, and switches between them.
A C console program that prints system memory statistics — physical, page file, and virtual — using GlobalMemoryStatus.
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.
The IContextMenu implementation from the Project Epsilon shell extension — adding a menu item with a bitmap and launching the associated program on selection.
A C program that sets a file's attributes to archive plus read-only using SetFileAttributes.
A C program that connects to a network share with WNetAddConnection, queries it with WNetGetConnection, and disconnects with WNetCancelConnection — each with full error reporting.
A dialog demo for the IP address common control, loaded with ICC_INTERNET_CLASSES.
LCase, UCase and MCase string helpers built on strlwr/strupr with a rotating buffer of results.
The smallest complete Win32 window program: register a class, create a window, run the message loop.
A C helper function that wraps GetOpenFileName with file-type filters, a default extension, and an initial directory.
A dialog demo that displays an animated cursor or icon loaded from a resource or file.
A minimal pair of programs — a DLL exporting two functions and a console app that loads it at runtime with LoadLibrary/GetProcAddress.
The COM plumbing of a Win32 shell extension DLL — DllGetClassObject, the class factory, reference counting, and QueryInterface across all six shell extension interfaces.
A C console program that reports system uptime in days, hours, minutes, and seconds from GetTickCount.
Helper functions and a server/client pair for creating, opening, and mapping named shared memory backed by a file.
A C function that replaces every occurrence of a substring with another substring, building the result into a caller-supplied buffer.
A function that fills a 65 by 256 byte substitution table from a single build value using XOR mixing.
A hand-rolled C substring search that returns the index of the first occurrence, written before reaching for strstr.
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.
A Win32 technique that animates a window sliding up into view from below the desktop edge, driven by a worker thread.
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.
A console snippet that pins a process and thread to a specific CPU using affinity masks and ideal-processor calls.
A snippet that reports a drive's type and its total, free and available space in megabytes.
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.
A snippet that attaches a console to a GUI process and redirects stdout into it.
A C program that queries a drive's volume name, file system, and capability flags with GetVolumeInformation.
A console snippet that spawns a second thread with CreateThread and lets both threads print in parallel.
A console snippet that identifies the running Windows version from GetVersionEx and prints it with build number.
A one-line C program that renames a file on the desktop using MoveFile.
Three tiny C utilities — shutdown, restart, and logoff — each a confirmation dialog followed by one call to ExitWindowsEx.
A Win32 example of running a dialog non-modally with CreateDialog plus a message loop, instead of the blocking DialogBox call.
A minimal DllMain skeleton for a server-side extension DLL, handling process and thread attach/detach with initialization hooks.
A portable registry helper library — create, delete (including recursive via SHDeleteKey), and get/set string, DWORD, and binary values.
A simple linear (bubble-style) sort for an array of C strings, with a pass function that reports how many swaps it made.
A C function that reverses a string in place using the XOR swap trick.
A pair of C programs demonstrating cross-process synchronization with a named event — one waits on it, the other finds and signals it.
A Win32 dialog that displays the system tick count updating as fast as the timer allows — a minimal high-frequency UI refresh example.
A minimal Win32 dialog application skeleton with single-instance mutex and a spinning OpenGL logo about box.
A Win32 dialog example that builds a ListView with columns, a small icon image list, ten rows of data, custom text color, and sorting.
A complete C++ tray-icon wrapper — create, update, and destroy a Shell_NotifyIcon entry with a right-click menu and TaskbarCreated recovery.
A minimal example of declaring a C++ class with public members and using an instance of it.
A header of named constants for every ASCII control character, with a test program that prints their values.
A snippet that creates a new registry key under HKEY_CLASSES_ROOT with RegCreateKeyEx.
A console snippet that walks every drive letter and reports its type with GetDriveType.
A small C program that uses WNetGetUser to retrieve the username associated with a mapped network drive, with full error reporting.
A complete, dependency-free C implementation of the FIPS 180-2 SHA-2 family — SHA-224, SHA-256, SHA-384, and SHA-512.
A snippet that formats the current date and time with GetDateFormat and GetTimeFormat.
A C++ class implementing a page-chained memory allocator (Alloc, CAlloc, ReAlloc, Free) over a single fixed-size virtual memory block.
A minimal Win32 splash screen — a borderless dialog with a bitmap that stays up for five seconds driven by a timer.
A C function that returns a new string with every occurrence of one character replaced by another.
A minimal C DLL with a set of exported system and string functions, plus a console test driver that calls every export.
A minimal C program that opens a registry key and deletes a subkey with RegDeleteKey.
A console snippet that opens a raw disk handle and issues an IOCTL_STORAGE_EJECT_MEDIA control code.
A C console utility that attaches to a running process by PID using DebugActiveProcess and terminates it.
A C program that prints every set file attribute for a given file using GetFileAttributesEx.
A five-line C program that creates a directory with CreateDirectory, waits, and removes it again with RemoveDirectory.
A Win32 dialog application demonstrating ListBox message handling — inserting and deleting items via LB_INSERTSTRING and LB_DELETESTRING.
A C function that formats the current local time as HH:MM:SS using time, localtime, and strftime.
A one-line file deletion using DeleteFile, with the CRT unlink alternative commented alongside.
A C helper that calls RegisterServiceProcess to make the current process count as a Windows service, resolved dynamically from kernel32.
A standalone Win32 program that creates a month calendar common control in its own window.
A complete extended stored procedure (XSP) for SQL Server 2000 that takes a row count and returns that many rows with a greeting message.
Two exported functions that test whether a TCP or UDP port on a host is in use.
A dialog demo that plays an AVI file inside a window using the common controls Animate class.
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.
The minimal Win32 dialog procedure — set title and icon, wire up an edit box and static text, run a one-second timer.
The WNetAddConnection2 variant of the network-drive example, using a NETRESOURCE structure to map a share with full error reporting.
A C program that creates a named mutex and uses GetLastError to detect whether another process already holds it.
A minimal C program that opens a registry key and writes a string value with RegSetValueEx.
A tiny C utility that force-closes every running task with a single ExitWindowsEx(EWX_FORCE) call.
Helper functions that create STATIC and EDIT controls at runtime with a standard font.
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.