$ show katahiromz/RisohEditor
RisohEditor is a mature Win32 desktop application for editing, creating, and translating Windows PE resources (.exe, .dll, .rc, .res files). It supports all standard resource types including icons, cursors, bitmaps, dialogs, menus, accelerators, string tables, version info, message tables, toolbars, manifests, HTML, and custom binary data. The application provides a visual dialog editor (RADical) with drag-and-drop control placement, a tree-view resource browser, a hex viewer, and a code editor for RC text. It integrates with external tools like windres, mcpp (preprocessor), UPX (compression), and includes an embedded scripting language (EGA) for batch automation. Architecture follows the Win32 SDK pattern with custom MFC-like wrappers (MZC4 library) for window subclassing, property sheets, splitters, and utility classes. Resource parsing and serialization is done per-type via dedicated classes (e.g., IconRes, MenuRes, DialogRes) that implement LoadFromStream/SaveToStream. The application maintains a global resource database (g_res) and constants database (g_db) for ID resolution. It supports 17+ UI languages and can encrypt resources via WonRes submodule. Entry points include MMainWnd (main window) and the command-line interface for batch processing.
The LLM identified 5 files worth highlighting for reuse:
Provides a robust binary stream abstraction with read/write methods for fundamental types, bounds checking, and alignment handling. Used throughout the resource parsers. Demonstrates careful error handling and is self-contained, making it reusable for any project that needs to serialize/deserialize binary data from a buffer.
Encapsulates CreateProcess with stdout/stderr capture, timeout handling via ReadAll method, and cleanup. Supports preparation for output redirection. A clean, reusable component for any Win32 application that needs to run external tools and capture their output.
Abstracts Windows registry access behind a portable interface. When compiled with PORTABLE define, it falls back to INI file storage. Demonstrates a strategy pattern for configuration persistence without changing client code. Self-contained and easily extractable.
Implements a splitter window with two panes that can be resized by dragging. Handles proportional sizing, minimum pane sizes, and hit testing. Built on Win32 raw window creation, making it reusable in any Win32 project without MFC dependency.
Provides a robust binary stream abstraction with read/write methods for fundamental types, bounds checking, and alignment handling. Used throughout the resource parsers. Demonstrates careful error handling and is self-contained, making it reusable for any project that needs to serialize/deserialize binary data from a buffer.