Click here to Skip to main content
16,015,531 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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 i.e.win-xp or win-7????
Posted

1 solution

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.
 
Share this answer
 

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900