Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Message boxes |
| 3 | * |
| 4 | * Copyright 1995 Bernd Schmidt |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 5 | */ |
| 6 | |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 7 | #include <stdio.h> |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 8 | #include "windows.h" |
| 9 | #include "dlgs.h" |
Alexandre Julliard | 7ebe1a4 | 1996-12-22 18:27:48 +0000 | [diff] [blame] | 10 | #include "heap.h" |
Alexandre Julliard | c981d0b | 1996-03-31 16:40:13 +0000 | [diff] [blame] | 11 | #include "module.h" |
Alexandre Julliard | af0bae5 | 1995-10-03 17:06:08 +0000 | [diff] [blame] | 12 | #include "win.h" |
Alexandre Julliard | d7d4fdf | 1995-12-26 15:05:24 +0000 | [diff] [blame] | 13 | #include "resource.h" |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 14 | #include "task.h" |
| 15 | |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 16 | typedef struct |
| 17 | { |
| 18 | LPCSTR title; |
| 19 | LPCSTR text; |
| 20 | UINT32 type; |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 21 | } MSGBOX, *LPMSGBOX; |
| 22 | |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 23 | |
| 24 | /************************************************************************** |
| 25 | * MSGBOX_DlgProc |
| 26 | * |
| 27 | * Dialog procedure for message boxes. |
| 28 | */ |
Alexandre Julliard | 670cdc4 | 1997-08-24 16:00:30 +0000 | [diff] [blame] | 29 | static LRESULT CALLBACK MSGBOX_DlgProc( HWND32 hwnd, UINT32 message, |
| 30 | WPARAM32 wParam, LPARAM lParam ) |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 31 | { |
| 32 | LPMSGBOX lpmb; |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 33 | RECT32 rect, textrect; |
| 34 | HWND32 hItem; |
Alexandre Julliard | 2c69f6d | 1996-09-28 18:11:01 +0000 | [diff] [blame] | 35 | HDC32 hdc; |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 36 | LRESULT lRet; |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 37 | int i, buttons, bwidth, bheight, theight, wwidth, bpos; |
| 38 | int borheight, iheight, tiheight; |
| 39 | |
| 40 | switch(message) { |
| 41 | case WM_INITDIALOG: |
| 42 | lpmb = (LPMSGBOX)lParam; |
Alexandre Julliard | 2d93d00 | 1996-05-21 15:01:41 +0000 | [diff] [blame] | 43 | if (lpmb->title) SetWindowText32A(hwnd, lpmb->title); |
Alexandre Julliard | 01d6346 | 1997-01-20 19:43:45 +0000 | [diff] [blame] | 44 | SetWindowText32A(GetDlgItem32(hwnd, 100), lpmb->text); |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 45 | /* Hide not selected buttons */ |
| 46 | switch(lpmb->type & MB_TYPEMASK) { |
| 47 | case MB_OK: |
Alexandre Julliard | 01d6346 | 1997-01-20 19:43:45 +0000 | [diff] [blame] | 48 | ShowWindow32(GetDlgItem32(hwnd, 2), SW_HIDE); |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 49 | /* fall through */ |
| 50 | case MB_OKCANCEL: |
Alexandre Julliard | 01d6346 | 1997-01-20 19:43:45 +0000 | [diff] [blame] | 51 | ShowWindow32(GetDlgItem32(hwnd, 3), SW_HIDE); |
| 52 | ShowWindow32(GetDlgItem32(hwnd, 4), SW_HIDE); |
| 53 | ShowWindow32(GetDlgItem32(hwnd, 5), SW_HIDE); |
| 54 | ShowWindow32(GetDlgItem32(hwnd, 6), SW_HIDE); |
| 55 | ShowWindow32(GetDlgItem32(hwnd, 7), SW_HIDE); |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 56 | break; |
| 57 | case MB_ABORTRETRYIGNORE: |
Alexandre Julliard | 01d6346 | 1997-01-20 19:43:45 +0000 | [diff] [blame] | 58 | ShowWindow32(GetDlgItem32(hwnd, 1), SW_HIDE); |
| 59 | ShowWindow32(GetDlgItem32(hwnd, 2), SW_HIDE); |
| 60 | ShowWindow32(GetDlgItem32(hwnd, 6), SW_HIDE); |
| 61 | ShowWindow32(GetDlgItem32(hwnd, 7), SW_HIDE); |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 62 | break; |
| 63 | case MB_YESNO: |
Alexandre Julliard | 01d6346 | 1997-01-20 19:43:45 +0000 | [diff] [blame] | 64 | ShowWindow32(GetDlgItem32(hwnd, 2), SW_HIDE); |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 65 | /* fall through */ |
| 66 | case MB_YESNOCANCEL: |
Alexandre Julliard | 01d6346 | 1997-01-20 19:43:45 +0000 | [diff] [blame] | 67 | ShowWindow32(GetDlgItem32(hwnd, 1), SW_HIDE); |
| 68 | ShowWindow32(GetDlgItem32(hwnd, 3), SW_HIDE); |
| 69 | ShowWindow32(GetDlgItem32(hwnd, 4), SW_HIDE); |
| 70 | ShowWindow32(GetDlgItem32(hwnd, 5), SW_HIDE); |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 71 | break; |
| 72 | } |
| 73 | /* Set the icon */ |
| 74 | switch(lpmb->type & MB_ICONMASK) { |
| 75 | case MB_ICONEXCLAMATION: |
Alexandre Julliard | 2d93d00 | 1996-05-21 15:01:41 +0000 | [diff] [blame] | 76 | SendDlgItemMessage16(hwnd, stc1, STM_SETICON, |
Alexandre Julliard | 530ee84 | 1996-10-23 16:59:13 +0000 | [diff] [blame] | 77 | (WPARAM16)LoadIcon16(0, IDI_EXCLAMATION), 0); |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 78 | break; |
| 79 | case MB_ICONQUESTION: |
Alexandre Julliard | 2d93d00 | 1996-05-21 15:01:41 +0000 | [diff] [blame] | 80 | SendDlgItemMessage16(hwnd, stc1, STM_SETICON, |
Alexandre Julliard | 530ee84 | 1996-10-23 16:59:13 +0000 | [diff] [blame] | 81 | (WPARAM16)LoadIcon16(0, IDI_QUESTION), 0); |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 82 | break; |
| 83 | case MB_ICONASTERISK: |
Alexandre Julliard | 2d93d00 | 1996-05-21 15:01:41 +0000 | [diff] [blame] | 84 | SendDlgItemMessage16(hwnd, stc1, STM_SETICON, |
Alexandre Julliard | 530ee84 | 1996-10-23 16:59:13 +0000 | [diff] [blame] | 85 | (WPARAM16)LoadIcon16(0, IDI_ASTERISK), 0); |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 86 | break; |
| 87 | case MB_ICONHAND: |
Alexandre Julliard | bd34d4f | 1995-06-20 19:08:12 +0000 | [diff] [blame] | 88 | default: |
Alexandre Julliard | 2d93d00 | 1996-05-21 15:01:41 +0000 | [diff] [blame] | 89 | SendDlgItemMessage16(hwnd, stc1, STM_SETICON, |
Alexandre Julliard | 530ee84 | 1996-10-23 16:59:13 +0000 | [diff] [blame] | 90 | (WPARAM16)LoadIcon16(0, IDI_HAND), 0); |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 91 | break; |
| 92 | } |
| 93 | |
| 94 | /* Position everything */ |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 95 | GetWindowRect32(hwnd, &rect); |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 96 | borheight = rect.bottom - rect.top; |
| 97 | wwidth = rect.right - rect.left; |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 98 | GetClientRect32(hwnd, &rect); |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 99 | borheight -= rect.bottom - rect.top; |
| 100 | |
| 101 | /* Get the icon height */ |
Alexandre Julliard | 01d6346 | 1997-01-20 19:43:45 +0000 | [diff] [blame] | 102 | GetWindowRect32(GetDlgItem32(hwnd, 1088), &rect); |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 103 | iheight = rect.bottom - rect.top; |
| 104 | |
| 105 | /* Get the number of visible buttons and their width */ |
Alexandre Julliard | 01d6346 | 1997-01-20 19:43:45 +0000 | [diff] [blame] | 106 | GetWindowRect32(GetDlgItem32(hwnd, 2), &rect); |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 107 | bheight = rect.bottom - rect.top; |
| 108 | bwidth = rect.left; |
Alexandre Julliard | 01d6346 | 1997-01-20 19:43:45 +0000 | [diff] [blame] | 109 | GetWindowRect32(GetDlgItem32(hwnd, 1), &rect); |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 110 | bwidth -= rect.left; |
Alexandre Julliard | 1e9ac79 | 1996-06-06 18:38:27 +0000 | [diff] [blame] | 111 | for (buttons = 0, i = 1; i < 8; i++) |
| 112 | { |
Alexandre Julliard | 01d6346 | 1997-01-20 19:43:45 +0000 | [diff] [blame] | 113 | hItem = GetDlgItem32(hwnd, i); |
Alexandre Julliard | 1e9ac79 | 1996-06-06 18:38:27 +0000 | [diff] [blame] | 114 | if (GetWindowLong32A(hItem, GWL_STYLE) & WS_VISIBLE) buttons++; |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 115 | } |
| 116 | |
| 117 | /* Get the text size */ |
Alexandre Julliard | 01d6346 | 1997-01-20 19:43:45 +0000 | [diff] [blame] | 118 | hItem = GetDlgItem32(hwnd, 100); |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 119 | GetWindowRect32(hItem, &textrect); |
| 120 | MapWindowPoints32(0, hwnd, (LPPOINT32)&textrect, 2); |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 121 | |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 122 | GetClientRect32(hItem, &rect); |
Alexandre Julliard | 2c69f6d | 1996-09-28 18:11:01 +0000 | [diff] [blame] | 123 | hdc = GetDC32(hItem); |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 124 | lRet = DrawText32A( hdc, lpmb->text, -1, &rect, |
| 125 | DT_LEFT | DT_EXPANDTABS | DT_WORDBREAK | DT_CALCRECT); |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 126 | theight = rect.bottom - rect.top; |
Alexandre Julliard | 902da69 | 1995-11-05 14:39:02 +0000 | [diff] [blame] | 127 | tiheight = 16 + MAX(iheight, theight); |
Alexandre Julliard | 2c69f6d | 1996-09-28 18:11:01 +0000 | [diff] [blame] | 128 | ReleaseDC32(hItem, hdc); |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 129 | |
| 130 | /* Position the text */ |
Alexandre Julliard | 01d6346 | 1997-01-20 19:43:45 +0000 | [diff] [blame] | 131 | SetWindowPos32(hItem, 0, textrect.left, (tiheight - theight) / 2, |
| 132 | rect.right - rect.left, theight, |
| 133 | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW); |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 134 | |
| 135 | /* Position the icon */ |
Alexandre Julliard | 01d6346 | 1997-01-20 19:43:45 +0000 | [diff] [blame] | 136 | hItem = GetDlgItem32(hwnd, 1088); |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 137 | GetWindowRect32(hItem, &rect); |
| 138 | MapWindowPoints32(0, hwnd, (LPPOINT32)&rect, 2); |
Alexandre Julliard | 01d6346 | 1997-01-20 19:43:45 +0000 | [diff] [blame] | 139 | SetWindowPos32(hItem, 0, rect.left, (tiheight - iheight) / 2, 0, 0, |
| 140 | SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW); |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 141 | |
| 142 | /* Resize the window */ |
Alexandre Julliard | 01d6346 | 1997-01-20 19:43:45 +0000 | [diff] [blame] | 143 | SetWindowPos32(hwnd, 0, 0, 0, wwidth, 8 + tiheight + bheight + borheight, |
| 144 | SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW); |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 145 | |
| 146 | /* Position the buttons */ |
| 147 | bpos = (wwidth - bwidth * buttons) / 2; |
Alexandre Julliard | 01d6346 | 1997-01-20 19:43:45 +0000 | [diff] [blame] | 148 | GetWindowRect32(GetDlgItem32(hwnd, 1), &rect); |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 149 | for (buttons = i = 0; i < 7; i++) { |
| 150 | /* some arithmetic to get the right order for YesNoCancel windows */ |
Alexandre Julliard | 01d6346 | 1997-01-20 19:43:45 +0000 | [diff] [blame] | 151 | hItem = GetDlgItem32(hwnd, (i + 5) % 7 + 1); |
Alexandre Julliard | 1e9ac79 | 1996-06-06 18:38:27 +0000 | [diff] [blame] | 152 | if (GetWindowLong32A(hItem, GWL_STYLE) & WS_VISIBLE) { |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 153 | if (buttons++ == ((lpmb->type & MB_DEFMASK) >> 8)) { |
Alexandre Julliard | 8bbf818 | 1996-09-13 16:50:47 +0000 | [diff] [blame] | 154 | SetFocus32(hItem); |
Alexandre Julliard | 2d93d00 | 1996-05-21 15:01:41 +0000 | [diff] [blame] | 155 | SendMessage32A( hItem, BM_SETSTYLE32, BS_DEFPUSHBUTTON, TRUE ); |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 156 | } |
Alexandre Julliard | 01d6346 | 1997-01-20 19:43:45 +0000 | [diff] [blame] | 157 | SetWindowPos32(hItem, 0, bpos, tiheight, 0, 0, |
| 158 | SWP_NOSIZE|SWP_NOZORDER|SWP_NOACTIVATE|SWP_NOREDRAW); |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 159 | bpos += bwidth; |
| 160 | } |
| 161 | } |
| 162 | return 0; |
| 163 | break; |
| 164 | |
| 165 | case WM_COMMAND: |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 166 | switch (wParam) |
| 167 | { |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 168 | case IDOK: |
| 169 | case IDCANCEL: |
| 170 | case IDABORT: |
| 171 | case IDRETRY: |
| 172 | case IDIGNORE: |
| 173 | case IDYES: |
| 174 | case IDNO: |
Alexandre Julliard | f0cbfa0 | 1997-02-15 14:29:56 +0000 | [diff] [blame] | 175 | EndDialog32(hwnd, wParam); |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 176 | break; |
| 177 | } |
| 178 | break; |
| 179 | } |
| 180 | return 0; |
| 181 | } |
| 182 | |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 183 | |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 184 | /************************************************************************** |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 185 | * MessageBox16 (USER.1) |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 186 | */ |
Alexandre Julliard | 670cdc4 | 1997-08-24 16:00:30 +0000 | [diff] [blame] | 187 | INT16 WINAPI MessageBox16( HWND16 hwnd, LPCSTR text, LPCSTR title, UINT16 type) |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 188 | { |
| 189 | return MessageBox32A( hwnd, text, title, type ); |
| 190 | } |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 191 | |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 192 | |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 193 | /************************************************************************** |
| 194 | * MessageBox32A (USER32.390) |
| 195 | */ |
Alexandre Julliard | 670cdc4 | 1997-08-24 16:00:30 +0000 | [diff] [blame] | 196 | INT32 WINAPI MessageBox32A(HWND32 hWnd, LPCSTR text, LPCSTR title, UINT32 type) |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 197 | { |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 198 | MSGBOX mbox; |
Alexandre Julliard | 349a953 | 1997-02-02 19:01:52 +0000 | [diff] [blame] | 199 | |
| 200 | if (!text) text="<WINE-NULL>"; |
| 201 | if (!title) title="<WINE-NULL>"; |
Alexandre Julliard | ff8331e | 1995-09-18 11:19:54 +0000 | [diff] [blame] | 202 | mbox.title = title; |
| 203 | mbox.text = text; |
| 204 | mbox.type = type; |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 205 | return DialogBoxIndirectParam32A( WIN_GetWindowInstance(hWnd), |
| 206 | SYSRES_GetResPtr( SYSRES_DIALOG_MSGBOX ), |
| 207 | hWnd, MSGBOX_DlgProc, (LPARAM)&mbox ); |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 208 | } |
| 209 | |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 210 | |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 211 | /************************************************************************** |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 212 | * MessageBox32W (USER32.395) |
| 213 | */ |
Alexandre Julliard | 670cdc4 | 1997-08-24 16:00:30 +0000 | [diff] [blame] | 214 | INT32 WINAPI MessageBox32W( HWND32 hwnd, LPCWSTR text, LPCWSTR title, |
| 215 | UINT32 type ) |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 216 | { |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 217 | LPSTR titleA = HEAP_strdupWtoA( GetProcessHeap(), 0, title ); |
| 218 | LPSTR textA = HEAP_strdupWtoA( GetProcessHeap(), 0, text ); |
| 219 | INT32 ret = MessageBox32A( hwnd, textA, titleA, type ); |
| 220 | HeapFree( GetProcessHeap(), 0, titleA ); |
| 221 | HeapFree( GetProcessHeap(), 0, textA ); |
Alexandre Julliard | b1bac32 | 1996-12-15 19:45:59 +0000 | [diff] [blame] | 222 | return ret; |
| 223 | } |
| 224 | |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 225 | |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 226 | /************************************************************************** |
Alexandre Julliard | 349a953 | 1997-02-02 19:01:52 +0000 | [diff] [blame] | 227 | * MessageBoxEx32A (USER32.391) |
| 228 | */ |
Alexandre Julliard | 670cdc4 | 1997-08-24 16:00:30 +0000 | [diff] [blame] | 229 | INT32 WINAPI MessageBoxEx32A( HWND32 hWnd, LPCSTR text, LPCSTR title, |
| 230 | UINT32 type, WORD langid ) |
| 231 | { |
Alexandre Julliard | 349a953 | 1997-02-02 19:01:52 +0000 | [diff] [blame] | 232 | /* ignore language id for now */ |
| 233 | return MessageBox32A(hWnd,text,title,type); |
| 234 | } |
| 235 | |
| 236 | /************************************************************************** |
| 237 | * MessageBoxEx32W (USER32.392) |
| 238 | */ |
Alexandre Julliard | 670cdc4 | 1997-08-24 16:00:30 +0000 | [diff] [blame] | 239 | INT32 WINAPI MessageBoxEx32W( HWND32 hWnd, LPCWSTR text, LPCWSTR title, |
| 240 | UINT32 type, WORD langid ) |
Alexandre Julliard | 349a953 | 1997-02-02 19:01:52 +0000 | [diff] [blame] | 241 | { |
| 242 | /* ignore language id for now */ |
| 243 | return MessageBox32W(hWnd,text,title,type); |
| 244 | } |
| 245 | |
| 246 | |
| 247 | /************************************************************************** |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 248 | * FatalAppExit16 (KERNEL.137) |
| 249 | */ |
Alexandre Julliard | 670cdc4 | 1997-08-24 16:00:30 +0000 | [diff] [blame] | 250 | void WINAPI FatalAppExit16( UINT16 action, LPCSTR str ) |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 251 | { |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 252 | FatalAppExit32A( action, str ); |
| 253 | } |
| 254 | |
| 255 | |
| 256 | /************************************************************************** |
| 257 | * FatalAppExit32A (KERNEL32.108) |
| 258 | */ |
Alexandre Julliard | 670cdc4 | 1997-08-24 16:00:30 +0000 | [diff] [blame] | 259 | void WINAPI FatalAppExit32A( UINT32 action, LPCSTR str ) |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 260 | { |
| 261 | MessageBox32A( 0, str, NULL, MB_SYSTEMMODAL | MB_OK ); |
| 262 | TASK_KillCurrentTask(0); |
| 263 | } |
| 264 | |
| 265 | |
| 266 | /************************************************************************** |
| 267 | * FatalAppExit32W (KERNEL32.109) |
| 268 | */ |
Alexandre Julliard | 670cdc4 | 1997-08-24 16:00:30 +0000 | [diff] [blame] | 269 | void WINAPI FatalAppExit32W( UINT32 action, LPCWSTR str ) |
Alexandre Julliard | 9ea19e5 | 1997-01-01 17:29:55 +0000 | [diff] [blame] | 270 | { |
| 271 | MessageBox32W( 0, str, NULL, MB_SYSTEMMODAL | MB_OK ); |
| 272 | TASK_KillCurrentTask(0); |
Alexandre Julliard | 2787be8 | 1995-05-22 18:23:01 +0000 | [diff] [blame] | 273 | } |
Alexandre Julliard | 349a953 | 1997-02-02 19:01:52 +0000 | [diff] [blame] | 274 | |
| 275 | |