]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/fontutil.cpp
restore tabg.cpp for wxMotif's wxNotebook implementation
[wxWidgets.git] / src / msw / fontutil.cpp
index dbf009105ad3ed52d14c4a266626605177e3b60f..22b4a6210102a77a9887ae482a38cad9570261d8 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
 // headers
 // ----------------------------------------------------------------------------
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-    #pragma implementation "fontutil.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
@@ -33,6 +29,7 @@
     #include "wx/log.h"
     #include "wx/intl.h"
     #include "wx/encinfo.h"
     #include "wx/log.h"
     #include "wx/intl.h"
     #include "wx/encinfo.h"
+    #include "wx/wxcrtvararg.h"
 #endif //WX_PRECOMP
 
 #include "wx/msw/private.h"
 #endif //WX_PRECOMP
 
 #include "wx/msw/private.h"
@@ -164,8 +161,8 @@ bool wxTestFontEncoding(const wxNativeEncodingInfo& info)
     LOGFONT lf;
     wxZeroMemory(lf);       // all default values
 
     LOGFONT lf;
     wxZeroMemory(lf);       // all default values
 
-    lf.lfCharSet = info.charset;
-    wxStrncpy(lf.lfFaceName, info.facename, WXSIZEOF(lf.lfFaceName));
+    lf.lfCharSet = (BYTE)info.charset;
+    wxStrlcpy(lf.lfFaceName, info.facename.c_str(), WXSIZEOF(lf.lfFaceName));
 
     HFONT hfont = ::CreateFontIndirect(&lf);
     if ( !hfont )
 
     HFONT hfont = ::CreateFontIndirect(&lf);
     if ( !hfont )
@@ -236,7 +233,7 @@ wxFontEncoding wxGetFontEncFromCharSet(int cs)
             break;
 
         case THAI_CHARSET:
             break;
 
         case THAI_CHARSET:
-            fontEncoding = wxFONTENCODING_CP437;
+            fontEncoding = wxFONTENCODING_CP874;
             break;
 
         case SHIFTJIS_CHARSET:
             break;
 
         case SHIFTJIS_CHARSET: