Advanced Strategic Command
win32-errormsg.cpp
Go to the documentation of this file.
1 
2 /***************************************************************************
3  * *
4  * This program is free software; you can redistribute it and/or modify *
5  * it under the terms of the GNU General Public License as published by *
6  * the Free Software Foundation; either version 2 of the License, or *
7  * (at your option) any later version. *
8  * *
9  ***************************************************************************/
10 
11 
12 #include <windows.h>
13 #include <winuser.h>
14 
15 #include "win32-errormsg.h"
16 #include "../util/messaginghub.h"
17 
18 
19 void Win32IoErrorHandler::printError( const ASCString& msg )
20 {
21  MessageBox(NULL, msg.c_str(), "Error", MB_ICONERROR | MB_OK | MB_TASKMODAL );
22 }
23 
25 {
26  MessagingHub::Instance().error.connect( sigc::mem_fun( *this, &Win32IoErrorHandler::printError ));
27  MessagingHub::Instance().fatalError.connect( sigc::mem_fun( *this, &Win32IoErrorHandler::printError ));
28 }
29 
The ASCString class provides an abstract way to manipulate strings.
Definition: ascstring.h:14