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:

  1. User32.dll
  2. Ole32.dll



Reference


int vd_dlg_message_box(int title_len, const char *title, int description_len, const char *description, VdDlgMessageBoxOptions options);

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
VdDlgFileResult vd_dlg_open_file(int title_len, const char *title, int path_len, const char *path, int num_filters, VdDlgFileFilter *filters, int default_filter, VdDlgOpenFileOptions options);

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
void vd_dlg_set_context(void *pf_context);

Set the context for any upcoming calls (this is usually the window owner)

pf_context Win32(HWND*)
© Michael Dodis, 2025-2026. This page was created with DOCUSPEC