2 |
|
// |
3 |
|
// Douglas Thrift |
4 |
|
// |
5 |
< |
// $Id: VTBFileUtil2.h,v 1.14 2003/09/03 03:40:35 douglas Exp $ |
5 |
> |
// $Id: VTBFileUtil2.h,v 1.18 2003/09/12 04:26:54 douglas Exp $ |
6 |
|
|
7 |
|
#ifndef _VTBFileUtil_h_ |
8 |
|
#define _VTBFileUtil_h_ |
14 |
|
#include <iostream> |
15 |
|
#include <string> |
16 |
|
#include <sstream> |
17 |
+ |
#include <fstream> |
18 |
|
#include <cctype> |
19 |
|
#include <vector> |
20 |
|
#include <set> |
29 |
|
#include <objbase.h> |
30 |
|
#include <shlobj.h> |
31 |
|
#include <shlwapi.h> |
32 |
+ |
#include <richedit.h> |
33 |
+ |
|
34 |
+ |
#define STRSAFE_LIB |
35 |
+ |
#define STRSAFE_NO_CB_FUNCTIONS |
36 |
+ |
|
37 |
+ |
#include <strsafe.h> |
38 |
|
|
39 |
|
#include "resource.h" |
40 |
|
|
105 |
|
+ (rect.bottom / 2), 0, 0, SWP_NOSIZE); |
106 |
|
} |
107 |
|
|
108 |
< |
inline void error(HWND parent = NULL) |
108 |
> |
inline void error(HWND parent = NULL, LONG code = ERROR_SUCCESS) |
109 |
|
{ |
110 |
|
LPVOID message; |
111 |
|
|
112 |
< |
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | |
113 |
< |
FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), 0, |
112 |
> |
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, |
113 |
> |
NULL, code == ERROR_SUCCESS ? GetLastError() : code, 0, |
114 |
|
LPTSTR(&message), 0, NULL); |
115 |
|
MessageBox(parent, LPCTSTR(message), programName.c_str(), MB_ICONERROR); |
116 |
|
LocalFree(message); |