]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/fontenum.cpp
Make Home and End keys work as expected in wxGrid.
[wxWidgets.git] / src / os2 / fontenum.cpp
index af3bd9ec782c3baafa48dd6932443721b50991c8..fdb1f4af112f65411f7841fa77224c222d66913a 100644 (file)
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////////
-// Name:        msw/fontenum.cpp
+// Name:        src/os2/fontenum.cpp
 // Purpose:     wxFontEnumerator class for Windows
 // Author:      Julian Smart
 // Modified by: David Webster to add support for font encodings
 
 #if wxUSE_FONTMAP
 
+#include "wx/fontenum.h"
+
 #ifndef WX_PRECOMP
-  #include "wx/font.h"
+    #include "wx/font.h"
 #endif
 
-#include "wx/fontenum.h"
 #include "wx/fontmap.h"
 #include "wx/encinfo.h"
 
@@ -119,7 +120,7 @@ void wxFontEnumeratorHelper::DoEnumerate()
 #ifdef __WIN32__
     LOGFONT lf;
     lf.lfCharSet = m_charset;
-    wxStrncpy(lf.lfFaceName, m_facename, WXSIZEOF(lf.lfFaceName));
+    wxStrlcpy(lf.lfFaceName, m_facename, WXSIZEOF(lf.lfFaceName));
     lf.lfPitchAndFamily = 0;
     ::EnumFontFamiliesEx(hDC, &lf, (wxFONTENUMPROC)wxFontEnumeratorProc,
                          (LPARAM)this, 0) ;