| 1 | /* $Id: msgbox.c,v 1.3 2000-03-18 16:13:37 cbratschi Exp $ */ | 
|---|
| 2 | /* | 
|---|
| 3 | * Message boxes (based on Wine code) | 
|---|
| 4 | * | 
|---|
| 5 | * Copyright 1995 Bernd Schmidt | 
|---|
| 6 | * | 
|---|
| 7 | * Corel WINE version: 20000317 | 
|---|
| 8 | * | 
|---|
| 9 | */ | 
|---|
| 10 | #include <win\winbase.h> | 
|---|
| 11 | #include <win\winuser.h> | 
|---|
| 12 | #include <string.h> | 
|---|
| 13 | #include <dlgs.h> | 
|---|
| 14 | #include <misc.h> | 
|---|
| 15 | #include <heapstring.h> | 
|---|
| 16 |  | 
|---|
| 17 | #define DBG_LOCALLOG    DBG_msgbox | 
|---|
| 18 | #include "dbglocal.h" | 
|---|
| 19 |  | 
|---|
| 20 | #define MSGBOX_IDICON 1088 | 
|---|
| 21 | #define MSGBOX_IDTEXT 100 | 
|---|
| 22 |  | 
|---|
| 23 | static HFONT MSGBOX_OnInit(HWND hwnd, LPMSGBOXPARAMSA lpmb) | 
|---|
| 24 | { | 
|---|
| 25 | static HFONT hFont = 0, hPrevFont = 0; | 
|---|
| 26 | RECT rect; | 
|---|
| 27 | HWND hItem; | 
|---|
| 28 | HDC hdc; | 
|---|
| 29 | int i, buttons; | 
|---|
| 30 | int bspace, bw, bh, theight, tleft, wwidth, wheight, bpos; | 
|---|
| 31 | int borheight, borwidth, iheight, ileft, iwidth, twidth, tiheight; | 
|---|
| 32 | LPCSTR lpszText; | 
|---|
| 33 | char buf[256]; | 
|---|
| 34 | NONCLIENTMETRICSA nclm; | 
|---|
| 35 | BOOL hasIcon = TRUE; | 
|---|
| 36 |  | 
|---|
| 37 | nclm.cbSize = sizeof(NONCLIENTMETRICSA); | 
|---|
| 38 | SystemParametersInfoA (SPI_GETNONCLIENTMETRICS, 0, &nclm, 0); | 
|---|
| 39 | hFont = CreateFontIndirectA (&nclm.lfMessageFont); | 
|---|
| 40 | /* set button font */ | 
|---|
| 41 | for (i=1; i < 8; i++) | 
|---|
| 42 | SendDlgItemMessageA (hwnd, i, WM_SETFONT, (WPARAM)hFont, 0); | 
|---|
| 43 | /* set text font */ | 
|---|
| 44 | SendDlgItemMessageA (hwnd, MSGBOX_IDTEXT, WM_SETFONT, (WPARAM)hFont, 0); | 
|---|
| 45 |  | 
|---|
| 46 | if (HIWORD(lpmb->lpszCaption)) { | 
|---|
| 47 | SetWindowTextA(hwnd, lpmb->lpszCaption); | 
|---|
| 48 | } else { | 
|---|
| 49 | if (LoadStringA(lpmb->hInstance, LOWORD(lpmb->lpszCaption), buf, sizeof(buf))) | 
|---|
| 50 | SetWindowTextA(hwnd, buf); | 
|---|
| 51 | } | 
|---|
| 52 | if (HIWORD(lpmb->lpszText)) { | 
|---|
| 53 | lpszText = lpmb->lpszText; | 
|---|
| 54 | } else { | 
|---|
| 55 | lpszText = buf; | 
|---|
| 56 | if (!LoadStringA(lpmb->hInstance, LOWORD(lpmb->lpszText), buf, sizeof(buf))) | 
|---|
| 57 | *buf = 0;     /* FIXME ?? */ | 
|---|
| 58 | } | 
|---|
| 59 | SetWindowTextA(GetDlgItem(hwnd, MSGBOX_IDTEXT), lpszText); | 
|---|
| 60 |  | 
|---|
| 61 | /* Hide not selected buttons */ | 
|---|
| 62 | switch(lpmb->dwStyle & MB_TYPEMASK) { | 
|---|
| 63 | case MB_OK: | 
|---|
| 64 | ShowWindow(GetDlgItem(hwnd, IDCANCEL), SW_HIDE); | 
|---|
| 65 | /* fall through */ | 
|---|
| 66 | case MB_OKCANCEL: | 
|---|
| 67 | ShowWindow(GetDlgItem(hwnd, IDABORT), SW_HIDE); | 
|---|
| 68 | ShowWindow(GetDlgItem(hwnd, IDRETRY), SW_HIDE); | 
|---|
| 69 | ShowWindow(GetDlgItem(hwnd, IDIGNORE), SW_HIDE); | 
|---|
| 70 | ShowWindow(GetDlgItem(hwnd, IDYES), SW_HIDE); | 
|---|
| 71 | ShowWindow(GetDlgItem(hwnd, IDNO), SW_HIDE); | 
|---|
| 72 | break; | 
|---|
| 73 | case MB_ABORTRETRYIGNORE: | 
|---|
| 74 | ShowWindow(GetDlgItem(hwnd, IDOK), SW_HIDE); | 
|---|
| 75 | ShowWindow(GetDlgItem(hwnd, IDCANCEL), SW_HIDE); | 
|---|
| 76 | ShowWindow(GetDlgItem(hwnd, IDYES), SW_HIDE); | 
|---|
| 77 | ShowWindow(GetDlgItem(hwnd, IDNO), SW_HIDE); | 
|---|
| 78 | break; | 
|---|
| 79 | case MB_YESNO: | 
|---|
| 80 | ShowWindow(GetDlgItem(hwnd, IDCANCEL), SW_HIDE); | 
|---|
| 81 | /* fall through */ | 
|---|
| 82 | case MB_YESNOCANCEL: | 
|---|
| 83 | ShowWindow(GetDlgItem(hwnd, IDOK), SW_HIDE); | 
|---|
| 84 | ShowWindow(GetDlgItem(hwnd, IDABORT), SW_HIDE); | 
|---|
| 85 | ShowWindow(GetDlgItem(hwnd, IDRETRY), SW_HIDE); | 
|---|
| 86 | ShowWindow(GetDlgItem(hwnd, IDIGNORE), SW_HIDE); | 
|---|
| 87 | break; | 
|---|
| 88 | case MB_RETRYCANCEL: | 
|---|
| 89 | ShowWindow(GetDlgItem(hwnd, IDOK), SW_HIDE); | 
|---|
| 90 | ShowWindow(GetDlgItem(hwnd, IDABORT), SW_HIDE); | 
|---|
| 91 | ShowWindow(GetDlgItem(hwnd, IDIGNORE), SW_HIDE); | 
|---|
| 92 | ShowWindow(GetDlgItem(hwnd, IDYES), SW_HIDE); | 
|---|
| 93 | ShowWindow(GetDlgItem(hwnd, IDNO), SW_HIDE); | 
|---|
| 94 | break; | 
|---|
| 95 | } | 
|---|
| 96 | /* Set the icon */ | 
|---|
| 97 | switch(lpmb->dwStyle & MB_ICONMASK) { | 
|---|
| 98 | case MB_ICONEXCLAMATION: | 
|---|
| 99 | SendDlgItemMessageA(hwnd, stc1, STM_SETICON, | 
|---|
| 100 | (WPARAM)LoadIconA(0, IDI_EXCLAMATIONA), 0); | 
|---|
| 101 | break; | 
|---|
| 102 | case MB_ICONQUESTION: | 
|---|
| 103 | SendDlgItemMessageA(hwnd, stc1, STM_SETICON, | 
|---|
| 104 | (WPARAM)LoadIconA(0, IDI_QUESTIONA), 0); | 
|---|
| 105 | break; | 
|---|
| 106 | case MB_ICONASTERISK: | 
|---|
| 107 | SendDlgItemMessageA(hwnd, stc1, STM_SETICON, | 
|---|
| 108 | (WPARAM)LoadIconA(0, IDI_ASTERISKA), 0); | 
|---|
| 109 | break; | 
|---|
| 110 | case MB_ICONHAND: | 
|---|
| 111 | SendDlgItemMessageA(hwnd, stc1, STM_SETICON, | 
|---|
| 112 | (WPARAM)LoadIconA(0, IDI_HANDA), 0); | 
|---|
| 113 | break; | 
|---|
| 114 | default: | 
|---|
| 115 | /* By default, Windows 95/98/NT do not associate an icon to message boxes. | 
|---|
| 116 | * So wine should do the same. | 
|---|
| 117 | */ | 
|---|
| 118 | hasIcon = FALSE; | 
|---|
| 119 | ShowWindow(GetDlgItem(hwnd,stc1),SW_HIDE); | 
|---|
| 120 | break; | 
|---|
| 121 | } | 
|---|
| 122 |  | 
|---|
| 123 | /* Position everything */ | 
|---|
| 124 | GetWindowRect(hwnd, &rect); | 
|---|
| 125 | borheight = rect.bottom - rect.top; | 
|---|
| 126 | borwidth  = rect.right - rect.left; | 
|---|
| 127 | GetClientRect(hwnd, &rect); | 
|---|
| 128 | borheight -= rect.bottom - rect.top; | 
|---|
| 129 | borwidth  -= rect.right - rect.left; | 
|---|
| 130 |  | 
|---|
| 131 | /* Get the icon height */ | 
|---|
| 132 | if (hasIcon) | 
|---|
| 133 | { | 
|---|
| 134 | GetWindowRect(GetDlgItem(hwnd, MSGBOX_IDICON), &rect); | 
|---|
| 135 | MapWindowPoints(0, hwnd, (LPPOINT)&rect, 2); | 
|---|
| 136 | iheight = rect.bottom - rect.top; | 
|---|
| 137 | ileft = rect.left; | 
|---|
| 138 | iwidth = rect.right - ileft; | 
|---|
| 139 | } else | 
|---|
| 140 | { | 
|---|
| 141 | iheight = 0; | 
|---|
| 142 | ileft = 0; | 
|---|
| 143 | iwidth = 0; | 
|---|
| 144 | } | 
|---|
| 145 |  | 
|---|
| 146 | hdc = GetDC(hwnd); | 
|---|
| 147 | if (hFont) | 
|---|
| 148 | hPrevFont = SelectObject(hdc, hFont); | 
|---|
| 149 |  | 
|---|
| 150 | /* Get the number of visible buttons and their size */ | 
|---|
| 151 | bh = bw = 1; /* Minimum button sizes */ | 
|---|
| 152 | for (buttons = 0, i = 1; i < 8; i++) | 
|---|
| 153 | { | 
|---|
| 154 | hItem = GetDlgItem(hwnd, i); | 
|---|
| 155 | if (GetWindowLongA(hItem, GWL_STYLE) & WS_VISIBLE) | 
|---|
| 156 | { | 
|---|
| 157 | char buttonText[1024]; | 
|---|
| 158 | int w, h; | 
|---|
| 159 | buttons++; | 
|---|
| 160 | if (GetWindowTextA(hItem, buttonText, sizeof buttonText)) | 
|---|
| 161 | { | 
|---|
| 162 | DrawTextA( hdc, buttonText, -1, &rect, DT_LEFT | DT_EXPANDTABS | DT_CALCRECT); | 
|---|
| 163 | h = rect.bottom - rect.top; | 
|---|
| 164 | w = rect.right - rect.left; | 
|---|
| 165 | if (h > bh) bh = h; | 
|---|
| 166 | if (w > bw)  bw = w ; | 
|---|
| 167 | } | 
|---|
| 168 | } | 
|---|
| 169 | } | 
|---|
| 170 | bw = MAX(bw, bh * 2); | 
|---|
| 171 | /* Button white space */ | 
|---|
| 172 | bh = bh * 2; | 
|---|
| 173 | bw = bw * 2; | 
|---|
| 174 | bspace = bw/3; /* Space between buttons */ | 
|---|
| 175 |  | 
|---|
| 176 | /* Get the text size */ | 
|---|
| 177 | GetClientRect(GetDlgItem(hwnd, MSGBOX_IDTEXT), &rect); | 
|---|
| 178 | rect.top = rect.left = rect.bottom = 0; | 
|---|
| 179 | DrawTextA( hdc, lpszText, -1, &rect, | 
|---|
| 180 | DT_LEFT | DT_EXPANDTABS | DT_WORDBREAK | DT_CALCRECT); | 
|---|
| 181 | /* Min text width corresponds to space for the buttons */ | 
|---|
| 182 | tleft = 2 * ileft + iwidth; | 
|---|
| 183 | twidth = MAX((bw + bspace) * buttons + bspace - tleft, rect.right); | 
|---|
| 184 | theight = rect.bottom; | 
|---|
| 185 |  | 
|---|
| 186 | if (hFont) | 
|---|
| 187 | SelectObject(hdc, hPrevFont); | 
|---|
| 188 | ReleaseDC(hItem, hdc); | 
|---|
| 189 |  | 
|---|
| 190 | tiheight = 16 + MAX(iheight, theight); | 
|---|
| 191 | wwidth  = tleft + twidth + ileft + borwidth; | 
|---|
| 192 | wheight = 8 + tiheight + bh + borheight; | 
|---|
| 193 |  | 
|---|
| 194 | /* Resize the window */ | 
|---|
| 195 | SetWindowPos(hwnd, 0, 0, 0, wwidth, wheight, | 
|---|
| 196 | SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW); | 
|---|
| 197 |  | 
|---|
| 198 | /* Position the icon */ | 
|---|
| 199 | SetWindowPos(GetDlgItem(hwnd, MSGBOX_IDICON), 0, ileft, (tiheight - iheight) / 2, 0, 0, | 
|---|
| 200 | SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW); | 
|---|
| 201 |  | 
|---|
| 202 | /* Position the text */ | 
|---|
| 203 | SetWindowPos(GetDlgItem(hwnd, MSGBOX_IDTEXT), 0, tleft, (tiheight - theight) / 2, twidth, theight, | 
|---|
| 204 | SWP_NOZORDER | SWP_NOACTIVATE | SWP_NOREDRAW); | 
|---|
| 205 |  | 
|---|
| 206 | /* Position the buttons */ | 
|---|
| 207 | bpos = (wwidth - (bw + bspace) * buttons + bspace) / 2; | 
|---|
| 208 | for (buttons = i = 0; i < 7; i++) { | 
|---|
| 209 | /* some arithmetic to get the right order for YesNoCancel windows */ | 
|---|
| 210 | hItem = GetDlgItem(hwnd, (i + 5) % 7 + 1); | 
|---|
| 211 | if (GetWindowLongA(hItem, GWL_STYLE) & WS_VISIBLE) { | 
|---|
| 212 | if (buttons++ == ((lpmb->dwStyle & MB_DEFMASK) >> 8)) { | 
|---|
| 213 | SetFocus(hItem); | 
|---|
| 214 | SendMessageA( hItem, BM_SETSTYLE, BS_DEFPUSHBUTTON, TRUE ); | 
|---|
| 215 | } | 
|---|
| 216 | SetWindowPos(hItem, 0, bpos, tiheight, bw, bh, | 
|---|
| 217 | SWP_NOZORDER|SWP_NOACTIVATE|SWP_NOREDRAW); | 
|---|
| 218 | bpos += bw + bspace; | 
|---|
| 219 | } | 
|---|
| 220 | } | 
|---|
| 221 | return hFont; | 
|---|
| 222 | } | 
|---|
| 223 |  | 
|---|
| 224 |  | 
|---|
| 225 | /************************************************************************** | 
|---|
| 226 | *           MSGBOX_DlgProc | 
|---|
| 227 | * | 
|---|
| 228 | * Dialog procedure for message boxes. | 
|---|
| 229 | */ | 
|---|
| 230 | static LRESULT CALLBACK MSGBOX_DlgProc( HWND hwnd, UINT message, | 
|---|
| 231 | WPARAM wParam, LPARAM lParam ) | 
|---|
| 232 | { | 
|---|
| 233 | static HFONT hFont; | 
|---|
| 234 | switch(message) { | 
|---|
| 235 | case WM_INITDIALOG: | 
|---|
| 236 | hFont = MSGBOX_OnInit(hwnd, (LPMSGBOXPARAMSA)lParam); | 
|---|
| 237 | return 0; | 
|---|
| 238 |  | 
|---|
| 239 | case WM_COMMAND: | 
|---|
| 240 | switch (wParam) | 
|---|
| 241 | { | 
|---|
| 242 | case IDOK: | 
|---|
| 243 | case IDCANCEL: | 
|---|
| 244 | case IDABORT: | 
|---|
| 245 | case IDRETRY: | 
|---|
| 246 | case IDIGNORE: | 
|---|
| 247 | case IDYES: | 
|---|
| 248 | case IDNO: | 
|---|
| 249 | EndDialog(hwnd, wParam); | 
|---|
| 250 | if (hFont) | 
|---|
| 251 | DeleteObject(hFont); | 
|---|
| 252 | break; | 
|---|
| 253 | } | 
|---|
| 254 |  | 
|---|
| 255 | default: | 
|---|
| 256 | /* Ok. Ignore all the other messages */ | 
|---|
| 257 | //TRACE("Message number %i is being ignored.\n", message); | 
|---|
| 258 | break; | 
|---|
| 259 | } | 
|---|
| 260 | return 0; | 
|---|
| 261 | } | 
|---|
| 262 |  | 
|---|
| 263 | /************************************************************************** | 
|---|
| 264 | *           MessageBox32A   (USER32.391) | 
|---|
| 265 | * | 
|---|
| 266 | * NOTES | 
|---|
| 267 | *   The WARN is here to help debug erroneous MessageBoxes | 
|---|
| 268 | *   Use: -debugmsg warn+dialog,+relay | 
|---|
| 269 | */ | 
|---|
| 270 | INT WINAPI MessageBoxA(HWND hWnd, LPCSTR text, LPCSTR title, UINT type) | 
|---|
| 271 | { | 
|---|
| 272 | LPVOID lpTemplate; | 
|---|
| 273 | HRSRC hRes; | 
|---|
| 274 | MSGBOXPARAMSA mbox; | 
|---|
| 275 |  | 
|---|
| 276 | dprintf(("MessageBoxA %x %s %s %x", hWnd, text, title, type)); | 
|---|
| 277 |  | 
|---|
| 278 | if(!(hRes = FindResourceA(GetModuleHandleA("USER32"), "MSGBOX", RT_DIALOGA))) | 
|---|
| 279 | return 0; | 
|---|
| 280 | if(!(lpTemplate = (LPVOID)LoadResource(GetModuleHandleA("USER32"), hRes))) | 
|---|
| 281 | return 0; | 
|---|
| 282 |  | 
|---|
| 283 | if (!text) text="<ODIN-NULL>"; | 
|---|
| 284 | if (!title) | 
|---|
| 285 | title="Error"; | 
|---|
| 286 | mbox.lpszCaption = title; | 
|---|
| 287 | mbox.lpszText  = text; | 
|---|
| 288 | mbox.dwStyle  = type; | 
|---|
| 289 | return DialogBoxIndirectParamA( GetWindowLongA(hWnd,GWL_HINSTANCE), lpTemplate, | 
|---|
| 290 | hWnd, (DLGPROC)MSGBOX_DlgProc, (LPARAM)&mbox ); | 
|---|
| 291 | } | 
|---|
| 292 |  | 
|---|
| 293 |  | 
|---|
| 294 | /************************************************************************** | 
|---|
| 295 | *           MessageBox32W   (USER32.396) | 
|---|
| 296 | */ | 
|---|
| 297 | INT WINAPI MessageBoxW( HWND hwnd, LPCWSTR text, LPCWSTR title, | 
|---|
| 298 | UINT type ) | 
|---|
| 299 | { | 
|---|
| 300 | LPSTR titleA = HEAP_strdupWtoA( GetProcessHeap(), 0, title ); | 
|---|
| 301 | LPSTR textA  = HEAP_strdupWtoA( GetProcessHeap(), 0, text ); | 
|---|
| 302 | INT ret; | 
|---|
| 303 |  | 
|---|
| 304 | ret = MessageBoxA( hwnd, textA, titleA, type ); | 
|---|
| 305 | HeapFree( GetProcessHeap(), 0, titleA ); | 
|---|
| 306 | HeapFree( GetProcessHeap(), 0, textA ); | 
|---|
| 307 | return ret; | 
|---|
| 308 | } | 
|---|
| 309 |  | 
|---|
| 310 |  | 
|---|
| 311 | /************************************************************************** | 
|---|
| 312 | *           MessageBoxEx32A   (USER32.392) | 
|---|
| 313 | */ | 
|---|
| 314 | INT WINAPI MessageBoxExA( HWND hWnd, LPCSTR text, LPCSTR title, | 
|---|
| 315 | UINT type, WORD langid ) | 
|---|
| 316 | { | 
|---|
| 317 | /* ignore language id for now */ | 
|---|
| 318 | return MessageBoxA(hWnd,text,title,type); | 
|---|
| 319 | } | 
|---|
| 320 |  | 
|---|
| 321 | /************************************************************************** | 
|---|
| 322 | *           MessageBoxEx32W   (USER32.393) | 
|---|
| 323 | */ | 
|---|
| 324 | INT WINAPI MessageBoxExW( HWND hWnd, LPCWSTR text, LPCWSTR title, | 
|---|
| 325 | UINT type, WORD langid ) | 
|---|
| 326 | { | 
|---|
| 327 | /* ignore language id for now */ | 
|---|
| 328 | return MessageBoxW(hWnd,text,title,type); | 
|---|
| 329 | } | 
|---|
| 330 |  | 
|---|
| 331 |  | 
|---|
| 332 | /************************************************************************** | 
|---|
| 333 | *           MessageBoxIndirect32A   (USER32.394) | 
|---|
| 334 | */ | 
|---|
| 335 | INT WINAPI MessageBoxIndirectA( LPMSGBOXPARAMSA msgbox ) | 
|---|
| 336 | { | 
|---|
| 337 | LPVOID lpTemplate; | 
|---|
| 338 | HRSRC hRes; | 
|---|
| 339 |  | 
|---|
| 340 | dprintf(("MessageBoxIndirectA %x", msgbox)); | 
|---|
| 341 |  | 
|---|
| 342 | if(!(hRes = FindResourceA(GetModuleHandleA("USER32"), "MSGBOX", RT_DIALOGA))) | 
|---|
| 343 | return 0; | 
|---|
| 344 | if(!(lpTemplate = (LPVOID)LoadResource(GetModuleHandleA("USER32"), hRes))) | 
|---|
| 345 | return 0; | 
|---|
| 346 |  | 
|---|
| 347 | return DialogBoxIndirectParamA( msgbox->hInstance, lpTemplate, | 
|---|
| 348 | msgbox->hwndOwner, (DLGPROC)MSGBOX_DlgProc, | 
|---|
| 349 | (LPARAM)msgbox ); | 
|---|
| 350 | } | 
|---|
| 351 |  | 
|---|
| 352 | /************************************************************************** | 
|---|
| 353 | *           MessageBoxIndirect32W   (USER32.395) | 
|---|
| 354 | */ | 
|---|
| 355 | INT WINAPI MessageBoxIndirectW( LPMSGBOXPARAMSW msgbox ) | 
|---|
| 356 | { | 
|---|
| 357 | MSGBOXPARAMSA       msgboxa; | 
|---|
| 358 |  | 
|---|
| 359 | memcpy(&msgboxa,msgbox,sizeof(msgboxa)); | 
|---|
| 360 | if (msgbox->lpszCaption) | 
|---|
| 361 | lstrcpyWtoA((LPSTR)msgboxa.lpszCaption,msgbox->lpszCaption); | 
|---|
| 362 | if (msgbox->lpszText) | 
|---|
| 363 | lstrcpyWtoA((LPSTR)msgboxa.lpszText,msgbox->lpszText); | 
|---|
| 364 |  | 
|---|
| 365 | return MessageBoxIndirectA(&msgboxa); | 
|---|
| 366 | } | 
|---|
| 367 |  | 
|---|
| 368 | /************************************************************************** | 
|---|
| 369 | *           FatalAppExit32A   (KERNEL32.108) | 
|---|
| 370 | */ | 
|---|
| 371 | void WINAPI FatalAppExitA( UINT action, LPCSTR str ) | 
|---|
| 372 | { | 
|---|
| 373 | //WARN("AppExit\n"); | 
|---|
| 374 | MessageBoxA( 0, str, NULL, MB_SYSTEMMODAL | MB_OK ); | 
|---|
| 375 | ExitProcess(0); | 
|---|
| 376 | } | 
|---|
| 377 |  | 
|---|
| 378 |  | 
|---|
| 379 | /************************************************************************** | 
|---|
| 380 | *           FatalAppExit32W   (KERNEL32.109) | 
|---|
| 381 | */ | 
|---|
| 382 | void WINAPI FatalAppExitW( UINT action, LPCWSTR str ) | 
|---|
| 383 | { | 
|---|
| 384 | //WARN("AppExit\n"); | 
|---|
| 385 | MessageBoxW( 0, str, NULL, MB_SYSTEMMODAL | MB_OK ); | 
|---|
| 386 | ExitProcess(0); | 
|---|
| 387 | } | 
|---|
| 388 |  | 
|---|
| 389 | /***************************************************************************** | 
|---|
| 390 | * Name      : BOOL WIN32API SysErrorBox | 
|---|
| 391 | * Purpose   : Unknown | 
|---|
| 392 | * Parameters: Unknown | 
|---|
| 393 | * Variables : | 
|---|
| 394 | * Result    : | 
|---|
| 395 | * Remark    : HARDERR like ? | 
|---|
| 396 | * Status    : UNTESTED UNKNOWN STUB | 
|---|
| 397 | * | 
|---|
| 398 | * Author    : Patrick Haller [Wed, 1998/06/16 11:55] | 
|---|
| 399 | *****************************************************************************/ | 
|---|
| 400 |  | 
|---|
| 401 | BOOL WIN32API SysErrorBox(DWORD x1, | 
|---|
| 402 | DWORD x2, | 
|---|
| 403 | DWORD x3) | 
|---|
| 404 | { | 
|---|
| 405 | dprintf(("USER32: SysErrorBox(%08xh,%08xh,%08xh) not implemented.\n", | 
|---|
| 406 | x1, | 
|---|
| 407 | x2, | 
|---|
| 408 | x3)); | 
|---|
| 409 |  | 
|---|
| 410 | return (FALSE); /* default */ | 
|---|
| 411 | } | 
|---|