2 |
|
// |
3 |
|
// Douglas Thrift |
4 |
|
// |
5 |
< |
// $Id: VTBFileUtil2.h,v 1.15 2003/09/03 04:12:41 douglas Exp $ |
5 |
> |
// $Id: VTBFileUtil2.h,v 1.16 2003/09/05 08:57:00 douglas Exp $ |
6 |
|
|
7 |
|
#ifndef _VTBFileUtil_h_ |
8 |
|
#define _VTBFileUtil_h_ |
99 |
|
+ (rect.bottom / 2), 0, 0, SWP_NOSIZE); |
100 |
|
} |
101 |
|
|
102 |
< |
inline void error(HWND parent = NULL) |
102 |
> |
inline void error(HWND parent = NULL, LONG code = ERROR_SUCCESS) |
103 |
|
{ |
104 |
|
LPVOID message; |
105 |
|
|
106 |
< |
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | |
107 |
< |
FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), 0, |
106 |
> |
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, |
107 |
> |
NULL, code == ERROR_SUCCESS ? GetLastError() : code, 0, |
108 |
|
LPTSTR(&message), 0, NULL); |
109 |
|
MessageBox(parent, LPCTSTR(message), programName.c_str(), MB_ICONERROR); |
110 |
|
LocalFree(message); |