Author Topic: Why compiled wxWidgets program in win7 is XP style?  (Read 5488 times)

Offline freepro

  • Multiple posting newcomer
  • *
  • Posts: 31
Why compiled wxWidgets program in win7 is XP style?
« on: November 19, 2012, 03:11:44 pm »
I use CodeBlocks complied a wxWidgets GUI program in windows 7, but the GUI's style is XP. What i should to do?

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Why compiled wxWidgets program in win7 is XP style?
« Reply #1 on: November 19, 2012, 04:34:04 pm »
Most likely you've not given the correct OS version in your manifest file (or don't have one at all).

(not related to Code::Blocks)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline freepro

  • Multiple posting newcomer
  • *
  • Posts: 31
Re: Why compiled wxWidgets program in win7 is XP style?
« Reply #2 on: November 20, 2012, 03:35:44 am »
Can you tell me what i should to do?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9699
Re: Why compiled wxWidgets program in win7 is XP style?
« Reply #3 on: November 20, 2012, 06:16:52 am »
Can you tell me what i should to do?
Search for "manifest file" using your favourite search engine. There are plenty of examples around explaining what you have to do. And it depends on what you have in mind, so there is no general solution. You may use the "xpmanifest" plugin, too. However - this is for XP.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline freepro

  • Multiple posting newcomer
  • *
  • Posts: 31
Re: Why compiled wxWidgets program in win7 is XP style?
« Reply #4 on: November 20, 2012, 09:29:31 am »
Problem is resolved. :)
     I found the file 'sample.rc' in wxWidgets directory. There are brief descriptions:

// set this to 1 if you don't want to use manifest resource (manifest resource
// is needed to enable visual styles on Windows XP - see docs/msw/winxp.txt
// for more information)

#define wxUSE_NO_MANIFEST 0

So i add '#define wxUSE_NO_MANIFEST 0' in my resource.rc. That's great, the problem is resolved! ;D