ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/proj/trunk/VTBFileUtil2/VTBFileUtil2.h
(Generate patch)

Comparing trunk/VTBFileUtil2/VTBFileUtil2.h (file contents):
Revision 262 by douglas, 2003-08-16T16:09:14-07:00 vs.
Revision 265 by douglas, 2003-08-16T20:55:39-07:00

# Line 2 | Line 2
2   //
3   // Douglas Thrift
4   //
5 < // $Id: VTBFileUtil2.h,v 1.5 2003/08/16 23:09:14 douglas Exp $
5 > // $Id: VTBFileUtil2.h,v 1.7 2003/08/17 03:55:39 douglas Exp $
6  
7   #ifndef _VTBFileUtil_h_
8   #define _VTBFileUtil_h_
# Line 16 | Line 16
16   #include <sstream>
17   #include <cctype>
18   #include <vector>
19 + #include <set>
20 + #include <map>
21   #include <cstdlib>
22  
23   #include <windows.h>
24   #include <commctrl.h>
25 + #include <objbase.h>
26 + #include <shlobj.h>
27  
28   #include "resource.h"
29  
# Line 41 | Line 45 | extern Gui gui;
45  
46   void usage(HWND parent = NULL);
47   void version(HWND parent = NULL);
48 + inline string toAnsi(const wstring& wide)
49 + {
50 +        LPSTR buffer = new CHAR[wide.length() + 1];
51 +
52 +        WideCharToMultiByte(CP_ACP, 0, wide.c_str(), wide.length() + 1, buffer,
53 +                wide.length() + 1, NULL, NULL);
54 +
55 +        return buffer;
56 + }
57 + inline wstring toWide(const string& ansi)
58 + {
59 +        LPWSTR buffer = new WCHAR[ansi.length() + 1];
60 +
61 +        MultiByteToWideChar(CP_ACP, 0, ansi.c_str(), ansi.length() + 1, buffer,
62 +                ansi.length() + 1);
63 +
64 +        return buffer;
65 + }
66   inline void center(HWND window)
67   {
68          RECT rect, dialog, desktop;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines