Ansi CEdit in MFC unicode dialog
-
I have a MFC based dialog compiled with _UNICODE and all works well. Now I want to add a CEdit control and have it support Ansi text instead of unicode. That is, I want the CEdit control to accept ascii test and retrieve ascii text instead of unicode. Can this be done and if so, how?
-
I have a MFC based dialog compiled with _UNICODE and all works well. Now I want to add a CEdit control and have it support Ansi text instead of unicode. That is, I want the CEdit control to accept ascii test and retrieve ascii text instead of unicode. Can this be done and if so, how?
Why don't you do the conversion upon the retrieved text ?
Push Framework - now released ! http://www.pushframework.com
-
Why don't you do the conversion upon the retrieved text ?
Push Framework - now released ! http://www.pushframework.com
-
And I did not show you how to do a conversion, rather I suggested to do a conversion as a way to solve your problem. Please understand my answer!
Push Framework - now released ! http://www.pushframework.com
-
I have a MFC based dialog compiled with _UNICODE and all works well. Now I want to add a CEdit control and have it support Ansi text instead of unicode. That is, I want the CEdit control to accept ascii test and retrieve ascii text instead of unicode. Can this be done and if so, how?
If you have a subsclassed CEdit control, you could limit the allowed input to the standard ASCII characters. That way any text retrieved even though UNICODE would still all be in the ASCII range. Some clever stuff may have to be done to handle copy/paste etc but I would think such a method would be workable.
If you vote me down, my score will only get lower