char[260] to LPWSTR conversion error??????
-
Hi again, I'm using UNICODE char set and have this error of converting char[260] to LPWSTR and... CString to LPCSTR I'm not familiar with UNICODE but i have to use it. Hope you can help me. Thanks.
-
Hi again, I'm using UNICODE char set and have this error of converting char[260] to LPWSTR and... CString to LPCSTR I'm not familiar with UNICODE but i have to use it. Hope you can help me. Thanks.
why don't you just always use
CString
withLPC**T**STR
??? when you handle literals, just round them with the _T() macro... that way, you don't even have to think to convert from ascii to unicode and vice versa... for example:CString str = _T("Hello World !");
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
Hi again, I'm using UNICODE char set and have this error of converting char[260] to LPWSTR and... CString to LPCSTR I'm not familiar with UNICODE but i have to use it. Hope you can help me. Thanks.
-
Change into property settings ...use project->configuration property->general see, character set change into multibyte characterset.. then your code is running proper..
*****THANKS N ADVANCE**** Mathen.K (I WILL TRY MY LEVEL BEST )
TooShy2Talk wrote:
I'm not familiar with UNICODE but i have to use it.
rowdy_vc++ wrote:
see, character set change into multibyte characterset..
Are you answering queries without even understanding them?
Nobody can give you wiser advice than yourself. - Cicero .·´¯`·->Rajesh<-·´¯`·. Codeproject.com: Visual C++ MVP
-
Change into property settings ...use project->configuration property->general see, character set change into multibyte characterset.. then your code is running proper..
*****THANKS N ADVANCE**** Mathen.K (I WILL TRY MY LEVEL BEST )
go round a problem won't fix it. the OP has a problem of design in his code, and he'd better fix that first...
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
Change into property settings ...use project->configuration property->general see, character set change into multibyte characterset.. then your code is running proper..
*****THANKS N ADVANCE**** Mathen.K (I WILL TRY MY LEVEL BEST )
We have seen many posts of questions by you. We know your level.
Maxwell Chen
-
Change into property settings ...use project->configuration property->general see, character set change into multibyte characterset.. then your code is running proper..
*****THANKS N ADVANCE**** Mathen.K (I WILL TRY MY LEVEL BEST )
But if i have to change it to MultiByte char other codes have to be converted to MultiByte. Changing those codes are more work than fixing this conversion. I just download sample source code and combine them altogether but problem such this arises due to this. Hope you can help me. Thanks.
-
But if i have to change it to MultiByte char other codes have to be converted to MultiByte. Changing those codes are more work than fixing this conversion. I just download sample source code and combine them altogether but problem such this arises due to this. Hope you can help me. Thanks.
read the other replies. this guy answered you, but he doesn't even know what he talks about. so don't take his post in consideration; it's useless.
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
But if i have to change it to MultiByte char other codes have to be converted to MultiByte. Changing those codes are more work than fixing this conversion. I just download sample source code and combine them altogether but problem such this arises due to this. Hope you can help me. Thanks.
Since you have to adapt different pieces of code, IMHO the best approach is to uniform the whole project to generic text mappings [^], as already suggested by toxcct. It should be not such a daunting task (hopefully). :)
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