Print Page | Close Window

Flat-Style looking

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=9900
Printed Date: 14 May 2025 at 1:11am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Flat-Style looking
Posted By: floydzhang
Subject: Flat-Style looking
Date Posted: 16 March 2008 at 3:51am

I want to use the flat-style looking control, button, tab... Just like Windows-XP theme does. But all the controls I created in the dialog are 3D-looking, like Windows 2000 theme. ANy idea for that?

By the way, my operating system is Windows XP,  and I create my application framework by with XTP wizard, and I set the theme xtpThemeWhidbey in the CMainFrame::OnCreate().



Replies:
Posted By: Oleg
Date Posted: 16 March 2008 at 3:11pm
Hi,
Can you attach screenshot what you see? and project.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: floydzhang
Date Posted: 17 March 2008 at 12:53am


Posted By: floydzhang
Date Posted: 17 March 2008 at 12:57am
Hi, Oleg,
 
This screenshot is catched from Windows 2000, but the appearence is the same what I see in the Windows XP.  You can see the the style of mainframe is Visual Studio 2005, but the option dialog is old style, likes Win98, win2000. How to make the dialog and controls look like Windows XP style?
 
By the way, the appearence was flat mode before, but I don't know why it is old style now. Would you please tell give me some hits where to set this? The dialog must be derived from CXTPDialog?
 
Thanks
Boyang


Posted By: Oleg
Date Posted: 17 March 2008 at 2:11am

I need screenshot from Windows XP. Windows 2000 don't have Luna themes support.



-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: floydzhang
Date Posted: 17 March 2008 at 9:28am


Posted By: floydzhang
Date Posted: 17 March 2008 at 9:29am
Hi, Oleg,
 
You can see the dialog is old windows style -- 3D looking. This is what I don't want.


Posted By: Oleg
Date Posted: 17 March 2008 at 1:24pm
Hi,
ok, I see.
You need manifest file.
 
 
If you use Visual Studio 2005 add in stdafx.h lines
 
#if (_MSC_VER > 1310) // VS2005
#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_IA64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_X64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#else
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif
#endif


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: floydzhang
Date Posted: 17 March 2008 at 10:21pm
Hi,
 
Great! Your comments let me find the root cause.  Because my project is initialized with UNICODE, but we switched to ANSI later. So the definitions below doesn't work. Thank you, Oleg.
 
#ifdef _UNICODE
#if defined _M_IX86
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_IA64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#elif defined _M_X64
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"")
#else
#pragma comment(linker,"/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"")
#endif
#endif



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net