Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - Flat-Style looking
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Flat-Style looking

 Post Reply Post Reply
Author
Message
floydzhang View Drop Down
Groupie
Groupie


Joined: 08 March 2008
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote floydzhang Quote  Post ReplyReply Direct Link To This Post Topic: Flat-Style looking
    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().
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 16 March 2008 at 3:11pm
Hi,
Can you attach screenshot what you see? and project.
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
floydzhang View Drop Down
Groupie
Groupie


Joined: 08 March 2008
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote floydzhang Quote  Post ReplyReply Direct Link To This Post Posted: 17 March 2008 at 12:53am
Back to Top
floydzhang View Drop Down
Groupie
Groupie


Joined: 08 March 2008
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote floydzhang Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
floydzhang View Drop Down
Groupie
Groupie


Joined: 08 March 2008
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote floydzhang Quote  Post ReplyReply Direct Link To This Post Posted: 17 March 2008 at 9:28am
Back to Top
floydzhang View Drop Down
Groupie
Groupie


Joined: 08 March 2008
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote floydzhang Quote  Post ReplyReply Direct Link To This Post 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.
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
floydzhang View Drop Down
Groupie
Groupie


Joined: 08 March 2008
Status: Offline
Points: 50
Post Options Post Options   Thanks (0) Thanks(0)   Quote floydzhang Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.076 seconds.