2 |
|
// |
3 |
|
// Douglas Thrift |
4 |
|
// |
5 |
< |
// $Id: VTBFileUtil2.h,v 1.7 2003/08/17 03:55:39 douglas Exp $ |
5 |
> |
// $Id: VTBFileUtil2.h,v 1.11 2003/08/24 07:31:45 douglas Exp $ |
6 |
|
|
7 |
|
#ifndef _VTBFileUtil_h_ |
8 |
|
#define _VTBFileUtil_h_ |
21 |
|
#include <cstdlib> |
22 |
|
|
23 |
|
#include <windows.h> |
24 |
+ |
#include <windowsx.h> |
25 |
|
#include <commctrl.h> |
26 |
|
#include <objbase.h> |
27 |
|
#include <shlobj.h> |
28 |
+ |
#include <shlwapi.h> |
29 |
|
|
30 |
|
#include "resource.h" |
31 |
|
|
36 |
|
{ |
37 |
|
HINSTANCE instance; |
38 |
|
HICON icon; |
39 |
< |
UINT_PTR tips; |
39 |
> |
int show; |
40 |
|
}; |
41 |
|
|
42 |
|
extern bool debug; |
80 |
|
SetWindowPos(window, HWND_TOP, desktop.left + (rect.right / 2), desktop.top |
81 |
|
+ (rect.bottom / 2), 0, 0, SWP_NOSIZE); |
82 |
|
} |
83 |
< |
void tooltip(HWND tool, const string& tip); |
83 |
> |
inline void error(void) |
84 |
> |
{ |
85 |
> |
LPVOID message; |
86 |
> |
|
87 |
> |
FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | |
88 |
> |
FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), 0, |
89 |
> |
LPTSTR(&message), 0, NULL); |
90 |
> |
MessageBox(NULL, LPCTSTR(message), programName.c_str(), MB_ICONERROR); |
91 |
> |
LocalFree(message); |
92 |
> |
} |
93 |
|
|
94 |
|
#endif // _VTBFileUtil_h_ |