Skip to content

Commit 6127024

Browse files
committed
Add user32/MessageBox and MessageBoxEx
1 parent af839d5 commit 6127024

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

src/lib.rs

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1530,6 +1530,44 @@ pub const EDD_GET_DEVICE_INTERFACE_NAME: DWORD = 0x00000001;
15301530
pub const ENUM_CURRENT_SETTINGS: DWORD = -1;
15311531
pub const ENUM_REGISTRY_SETTINGS: DWORD = -2;
15321532

1533+
pub const MB_OK: DWORD = 0x00000000;
1534+
pub const MB_OKCANCEL: DWORD = 0x00000001;
1535+
pub const MB_ABORTRETRYIGNORE: DWORD = 0x00000002;
1536+
pub const MB_YESNOCANCEL: DWORD = 0x00000003;
1537+
pub const MB_YESNO: DWORD = 0x00000004;
1538+
pub const MB_RETRYCANCEL: DWORD = 0x00000005;
1539+
pub const MB_CANCELTRYCONTINUE: DWORD = 0x00000006;
1540+
pub const MB_ICONHAND: DWORD = 0x00000010;
1541+
pub const MB_ICONQUESTION: DWORD = 0x00000020;
1542+
pub const MB_ICONEXCLAMATION: DWORD = 0x00000030;
1543+
pub const MB_ICONASTERISK: DWORD = 0x00000040;
1544+
pub const MB_USERICON: DWORD = 0x00000080;
1545+
pub const MB_ICONWARNING: DWORD = MB_ICONEXCLAMATION;
1546+
pub const MB_ICONERROR: DWORD = MB_ICONHAND;
1547+
pub const MB_ICONINFORMATION: DWORD = MB_ICONASTERISK;
1548+
pub const MB_ICONSTOP: DWORD = MB_ICONHAND;
1549+
pub const MB_DEFBUTTON1: DWORD = 0x00000000;
1550+
pub const MB_DEFBUTTON2: DWORD = 0x00000100;
1551+
pub const MB_DEFBUTTON3: DWORD = 0x00000200;
1552+
pub const MB_DEFBUTTON4: DWORD = 0x00000300;
1553+
pub const MB_APPLMODAL: DWORD = 0x00000000;
1554+
pub const MB_SYSTEMMODAL: DWORD = 0x00001000;
1555+
pub const MB_TASKMODAL: DWORD = 0x00002000;
1556+
pub const MB_HELP: DWORD = 0x00004000;
1557+
pub const MB_NOFOCUS: DWORD = 0x00008000;
1558+
pub const MB_SETFOREGROUND: DWORD = 0x00010000;
1559+
pub const MB_DEFAULT_DESKTOP_ONLY: DWORD = 0x00020000;
1560+
pub const MB_TOPMOST: DWORD = 0x00040000;
1561+
pub const MB_RIGHT: DWORD = 0x00080000;
1562+
pub const MB_RTLREADING: DWORD = 0x00100000;
1563+
pub const MB_SERVICE_NOTIFICATION: DWORD = 0x00200000;
1564+
pub const MB_SERVICE_NOTIFICATION_NT3X: DWORD = 0x00040000;
1565+
pub const MB_TYPEMASK: DWORD = 0x0000000F;
1566+
pub const MB_ICONMASK: DWORD = 0x000000F0;
1567+
pub const MB_DEFMASK: DWORD = 0x00000F00;
1568+
pub const MB_MODEMASK: DWORD = 0x00003000;
1569+
pub const MB_MISCMASK: DWORD = 0x0000C000;
1570+
15331571
pub const SW_HIDE: c_int = 0;
15341572
pub const SW_SHOWNORMAL: c_int = 1;
15351573
pub const SW_NORMAL: c_int = 1;
@@ -2843,6 +2881,32 @@ extern "system" {
28432881
hWnd: HWND,
28442882
lpRect: LPRECT,
28452883
) -> BOOL;
2884+
pub fn MessageBoxA(
2885+
hWnd: HWND,
2886+
lpText: LPCSTR,
2887+
lpCaption: LPCSTR,
2888+
uType: UINT
2889+
) -> c_int;
2890+
pub fn MessageBoxW(
2891+
hWnd: HWND,
2892+
lpText: LPCWSTR,
2893+
lpCaption: LPCWSTR,
2894+
uType: UINT
2895+
) -> c_int;
2896+
pub fn MessageBoxExA(
2897+
hWnd: HWND,
2898+
lpText: LPCSTR,
2899+
lpCaption: LPCSTR,
2900+
uType: UINT,
2901+
wLanguageId: WORD
2902+
) -> c_int;
2903+
pub fn MessageBoxExW(
2904+
hWnd: HWND,
2905+
lpText: LPCWSTR,
2906+
lpCaption: LPCWSTR,
2907+
uType: UINT,
2908+
wLanguageId: WORD
2909+
) -> c_int;
28462910
pub fn PeekMessageW(
28472911
lpMsg: LPMSG,
28482912
hWnd: HWND,

0 commit comments

Comments
 (0)