[Commits] (davids) colheader - MSW Unicode build fixes

commits at osafoundation.org commits at osafoundation.org
Mon Apr 4 15:14:00 PDT 2005


Commit by: davids
Modified files:
internal/wxPython-2.5/src/generic/colheader.cpp 1.46 1.47

Log message:

colheader - MSW Unicode build fixes
r=TBD



ViewCVS links:
http://cvs.osafoundation.org/index.cgi/internal/wxPython-2.5/src/generic/colheader.cpp.diff?r1=text&tr1=1.46&r2=text&tr2=1.47

Index: internal/wxPython-2.5/src/generic/colheader.cpp
diff -u internal/wxPython-2.5/src/generic/colheader.cpp:1.46 internal/wxPython-2.5/src/generic/colheader.cpp:1.47
--- internal/wxPython-2.5/src/generic/colheader.cpp:1.46	Mon Apr  4 02:23:22 2005
+++ internal/wxPython-2.5/src/generic/colheader.cpp	Mon Apr  4 15:13:59 2005
@@ -242,7 +242,9 @@
 
 	// NB: the CreateControl call crashes on MacOS
 #if defined(__WXMSW__)
-	localName = _T(WC_HEADER);
+	// NB: this is a string from Win32 headers and is conditionally defined as Unicode or ANSI,
+	// hence, no _T() nor wxT() macro is desirable
+	localName = WC_HEADER;
 	bResultV =
 		CreateControl(
 			parent, id, pos, actualSize,
@@ -1369,7 +1371,7 @@
 
 	ZeroMemory( &itemData, sizeof(itemData) );
 	itemData.mask = HDI_TEXT | HDI_FORMAT | HDI_WIDTH;
-	itemData.pszText = (LPSTR)titleText;
+	itemData.pszText = (LPTSTR)titleText;
 	itemData.cxy = (int)nWidth;
 	itemData.cchTextMax = 256;
 //	itemData.cchTextMax = sizeof(itemData.pszText) / sizeof(itemData.pszText[0]);
@@ -1432,7 +1434,7 @@
 
 	// add string reference
 	itemData.mask = HDI_TEXT | HDI_FORMAT | HDI_WIDTH;
-	itemData.pszText = (LPSTR)(itemRef->m_LabelTextRef.c_str());
+	itemData.pszText = (LPTSTR)(itemRef->m_LabelTextRef.c_str());
 	itemData.cxy = (int)(itemRef->m_ExtentX);
 	itemData.cchTextMax = 256;
 //	itemData.cchTextMax = sizeof(itemData.pszText) / sizeof(itemData.pszText[0]);



More information about the Commits mailing list