-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDMSMessageBox.h
More file actions
35 lines (26 loc) · 1009 Bytes
/
Copy pathDMSMessageBox.h
File metadata and controls
35 lines (26 loc) · 1009 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*
DMSMessageBox.h
Copyright (C) 2026 by AnotherCommander
A Dark Mode - Sensitive implementation of MessageBox.
Supports MB_OK, MB_YESNO and MB_OKCANCEL message boxes
with either no or with inormation, warning, error
and questions icons. DMSMessageBox honors the currently
selected mode (light or dark) and can be updated in
real time when such mode changes. It is also DPI-aware.
The API contains both Unicode and ANSI variants of the
implementation which can be called either selectively
with the W or A suffix respectively or automatically by
simply calling DMSMessageBox with the typical parameters
used for the normal MessageBox Win32 API function.
*/
#include <windows.h>
#include <windowsx.h>
#include <dwmapi.h>
#include <commctrl.h>
#ifdef UNICODE
#define DMSMessageBox DMSMessageBoxW
#else
#define DMSMessageBox DMSMessageBoxA
#endif
int DMSMessageBoxW(HWND parent, LPCWSTR text, LPCWSTR title, UINT flags);
int DMSMessageBoxA(HWND parent, const char* text, const char* title, UINT flags);