Click here to Skip to main content
13,507,541 members
Rate this:
Please Sign up or sign in to vote.
See more:
I design one MFC Dialogue based application,it looks on my desktop very good,but on my friends laptop it looks very weired!
So my question is what I should have for it's look and feel will be same as that operating system version or win-7????
Posted 31-Jan-13 1:07am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

If you want your application to follow the style of each PC it's installed on you need to look into Themes. The Themes API will let you examine the users preferences at runtime and allow your Controls to fit in with the rest of the users applications. You also need to make sure you're using an up to data Common Controls library and call InitCommonControls with the correct settings to enable extra look and feel for newer versions of Windows. Also obviously you need to target your build at Windows7 if you want your app to look like a Windows7 app. If your build targets XP then it will general only use XP APIs, no Windows 7 improvements, even when it runs on Windows 7 so it will look like an old App.
Nothing to stop you having different builds for different versions of Windows though to take advantage of the latest stuff.

If you want your application to look exactly the same wherever it runs then you're probably out of luck but you might try rewriting it using the Qt framework rather than MFC. Qt will give you more control over appearance settings with a view to gettin exactly the same everywhere. It's a steep learning curve though.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.180417.1 | Last Updated 31 Jan 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100