| 4 | #include "MessageBoxWhd.h" |
| 5 | |
| 6 | void UserMessageBox(HWND hWnd, |
| 7 | UINT ErrorCode, |
| 8 | LPCTSTR lpExMsg, |
| 9 | UINT uType) |
| 10 | { |
| 11 | MessageBoxWhd::MsgType type = MessageBoxWhd::Info; |
| 12 | if (uType == MB_ICONWARNING) type = MessageBoxWhd::Warn; |
| 13 | else if (uType == MB_ICONERROR) type = MessageBoxWhd::Error; |
| 14 | else if (uType == MB_ICONINFORMATION) type = MessageBoxWhd::Info; |
| 15 | |
| 16 | MessageBoxWhd* pWhd = new MessageBoxWhd(type, ErrorCode, lpExMsg); |
| 17 | if( pWhd == NULL ) { return; } |
| 18 | pWhd->Create(hWnd, NULL, UI_CLASSSTYLE_DIALOG, 0, 0, 0, 0, 0, NULL); |
| 19 | pWhd->CenterWindow(); |
| 20 | pWhd->ShowModal(); |
| 21 | } |
no test coverage detected