I am developing a VC++ application (Visual Studio .NET 2003 Service Pack 1, MFC shared, MBCS character set). In a dialog box I have an CExtEdit control. My default keyboard setting in Windows is EN-US. Now I switch the keyboard to Romanian (RO) and I enter the following romanian characters: . The characters are entering and displaying fine in the edit control, but whne I call GetWindowText() in dialog's OnOK method, instead of characters I get ST.
And the strange thing is that this only happens in Release build, in Debug builds I can retrive the characters using GetWindowText.

What's wrong


Re: Visual C++ General CEdit - GetWindowText


Sorry, the control is CEdit not CExtEdit

Re: Visual C++ General CEdit - GetWindowText

Marius Bancila

Since it works in Debug and not in Release you should check what is different between the two configurations (make sure they both use the same character set). It's hard to make a diagnosis without seeing the code. So can you post it here, at least snippets

Re: Visual C++ General CEdit - GetWindowText



The code is simple:

void CTextModDialog::OnOK() {

CString cs;




If you give me a mail address I can send you the project configuration file to have a look.