MFC/Visual Studio: Changing character encoding makes buttons unsightly

Posted on 2007-07-20
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 ) 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,
Question by:sternocera
    LVL 86

    Accepted Solution

    >>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


    Author Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Suggested Solutions

    Title # Comments Views Activity
    notReplace  challenge 53 93
    while loop over for loop 7 67
    sumHeights2  challenge 7 51
    Use of condition with 'serial' in ansible 2 24
    Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
    This article shows you how to optimize memory allocations in C++ using placement new. Applicable especially to usecases dealing with creation of large number of objects. A brief on problem: Lets take example problem for simplicity: - I have a G…
    The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    6 Experts available now in Live!

    Get 1:1 Help Now