Couple more Unicode fixes.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3104 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -65,7 +65,7 @@ bool wxStaticLine::Create( wxWindow *parent,
|
|||||||
m_hWnd = (WXHWND)::CreateWindow
|
m_hWnd = (WXHWND)::CreateWindow
|
||||||
(
|
(
|
||||||
_T("STATIC"),
|
_T("STATIC"),
|
||||||
"",
|
_T(""),
|
||||||
WS_VISIBLE | WS_CHILD |
|
WS_VISIBLE | WS_CHILD |
|
||||||
SS_GRAYRECT | SS_SUNKEN, // | SS_ETCHEDFRAME,
|
SS_GRAYRECT | SS_SUNKEN, // | SS_ETCHEDFRAME,
|
||||||
pos.x, pos.y, sizeReal.x, sizeReal.y,
|
pos.x, pos.y, sizeReal.x, sizeReal.y,
|
||||||
|
@@ -102,14 +102,14 @@ wxSize wxStaticText::DoGetBestSize()
|
|||||||
heightTextTotal = 0, heightLine;
|
heightTextTotal = 0, heightLine;
|
||||||
|
|
||||||
wxString curLine;
|
wxString curLine;
|
||||||
for ( const char *pc = text; ; pc++ ) {
|
for ( const wxChar *pc = text; ; pc++ ) {
|
||||||
if ( *pc == '\n' || *pc == '\0' ) {
|
if ( *pc == _T('\n') || *pc == _T('\0') ) {
|
||||||
GetTextExtent(curLine, &widthLine, &heightLine);
|
GetTextExtent(curLine, &widthLine, &heightLine);
|
||||||
if ( widthLine > widthTextMax )
|
if ( widthLine > widthTextMax )
|
||||||
widthTextMax = widthLine;
|
widthTextMax = widthLine;
|
||||||
heightTextTotal += heightLine;
|
heightTextTotal += heightLine;
|
||||||
|
|
||||||
if ( *pc == '\n' ) {
|
if ( *pc == _T('\n') ) {
|
||||||
curLine.Empty();
|
curLine.Empty();
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@@ -156,7 +156,7 @@ bool wxGetUserId(wxChar *buf, int maxSize)
|
|||||||
if ( ::GetUserName(buf, &nSize) == 0 )
|
if ( ::GetUserName(buf, &nSize) == 0 )
|
||||||
{
|
{
|
||||||
// actually, it does happen on Win9x if the user didn't log on
|
// actually, it does happen on Win9x if the user didn't log on
|
||||||
DWORD res = ::GetEnvironmentVariable("username", buf, maxSize);
|
DWORD res = ::GetEnvironmentVariable(_T("username"), buf, maxSize);
|
||||||
if ( res == 0 )
|
if ( res == 0 )
|
||||||
{
|
{
|
||||||
// not found
|
// not found
|
||||||
|
Reference in New Issue
Block a user