VERIFY and TRACE, how to implement for debug/release, unicode-aware, no warnings at lvl 4
Hi group and apologize because this isn't a pure MFC-question. I have to
finish a raw win32 app written in C++. I really miss the macros TRACE
and VERIFY, which I tend to use when writing MFC programs. I googled for
"win32 verify macro" and the very first hit is for a codeproject.com
project with implementations to be used in a win32 program, however. The
project contains a single header file, debug.h, but it doesn't compile
without warnings (using warning level 4), doesn't seem to be unicode
aware and doesn't compile at all in release mode. I was just wonderin...Which control should I use to display Unicode characters?
I want to show Unicode characters, such as Chinese and
Arabic. Which control should I use? Could you please
give me a bit of example code?
Thanks a lot.
You do not need specific control to display Unicode strings. Normally, you
would use SetWindowText function to set the control text. If you look in
winuser.h file this 'function' #defined as SetWindowTextA or SetWindowTextW
(depending on the type of the build). If you want to use Unicode text
regardless of build type, specify SetWindowTextW explicitly. Note that you
need to have appropriate fonts installed to a...unicode application
this is a question related to VB.
i want to make the VB application unicode based.
i am not able to do it right now. if anybody knows please let me know
I want to make an application for international use which should all
languages(which unicode support).
So i want to know how to change language?
or in ther words, how to change my Locale( at run time).
...How to convert to unicode in ADSI
I made a vbs to add an extra e-maill address to a distribution list group.
The e-mail address should be <group name>@dnv.com.
As we are a Norwegian company, the group name sometimes contains Norwegian
character such as "Ø".
When I look into ADSI, the string with "Ø" do updates in "mail" attribute.
But if I want to send e-mail to this distribution goup, error will report
that "The format of the e-mail address is incorrect".
I found if I manually create the e-mail address, the system will
automatically convert ...ftpd unicode
In Wince 5.0 file and folder names may contain UNICODE (e.g. cyrillic or
I was not able to transfer such files via FTP. I think it is a problem of
Any suggestions ?
You've got full source code of FTPD, so clone it (see my blog) and
change it to whatever you need, or buy a 3rd party FTP implementation
for CE. Note that FTPD is shipped as "Sample" meaning it's not a full
featured final program.
Michel Verhagen, eMVP
Check out my blog: http://GuruCE.com/blog
Microsoft Embedded Partner
http://...How do you enter Unicode characters that don't have a Alt-nnnn shortcut?
I have a need to enter a range of non-English names into a combo box on a
form in an Access 2003 application. Sometimes this requires the use of
accented characters that do not appear on a UK keyboard. If I refer to the
Windows XP Character Map facility (charmap,.exe) then I can see that many
such foreign characters have been allocated an Alt-nnnn code that is
displayed at the bottom right of the Character Map acreen. This makes it
easy to enter these characters.
However, many other characters have not been given an Alt-nnnn keyboard
shortcut. They only have a U-FFFF code, displayed at...Opening CSV file(saved in unicode) in excel
If anyone can help me on this, I would really appreciate
I have a file that is saved in .csv extension (Unicode
format). Let's say for example, I have the data as follows:
When I save the above data in .csv (in Ascii format) and
open in excel file, I see that each value is placed in
When I save the same data in .csv (Unicode) I see the
whole information appears in the single cell(first cell
Is there a limitation to the CSV FILE opening in EXCEL,
with Unicode format?
Any inputs/...unicode format files for Outlook 2002
I use Outlook 2002. I would like to use Unicode files (for larger size). I
see references to using it with Outlook 2003, but none for 2002. can
unicode files be used with Outlook 2002? If so, how?
OL 2003 & 2007 only
"Huck Rorick" <email@example.com> wrote in message
>I use Outlook 2002. I would like to use Unicode files (for larger size).
>I see references to using it with Outlook 2003, but none for 2002. can
>unicode files be used with Outlook 2002? If so, how?
> than...Clipboard for Unicode and Non-Unicode
We have a progarm write with non-unicode. I found that in some
language, the character can not be pasted to CEdit correctly. For
example, if our application is running on Russian XP, the string copy
from IE can be pasted to CEdit properly. But if I pasted the same
string into Notepad, and then copy the string from notepad to our
CEdit, the string can not show corectly. Is it a coding problem? Is it
possible to make CEdit to accept the string from notepad?
If it is a question of pasting a UTF16 string into a single-byte edit
control, you could try it in two stages:
Given the following code snippet:
WNetOpenEnum( dwScope, 0, 0, NULL, &hEnum );
struct hostent *host;
DWORD Count = 0xFFFFFFFF;
LPVOID Buffer = new char;
DWORD BufferSize = 16384;
WNetEnumResource(hEnum, &Count, Buffer, &BufferSize);
NetResource = (NETRESOURCE *) Buffer;
for (int i = 0; i < Count; i++, NetResource++)
CString strFullName = NetResource->lpRemoteName;
host = gethostbyname((LPCTSTR) strFullName);
This works when I do *not* have _UNICODE and UNICODE defined. When I *do*
define those directives, I get a compiler error on the call to the...create csv which contains unicode
i want to create csv which contains unicode
can anyone help me out
Requirement is not clear.
Use Excel to create the unicode content and then save as CSV or Unicode txt
> i want to create csv which contains unicode
> can anyone help me out
...printing UNICODE and convert CString to UNICODE
1.how do i convert some CString to UNICODE ? ? ?
i search in MSDN and i dont understand how to do it .
2. i writing some program and i need to send some CString to printing .
in my CString there is some local language (not eanglish) and the printer
always give me some GIBRISH data.
pleace , someone can help me ?? ?
For 1: Use MultiByteToWideChar()
Or, Use a CStringW and initialise it from your CString.
For 2: You will need to give more information about how you are getting your
text to the printer. You should be getting a device context for the printer
and use DrawText or a ...Handling UNICODE #2
Here is another problem (at least for me). In the edit control
non-English string is displayed properly. There is a member variable
for this control, of a CString data type.
My question is - how to assign this non-English string to this
I mean when I'm calling
in Debug the value for this member data is "??????"
and also when I'm reading recordset, which returns this non-English
value properly, (I can see it running corresponding stored procedure in
Query Analyzer), the variable of a type _bstr_t, which receiving the
value also look...Unicode Support
Is there a way to insert characters in Microsoft Office V.X
Applications, such as Unicode 010D and 0117 (c with a caron above it
and e with a dot above it)? They don't seem to appear in the Insert
-> Symbol box, and I can't insert them from the OSX Character Palette.
Thanks for your help!
Dave Feucht <firstname.lastname@example.org> wrote:
> Is there a way to insert characters in Microsoft Office V.X
> Applications, such as Unicode 010D and 0117 (c with a caron above it
> and e with a dot above it)? They don't seem to appear in the Insert
&g...RegQueryValueEx and UNICODE.
Hello everybody. I Have a function to extract char data from the registry,
but I don't know if it is UNICODE compliant, this is my code:
BOOL CRegistry::Read (LPCTSTR pszKey, CString& sVal)
//m_hKey already is ok:
lReturn = ::RegQueryValueEx (m_hKey, pszKey, NULL, NULL, NULL, &dwSize);
if (lReturn != ERROR_SUCCESS)
//Is this UNICODE compliant?
char *pszChain = (char*)malloc(dwSize + 1);
lReturn = ::RegQueryValueEx (m_hKey, pszKey, NULL, &dwTyp...Non-unicode version of LsaOpenPolicy...
The LsaOpenPolicy function takes Unicode string as parameter. Is there a
non-Unicode version of the same function available..?
Changing the entire application for Unicode support is very difficult.
Even if there is a workaround, please let me know..?
Thanks in advance.
Anand G wrote:
> The LsaOpenPolicy function takes Unicode string as parameter. Is there a
> non-Unicode version of the same function available..?
> Changing the entire application for Unicode support is very difficult.
Use Unicode string just for this function. Instead of CString use
CStringW,...Convert UTF-16 Unicode to UTF-8 Unicode?
How can I convert a UTF-16 (also known as UTF-7) unicode text file to
a UTF-8 unicode text file?
Open file with notepad,
File - Save as
choose the name of new file and encoding UTF-8
Then button "Save".
Or you like do this from vb code?
"Greg Lovern" <email@example.com> wrote in message
> How can I convert a UTF-16 (also known as UTF-7) unicode text file to
> a UTF-8 unicode text file?
...MS assumes everything is Unicode with VS 2008?
Any idea why, with VS 2008, MS changed CRichEditCtrl::GetSelText() to
return an LPTSTR instead of LPSTR? This is a breaking change for me,
but not the only one.
> Any idea why, with VS 2008, MS changed CRichEditCtrl::GetSelText()
> to return an LPTSTR instead of LPSTR? This is a breaking change for
> me, but not the only one.
They will of course be the same, if you remove the default "Use
Unicode" setting from the project.
<firstname.lastname@example.org> wrote in message
news:baa2952d-d165-45f0-a1cd-ba4d1fce53c...Unicode CFileDialog in non-Unicode app how?
We have a non-Unicode app that in a few cases uses some Unicode features
(deliberately, for example by specifying CStringW).
The problem we're encountering, is that I would like to use the common "File
Save" dialog, but pass it an initial filename that is not necessarily in the
same language as the Windows install language.
The default GetSaveFileNameA() (which is what CFileDialog::DoModal() calls)
is unhappy when I do this, it fails and CommDlgExtendedError() returns
FNERR_INVALIDFILENAME which is not entirely unexpected.
It looks like MFC has a few Unicode features avai...unicode + mfc
How can I build a unicode program with MFC,
which can run no Win9x and Win2k and WinXP?
Is there any special things that I should pay attention?
Thank you very much.
See MSLU (Layer for UNICODE) in SDK. Check
"jason" <email@example.com> wrote in message
> Hi all,
> How can I build a unicode program with MFC,
> which can run no Win9x and Win2k and WinXP?
> Is there any special things that I should pay attention?
> Thank you very much.
Is a Unicode character always represented as a single 16-bit integer for every
language besides the oriental languages?
No. Read about surrogates. A number of other languages, particularly some of the more
obscure scripts (including several dead scripts which scholars in those areas use to
communicate their findings, such as Cuneiform), are in the surrogate range.
You should probably get the Unicode 5.0 standard which is now available. Apparently it
incorporates a lot of material previously scattered throughout the Unicode Consortium's
site. There's a link to it from my Web s...unicode versus ansi format
I'm guessing it should be possible to look through a hex editor, to
determine if a particular PST file is in the Outlook 2003 PST (unicode)
format, or pre-2003 (ansi) .. has anyone done this? What is the tell
tale sign to look for - what bytes or set of bytes do i need to pay
Why bother with a Hex editor - just open Data file management to see what
format the .pst file is in.
Milly Staples [MVP - Outlook}
Please post all followup questions to the newsgroups only to keep the
> I'm guessing it should ...conflict between Unicode and non-Unicode builds?
We just had a really strange error that took a while to diagnose.
An ISAPI extension running under IIS tried to CoCreateInstance a
particular COM component and was getting a failed HRESULT for "Access
is denied". While this was not happening under Windows 2000, IIS 6.0
on Windows 2003 wouldn't work all the time. On one server we could
get it to work by switching IIS 6.0 to use 5.0 Isolation mode and
setting the ISAPI extension to Low isolation, but on another server
this didn't seem to have an effect.
The break came for us when I tried running Sysinternal's Filemon
ut...Using CListCtrl with MS Layer for UNICODE... Displays only first character
I'm having a problem with the CListCtrl. I have an application which I
want to run in both 9x and 2000, which uses UNICODE. I'm displaying
information in the CListCtrl. On the 2000 machine everything works fine.
On the 9x machine only the first character. I am grateful for any help. I
have not been able to find the solution to this problem.
Displayed in windows 2000
Parker Darin 4 Microsoft St.
Lewis Eric 3 Microsoft St.
Smith Mike 2 Microsoft St.
Jones David 1 Microsoft St.
Displayed in window...