void CNotificationImp::FatalError(const char * Message) const { WriteTrace(TraceUserInterface, TraceError, Message); WindowMode(); HWND Parent = NULL; if (m_hWnd) { Parent = reinterpret_cast<HWND>(m_hWnd->GetWindowHandle()); } MessageBoxW(Parent, stdstr(Message).ToUTF16().c_str(), L"Error", MB_OK | MB_ICONERROR | MB_SETFOREGROUND); ExitThread(0); }
void CNotificationImp::DisplayError(const char * Message) const { WriteTrace(TraceUserInterface, TraceError, Message); WindowMode(); HWND Parent = NULL; if (m_hWnd) { Parent = reinterpret_cast<HWND>(m_hWnd->GetWindowHandle()); } MessageBoxW(Parent, stdstr(Message).ToUTF16().c_str(), wGS(MSG_MSGBOX_ERROR_TITLE).c_str(), MB_OK | MB_ICONERROR | MB_SETFOREGROUND); }
bool CNotificationImp::AskYesNoQuestion(const char * Question) const { WriteTrace(TraceUserInterface, TraceError, Question); WindowMode(); HWND Parent = NULL; if (m_hWnd) { Parent = reinterpret_cast<HWND>(m_hWnd->GetWindowHandle()); } int result = MessageBoxW(Parent, stdstr(Question).ToUTF16().c_str(), wGS(MSG_MSGBOX_WARNING_TITLE).c_str(), MB_YESNO | MB_ICONWARNING | MB_DEFBUTTON2 | MB_SETFOREGROUND); return result == IDYES; }
void CNotification::FatalError ( const wchar_t * Message, ... ) const { wchar_t Msg[1000]; va_list ap; WindowMode(); va_start( ap, Message ); _vsnwprintf( Msg,(sizeof(Msg) / sizeof(Msg[0])) - 1, Message, ap ); va_end( ap ); HWND Parent = NULL; if (m_hWnd) { Parent = reinterpret_cast<HWND>(m_hWnd->GetHandle()); } MessageBoxW(Parent,Msg,L"Error",MB_OK|MB_ICONERROR|MB_SETFOREGROUND); ExitThread(0); }
void CNotification::DisplayError ( const wchar_t * Message, va_list ap ) const { if (this == NULL) { return; } wchar_t Msg[1000]; _vsnwprintf( Msg,sizeof(Msg) - 1,Message, ap ); va_end( ap ); stdstr TraceMessage; TraceMessage.FromUTF16(Msg); WriteTrace(TraceError,TraceMessage.c_str()); WindowMode(); HWND Parent = NULL; if (m_hWnd) { Parent = m_hWnd->GetHandle(); } MessageBoxW(Parent,Msg,GS(MSG_MSGBOX_TITLE),MB_OK|MB_ICONERROR|MB_SETFOREGROUND); }