flat assembler
Message board for the users of flat assembler.

Index > Windows > Window Classic Style

Author
Thread Post new topic Reply to topic
calpol2004



Joined: 16 Dec 2004
Posts: 110
calpol2004
in my application i use the xp style controls with the manifest.xml resource. The XP style buttons look very nice on my silvery blue background Very Happy. however look really ugly when the style is set to classic stlye on winxp. because of my application is only going to be run on Windows XP systems (it would run on older versions of windows, just wouldn't look so good) i don't need to worry about making the application look good on older versions. however where i want to run the application the computers running Windows XP has the style locked on windows classic by the administrators, they have no reason to do this as the functionality would not be affected whatsoever. what im asking for is information on how to change the style back to WinXP programmatically. if you disapprove and think i shouldn't be meddling Twisted Evil with the systems then i understand you completely, i just thought i'd ask before i start to draw the buttons myself with the GDI (rollovers and the blue line around the active buttons would be painful to implement).
Post 16 Feb 2006, 14:19
View user's profile Send private message MSN Messenger Reply with quote
calpol2004



Joined: 16 Dec 2004
Posts: 110
calpol2004
someone has given me a link to codeproject where it goes on about a dll called Uxtheme.dll it's all in C++. i think there may be some functions or something in there to change the theme... ill look into it.
Post 16 Feb 2006, 16:48
View user's profile Send private message MSN Messenger Reply with quote
calpol2004



Joined: 16 Dec 2004
Posts: 110
calpol2004
hmm i've gotten the following functions using reverends apiresolve:

Code:
import Uxtheme,\
       CloseThemeData,'CloseThemeData',\
       DrawThemeBackground,'DrawThemeBackground',\
       DrawThemeBackgroundEx,'DrawThemeBackgroundEx',\
       DrawThemeEdge,'DrawThemeEdge',\
       DrawThemeIcon,'DrawThemeIcon',\
       DrawThemeParentBackground,'DrawThemeParentBackground',\
       DrawThemeText,'DrawThemeText',\
       EnableThemeDialogTexture,'EnableThemeDialogTexture',\
       EnableTheming,'EnableTheming',\
       GetCurrentThemeName,'GetCurrentThemeName',\
       GetThemeAppProperties,'GetThemeAppProperties',\
       GetThemeBackgroundContentRect,'GetThemeBackgroundContentRect',\
       GetThemeBackgroundExtent,'GetThemeBackgroundExtent',\
       GetThemeBackgroundRegion,'GetThemeBackgroundRegion',\
       GetThemeBool,'GetThemeBool',\
       GetThemeColor,'GetThemeColor',\
       GetThemeDocumentationProperty,'GetThemeDocumentationProperty',\
       GetThemeEnumValue,'GetThemeEnumValue',\
       GetThemeFilename,'GetThemeFilename',\
       GetThemeFont,'GetThemeFont',\
       GetThemeInt,'GetThemeInt',\
       GetThemeIntList,'GetThemeIntList',\
       GetThemeMargins,'GetThemeMargins',\
       GetThemeMetric,'GetThemeMetric',\
       GetThemePartSize,'GetThemePartSize',\
       GetThemePosition,'GetThemePosition',\
       GetThemePropertyOrigin,'GetThemePropertyOrigin',\
       GetThemeRect,'GetThemeRect',\
       GetThemeString,'GetThemeString',\
       GetThemeSysBool,'GetThemeSysBool',\
       GetThemeSysColor,'GetThemeSysColor',\
       GetThemeSysColorBrush,'GetThemeSysColorBrush',\
       GetThemeSysFont,'GetThemeSysFont',\
       GetThemeSysInt,'GetThemeSysInt',\
       GetThemeSysSize,'GetThemeSysSize',\
       GetThemeSysString,'GetThemeSysString',\
       GetThemeTextExtent,'GetThemeTextExtent',\
       GetThemeTextMetrics,'GetThemeTextMetrics',\
       GetWindowTheme,'GetWindowTheme',\
       HitTestThemeBackground,'HitTestThemeBackground',\
       IsAppThemed,'IsAppThemed',\
       IsThemeActive,'IsThemeActive',\
       IsThemeBackgroundPartiallyTransparent,'IsThemeBackgroundPartiallyTransparent',\
       IsThemeDialogTextureEnabled,'IsThemeDialogTextureEnabled',\
       IsThemePartDefined,'IsThemePartDefined',\
       OpenThemeData,'OpenThemeData',\
       SetThemeAppProperties,'SetThemeAppProperties',\
       SetWindowTheme,'SetWindowTheme',\    


SetWindowTheme looks promising however ive got no idea how to use or if it does what i rly want it to do Evil or Very Mad. better get back to searching the web for help Sad.
Post 16 Feb 2006, 17:02
View user's profile Send private message MSN Messenger Reply with quote
calpol2004



Joined: 16 Dec 2004
Posts: 110
calpol2004
im quite sure these are the functions im looking for, after doing a google on uxtheme.dll i found page upon page of patches boasting about how they can change your theme and stuff. im still having trouble finding out how to use these functions as some of the parameters of the functions need parameters with CLSID's and allsorts in them Evil or Very Mad.


Last edited by calpol2004 on 16 Feb 2006, 17:52; edited 1 time in total
Post 16 Feb 2006, 17:32
View user's profile Send private message MSN Messenger Reply with quote
calpol2004



Joined: 16 Dec 2004
Posts: 110
calpol2004
Razz it seems you can individually theme each control, well at least i think you can, a C++ example seemed to be doing it. I'm still really struggling to understand this though, the examples are all object orientated (i can't get my head around OO, i just stick with C and ASM Very Happy) and use all the Uxtheme::blah stuff. Has anyone ever used the functions in this dll before if so could you post a code snippet or explain how to change the theme of a control or the whole windows GUI?
Post 16 Feb 2006, 17:48
View user's profile Send private message MSN Messenger Reply with quote
okasvi



Joined: 18 Aug 2005
Posts: 382
Location: Finland
okasvi

_________________
When We Ride On Our Enemies
support reverse smileys |:
Post 16 Feb 2006, 23:19
View user's profile Send private message MSN Messenger Reply with quote
Reverend



Joined: 24 Aug 2004
Posts: 408
Location: Poland
Reverend
calpol2004: I'm really pleased that you use my program Very Happy. Also because the include you pasted that my program output is wrong. And I found an error now, so in ApiResolve's thread there's a fixed version
Post 17 Feb 2006, 10:35
View user's profile Send private message Visit poster's website Reply with quote
calpol2004



Joined: 16 Dec 2004
Posts: 110
calpol2004
im the one that should be thanking you it's come in very useful over the past few months when im trying to find a non-documented function.

I tried EnableTheme and it works the wrong way round, it can change the theme off by using "invoke EnableTheme,0" but it can't turn it back on again with "invoke EnableTheme,1". I've been doing some google searching and i can download custom themes (or make them myself), i've gotten the default windows theme file by just selelcting save as in the display properties, now to set it Rolling Eyes.

EDIT: after researching the function even more the application has to be priveleged....dam.
Post 17 Feb 2006, 11:07
View user's profile Send private message MSN Messenger Reply with quote
okasvi



Joined: 18 Aug 2005
Posts: 382
Location: Finland
okasvi
the point with my post was that in the left hand side you got all documentation to every api you made that include file for Wink

_________________
When We Ride On Our Enemies
support reverse smileys |:
Post 17 Feb 2006, 12:07
View user's profile Send private message MSN Messenger Reply with quote
Plue



Joined: 15 Dec 2005
Posts: 151
Plue
There is a reason for the setting. Evil or Very Mad XP style looks ugly and if the user turned it off you should respect that.

_________________
Roses are red
Violets are blue
Some poems rhyme
And some don't.
Post 18 Feb 2006, 08:52
View user's profile Send private message Reply with quote
Madis731



Joined: 25 Sep 2003
Posts: 2140
Location: Estonia
Madis731
(Just my opinion)
I think they hired some children and elderly people to do the design:
1) It looks so colourful with that blue and red - only children can make so primitive designs.
2) They've made it about 10% thicker so it takes all the space on the screen - I'm still young and have
my 20:20 vision, My hand is not that shaky that I can't hit a 10x10px square. Please think about the
people having "crappy" monitors that only can show 1024x768 picture Razz - Its even uglier with 640x480 Neutral

I would understand if they put that childish skin on a XP Home and leave the "classic" on the Pro
to make it look PROFESSIONAL and eXPerienced. Strange is that the "silvery" look that some
people have doesn't make it any more professional but it looks FAT Smile
Post 18 Feb 2006, 14:03
View user's profile Send private message Visit poster's website Yahoo Messenger MSN Messenger Reply with quote
calpol2004



Joined: 16 Dec 2004
Posts: 110
calpol2004
yep i must admit the win xp style is rather...primitive. however when the xp style was changed at my school to classic and we were not able to change it back...poeple got annoyed. the average computer user for some reason seems to love the winxp style so thats what im going with. i kind of forgotton this project for the last like month after i finished my design. heres my custom UI, try looking at it in WinXP stlye then in classic and you may see what i mean. i myself think i did a decent job at designing it... although i could make the executable 10 times smaller if i used gifs instead of bitmaps....which i've been avoiding doing.

PS: i hope it doesn't look fat.


Description:
Download
Filename: customui.zip
Filesize: 6 KB
Downloaded: 111 Time(s)

Post 05 Mar 2006, 11:18
View user's profile Send private message MSN Messenger Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2020, Tomasz Grysztar. Also on GitHub, YouTube, Twitter.

Website powered by rwasa.