Initial Commit
This commit is contained in:
14
common/errormsg.cpp
Normal file
14
common/errormsg.cpp
Normal file
@@ -0,0 +1,14 @@
|
||||
#include <common/errormsg.hpp>
|
||||
|
||||
void ErrorMessage::message(DWORD message)
|
||||
{
|
||||
LPVOID pMessageBuffer;
|
||||
|
||||
::FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER|FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS,NULL,message,MAKELANGID(LANG_NEUTRAL,SUBLANG_DEFAULT),(LPSTR)&pMessageBuffer,0,NULL);
|
||||
if(!pMessageBuffer)return;
|
||||
::MessageBox(::GetFocus(),(LPSTR)pMessageBuffer,(LPSTR)"FormattedMessage",MB_OK);
|
||||
::LocalFree(pMessageBuffer);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user