main.h
Upload User: dfhlxjd
Upload Date: 2007-01-07
Package Size: 12k
Code Size: 1k
Category:

Shell api

Development Platform:

Visual C++

  1. //----------------------------------------
  2. // (c) Reliable Software 1997
  3. //----------------------------------------
  4. #ifndef _MAIN_H_INCLUDED
  5. #define _MAIN_H_INCLUDED
  6. #include <windows.h>
  7. void CenterWindow(HWND hwnd);
  8. HINSTANCE GetHinstance (HWND hwnd);
  9. class WinException
  10. {
  11. public:
  12.     WinException (char* msg)
  13.     : _err (GetLastError()), _msg(msg)
  14.     {}
  15.     DWORD GetError() const { return _err; }
  16.     char* GetMessage () const { return _msg; }
  17. private:
  18.     DWORD _err;
  19.     char* _msg;
  20. };
  21. // out of memory handler that throws WinException
  22. int NewHandler (size_t size);
  23. #endif // _MAIN_H_INCLUDED