We help IT Professionals succeed at work.

MFC/Visual Studio: Changing character encoding makes buttons unsightly

Medium Priority
Last Modified: 2013-12-14

I've changed the character encoding from Unicode to multibyte for a project, to accommodate the use of some code ( code from http://www.codeproject.com/docking/AutoResizingControls.asp ) that couldn't recast a string (that old problem).

This seems to have had the effect of making my forms buttons ugly. They don't have nice, rounded windows xp style edges, but are square in the style of windows 95. This is unacceptable to me.

Does anyone know how I can use this code without changing my character encoding, or change my character encoding without changing the appearance of my buttons?

Thanks a lot,
Watch Question

Top Expert 2012
>>Does anyone know how I can use this code without changing my character

Convert the strings on the fly. Where exactly do you have that "couldn't recast a string" problem? In most cases, you can simply

void func( LPSTR lpsz )
   LPWSTR x = A2W(lpsz);
   // Do something with x

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.