#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);
}



