Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - UNICODE data in non-UNICODE app...
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

UNICODE data in non-UNICODE app...

 Post Reply Post Reply
Author
Message
ddlittle View Drop Down
Senior Member
Senior Member


Joined: 19 February 2004
Location: United States
Status: Offline
Points: 132
Post Options Post Options   Thanks (0) Thanks(0)   Quote ddlittle Quote  Post ReplyReply Direct Link To This Post Topic: UNICODE data in non-UNICODE app...
    Posted: 02 December 2009 at 2:40pm
I have some UTF-16 data that I want to display in my CXTPReportControl, but CXTPReportRecordItemText()'s constructor only uses LPCTSTR, which is a char* without _UNICODE defined.  It's impossible to redo the whole app as UNICODE.  Is there any solution?  For now, I'm converting the code to UTF-8, but I'm hoping that's temporary.  Code that follows converts to UTF-8:

USES_CONVERSION;

vector<wstring>::iterator lineNumber;

for(lineNumber = m_LineNumberNameList.begin();lineNumber != m_LineNumberNameList.end();lineNumber++)

{

wstring name = *(lineNumber);

CXTPReportRecord* rec = new CXTPReportRecord;

InsertDefaultColumns(rec);

rec->AddItem(new CXTPReportRecordItemText(W2A(name.c_str())));

m_OrgReport.AddRecord(rec);

}

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.141 seconds.