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 263 by douglas, 2003-08-16T16:09:14-07:00 vs.
Revision 264 by douglas, 2003-08-16T17:43:49-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.6 2003/08/17 00:43:49 douglas Exp $
6  
7   #ifndef _VTBFileUtil_h_
8   #define _VTBFileUtil_h_
# Line 20 | Line 20
20  
21   #include <windows.h>
22   #include <commctrl.h>
23 + #include <objbase.h>
24 + #include <shlobj.h>
25  
26   #include "resource.h"
27  
# Line 41 | Line 43 | extern Gui gui;
43  
44   void usage(HWND parent = NULL);
45   void version(HWND parent = NULL);
46 + inline string toAnsi(const wstring& wide)
47 + {
48 +        LPSTR buffer = new CHAR[wide.length() + 1];
49 +
50 +        WideCharToMultiByte(CP_ACP, 0, wide.c_str(), wide.length() + 1, buffer,
51 +                wide.length() + 1, NULL, NULL);
52 +
53 +        return buffer;
54 + }
55 + inline wstring toWide(const string& ansi)
56 + {
57 +        LPWSTR buffer = new WCHAR[ansi.length() + 1];
58 +
59 +        MultiByteToWideChar(CP_ACP, 0, ansi.c_str(), ansi.length() + 1, buffer,
60 +                ansi.length() + 1);
61 +
62 +        return buffer;
63 + }
64   inline void center(HWND window)
65   {
66          RECT rect, dialog, desktop;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines