Quote Originally Posted by jangus View Post
What about GetDlgItem(IDC_EDIT1)->SetWindowTextW(CString) ?
A lot of old timers like to program that way. For the folks that have discovered C++ and understand MFC, they prefer to create a control variable once during the life of the dialog and prefer to reuse it.

Btw, what you definitely shouldn't do is call the 'W' version of an api and pass it a CString variable. Just leave off the 'A' or 'W' and let the pre-processor use the build settings to figure out the correct api to use.