News:

As usual while waiting for the next release - don't forget to check the nightly builds in the forum.

Main Menu

Supporting Windows Themes with wxWidgets

Started by FlyingIsFun1217, February 03, 2007, 06:26:03 PM

Previous topic - Next topic

FlyingIsFun1217

Simple question (I hope): When building my project with wxWidgets, it does not fully support the windows theme being used. I know that to change this in wxDev-C++, all you had to do was open project options and click a box that said 'Support Windows XP Themes'.

How can I do this within Code::Blocks?

Thanks!
FlyingIsFun1217

FlyingIsFun1217

Apparently thats what the Windows XP 'Look-n-Feel' plugin does.
Is that the best way to theme it?

Thanks!
FlyingIsFun1217

Biplab

Latest Revision of wizard does that job. Check it once.
Be a part of the solution, not a part of the problem.

raph

#3
Hi,

if you don't want to have to supply an extern manifest file, have a look here:
Quote from: wxMSW-2.8.0/docs/msw/winxp.txt
Windows XP introduces the themes (called "visual styles" in the Microsoft
documentation) in Windows world. As wxWidgets uses the standard Windows
controls for most of its classes, it can take advantage of it without
(almost) any effort from your part. The only thing you need to do if you
want your program to honour the visual style setting of Windows XP is to
add the manifest file to your program (this is not at all specific to
wxWidgets programs but is required for all Windows applications).

wxWidgets now includes manifest resources in wx.rc, so it should be enough to
include "wx/msw/wx.rc" in your application's resource file and you get
XP look automatically. If it doesn't work, follow the instructions below:
...

So just add a file called resource.rc to your project:
Code (resource.rc) Select

#include "wx/msw/wx.rc"

Biplab

#4
Quote from: raph on February 03, 2007, 06:46:08 PM
Code (resource.rc) Select

#include "wx/msw/wx.rc"


As I've posted earlier, It's already available in the wizard since Rev 7. Check it.  :)
Be a part of the solution, not a part of the problem.

FlyingIsFun1217

But since I've already created the project, that would involve me recreating it through the wizard to do that, right?

Thanks!
FlyingIsFun1217

raph

#6
If you don't want to recreate it with the wizard, either choose "Plugins"->"Windows XP Look'n'Feel", what will create the manifest file, or (if you don't have a resource file already) add a file to your project (name it eg. "resource.rc") and type in
Code (resource.rc) Select
#include "wx/msw/wx.rc"

Quote from: Biplab on February 03, 2007, 06:57:37 PM
As I've posted earlier, It's already available in the wizard since Rev 7. Check it.  :)
Very good :)

Greetings
raph