Brief
A header-only library that exposes common file dialogs, message boxes and notifications for desktop platforms.
Linking & Dependencies
This library is distributed as a single, header-only file, thus the following instructions
are meant to be considered for your final application/dynamic library.
In general, I make use of the up-to-date platform specific APIs, that should be available
with every distribution of said platform's development environment.
Windows
At compile-time this library requires only kernel32.lib. The rest of the functions are loaded dynamically
via GetProcAddress. Additionally, this library uses the COM API. For reference, here are the
libraries it tries to load:
- User32.dll
- Ole32.dll
Reference
Show a message box
| title_len | The length of the title, in bytes |
| title | The title, as a UTF-8 string |
| description_len | The length of the description, in bytes |
| description | The description, as a UTF-8 string |
| options | The options |
| Returns | The option the user selected |
Show a 'Select File' dialog for a single file
| title_len | The length of the prompt title, in bytes |
| title | The prompt title, as a UTF-8 string |
| path_len | Optional) The length of the path to default to, in bytes |
| path | Optional) The path to default to, as a UTF-8 string |
| num_filters | The count of the file type filters |
| filters | The file type filters |
| default_filter | Zero based index into filters to use as the default filter |
| options | Options for the file dialog |
| Returns | The selected file, all zeroes if 'Cancel' was pressed |
Set the context for any upcoming calls (this is usually the window owner)
| pf_context | Win32(HWND*) |