|
Yes i am building in UNICODE mode
----------------------------
KRISHNA KUMAR T M
|
|
|
|
|
Then
CString sFirstName=_T("Foo"), sLastName=_T("Goo");
CT2A sANSIFullName(sFirstName + sLastName);
std::string sResult(sANSIFullName);
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
no !
use std::wstring instead !
|
|
|
|
|
No need to be integralist, my friend i.e. I usually don't make philosophical assumptions on the reason behind the question. If he really needs a std::string (maybe he need to call a function of a library out of his control), then the proposed code works; on the other hand, since he probably needs that, someone else already gave the right links to get more insights on using UNICODE or ANSI strings in his own project.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
CPallini wrote: No need to be integralist, my friend
but we are not sheeps, we are thinking human being too, and answering the board also means advising well...
Using CT2A() or CW2A() will potentially loose data if the OP is using "true" wide-characters (those which really need more than 1 byte to be).
Using std::wstring will not though.
BTW, your point about the external lib is true
|
|
|
|
|
Saying thistoxcct wrote: no !
use std::wstring instead !
is integralism.
Saying this toxcct wrote: but we are not sheeps, we are thinking human being too, and answering the board also means advising well...
Using CT2A() or CW2A() will potentially loose data if the OP is using "true" wide-characters (those which really need more than 1 byte to be).
Using std::wstring will not though.
is of thinking human.
Saying this
toxcct wrote: BTW, your point [...] is true
is great!
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
ROTFL !
|
|
|
|
|
|
SeshaSridhar wrote: they should be opened in xml file format
What do you mean by that ? A csv file has a specific format, why do you want to "open it in xml format" ? This doesn't make a lot of sense to me...
|
|
|
|
|
|
Well, you still say exactly the same thing. What has xml to do here ? A csv file is not an xml file so if you try to parse it as an xml file, it will simply no work. It's a bit like trying to use a hammer to mow your grass...
So please, try to explain clearly what you are trying to do.
|
|
|
|
|
I think he might be saying he wants it to be displayed in a grid, like excel.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
But I still don't get it. Why do you have to use xml for that ? Or I am completely missing the point...
|
|
|
|
|
|
SeshaSridhar wrote: when .csv files are clicked they should be opened in xml file format
Read point #2 in the guidelines[^]
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Can you give a sample csv file you want to read and how it should look in your tree control?
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
My mistake, sorry. I read xls not xml.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
SeshaSridhar wrote: Please help me out.
With what? This is not a drive-thru code shack. If you want something, come inside and help cook it. There are plenty of people here to help you.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
could anybody please explain the concept of InitATL, wthat is it and why is it necessary? with the help of some example.
thanks in advance.
|
|
|
|
|
I suppose the clue is in the name.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Anjali Patil wrote: could anybody please explain the concept of InitATL...
Where did you find this?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Problem: Hi Iam using std::string to do all operations with string,
Now i want to support UNICODE how can i change it to UNICODE support.
Thanks in advance
----------------------------
KRISHNA KUMAR T M
|
|
|
|
|
std::string doesn't not support UNICODE. If you want to use unicode strings, you have to use std::wstring instead.
If you want support for both, you will need to define your own type, something like that:
#if defined _UNICODE || defined UNICODE
typedef std::wstring TMyString;
#else
typedef std::string TMyString;
#endif
And then everywhere in your code you use TMyString instead of std::string.
|
|
|
|
|
|
Hi,
I am working with COM dll resources. I have created a menu in a com dll and provided an interface with a method to return the handle to the menu.
When I am trying to pass this handle(converting to int) to CSingleDocTemplate of InitInstance() and trying to run the application, I am getting "Failed to create empty document".
My intention is to use the menu(resource) which is present in the com dll in my application.
In order to achieve this, is this the correct way of proceeding or not? If yes, where am I doing wrong?
If not, please suggest an alternative mechanism.
Thanks in advance.
Taruni
|
|
|
|