Forum

Pages: (2) [1] 2  ( Go to first unread post ) Reply to this topicStart new topicStart Poll

> Dialog Control Visual Theme
Virus
Posted: Apr 25 2005, 09:17 PM
Quote Post


New Member
*

Group: Members
Posts: 2
Member No.: 1207
Joined: 25-April 05



Hello!

I am relatively new to WinAsm Studio and I just wanted to ask how I can set the visual themes of the dialog controls to look like the XP style. Currently, when I assemble a *.wap* with a *.rc* in the project that produces a dialog box, the controls look like the Windows 95 or 98 controls, even though I use the Windows XP visual theme.

Any help is appreciated! :)

Attached Image
Attached Image
PMEmail Poster
Top
akyprian
Posted: Apr 26 2005, 12:22 AM
Quote Post


Administrator
******

Group: Admins
Posts: 1074
Member No.: 1
Joined: 12-May 04



Hi,

Extract the attached file anywhere you like (probably in your project's folder) and then Resources tab-Others-Resources-Add and select the XML file you extrtacted above. Go all and your executable should use the XP themes.

Please let me know if it helps,

Antonis

Attached File ( Number of downloads: 48 )
Attached File  Login/Register to be able to download
PMEmail PosterUsers Website
Top
Virus
Posted: Apr 26 2005, 02:36 PM
Quote Post


New Member
*

Group: Members
Posts: 2
Member No.: 1207
Joined: 25-April 05



It works now!

Thanks! :)
PMEmail Poster
Top
Phoenix
Posted: Apr 28 2005, 01:16 PM
Quote Post


Member
**

Group: Members
Posts: 38
Member No.: 852
Joined: 12-December 04



hi akyprian,

this is exactly what is was searching for.. but however, in my case, only the listbox control is shown using XP-Style, the other controls are not affected... do you or somebody else know a reason for this?

BTW, i am using InitCommonControls. In WinASM Visual Mode, the controls are shown correctly.

Thanks in advance,

Phoenix

Attached Image
Attached Image
PMEmail Poster
Top
QvasiModo
Posted: Apr 29 2005, 04:09 PM
Quote Post


Just your regular village idiot
******

Group: Moderators
Posts: 439
Member No.: 7
Joined: 13-May 04



Are you doing some custom painting? In that case the XP look will be disabled, unless you use some specific APIs to do it.

http://msdn.microsoft.com/library/default....ex/cookbook.asp
PMEmail Poster
Top
akyprian
Posted: Apr 29 2005, 10:51 PM
Quote Post


Administrator
******

Group: Admins
Posts: 1074
Member No.: 1
Joined: 12-May 04



If you still have problems, you can upload your project here so that we can help more

Antonis
PMEmail PosterUsers Website
Top
Phoenix
Posted: Apr 30 2005, 10:31 AM
Quote Post


Member
**

Group: Members
Posts: 38
Member No.: 852
Joined: 12-December 04



QvasiModo,

thank you for your suggestion and the link... however, i do not use any custom painting except that i am changing the font of some buttons at runtime.

But, what i really forgot ... i have WinXP 64bit beta installed and tested there (my dafault OS is win2k) so that seems to be the problem. However, this does not explain two things:

1. The controls are displayed correctly in WinASM Studio Visual mode (BTW, akyprian, did you know that WinASM works fine with WinXP 64bit??)

2. The listbox uses XP Theme, the other controls not at runtime.

I have tested with the dialog base template - without any coding - and got the same effect. I will upload the project later so you can perhaps tell me about the result.

Thank you,
Phoenix
PMEmail Poster
Top
Phoenix
Posted: Apr 30 2005, 10:51 AM
Quote Post


Member
**

Group: Members
Posts: 38
Member No.: 852
Joined: 12-December 04



Hi all, i have uploaded the complete project so perhaps you can tell me if XP Styles are working in XP 32bit?

Thanks in advance,
Phoenix


Attached File ( Number of downloads: 33 )
Attached File  Login/Register to be able to download
PMEmail Poster
Top
akyprian
Posted: May 2 2005, 08:57 AM
Quote Post


Administrator
******

Group: Admins
Posts: 1074
Member No.: 1
Joined: 12-May 04



I 'll be able to check on Wednesday; Sorry. If anybody else could try earlier that would be fine.

Thanks
PMEmail PosterUsers Website
Top
Phoenix
Posted: May 2 2005, 12:36 PM
Quote Post


Member
**

Group: Members
Posts: 38
Member No.: 852
Joined: 12-December 04



Thank you for your help, akyprian, Wednesday will be fine...:D i did a test on my office pc today (PIV @ 2,4Ghz / W2K SP4) and had to notice that the CpuLoad-control did not work in Cpuload-Style... so a comment about this would be appreciated, too. I am just adding a logfile writing proc to trace what is going on...

Regards,
Phoenix
PMEmail Poster
Top
QvasiModo
Posted: May 2 2005, 01:08 PM
Quote Post


Just your regular village idiot
******

Group: Moderators
Posts: 439
Member No.: 7
Joined: 13-May 04



Tested on WinXP SP2 (32 bits). XP styles are not working, and the CpuLoad control just spins from 0% to 100% (a demo mode?).

The manifest file seems correct, I really don't know why it doesn't work. I can only guess it could be the use of GDI plus... :unsure:

BTW, why does the wap file have hardcoded paths? :blink:
PMEmail Poster
Top
Phoenix
Posted: May 3 2005, 02:09 PM
Quote Post


Member
**

Group: Members
Posts: 38
Member No.: 852
Joined: 12-December 04



QvasiModo,

thanks for having a look at it.
QUOTE
just spins from 0% to 100% (a demo mode?)

Two of the controls should show CPU-Load, the other one is just normal progress bar...
QUOTE
I can only guess it could be the use of GDI plus...

I have the same problem with a dialog (base template) without gdi+... but i will google about this. (I always thought gdi+.dll is used to display themes and styles!?)
QUOTE
why does the wap file have hardcoded paths?

I really do not know, sorry. I did just put together the last working code and included the required gdi+ .inc's directly to the project, maybe that is the reason.

To get information why the CPU-Load-Style does not work on some machines, i did a version that writes a logfile (named CPU-Load.log :lol: ) to the app's directory. I also have changed the counters instance name. So if you like, download the attached file and replace them with the older ones. If the CPU-Load style does not work yet, i would be glad if you could email the log-file to me.....

Thanks in advance,
Phoenix

Attached File ( Number of downloads: 16 )
Attached File  Login/Register to be able to download
PMEmail Poster
Top
QvasiModo
Posted: May 3 2005, 03:19 PM
Quote Post


Just your regular village idiot
******

Group: Moderators
Posts: 439
Member No.: 7
Joined: 13-May 04



The two first controls do nothing, the third does what I've described.

GDI+ is probably not the problem, but who knows :unsure: in any case it's comctl32.dll that gives themes support. Since you call InitCommonControls and have a manifest, it should be enough.

Here's the log, there are several "unexpected" values:

Attached File ( Number of downloads: 8 )
Attached File  Login/Register to be able to download
PMEmail Poster
Top
akyprian
Posted: May 4 2005, 01:05 AM
Quote Post


Administrator
******

Group: Admins
Posts: 1074
Member No.: 1
Joined: 12-May 04



Hi,

The themes problem is easily solved: Instead of 1001, define XP=1 and all controls will look as they should!

Antonis
PMEmail PosterUsers Website
Top
Phoenix
Posted: May 4 2005, 03:52 AM
Quote Post


Member
**

Group: Members
Posts: 38
Member No.: 852
Joined: 12-December 04



QvasiModo,

the GetComputerNameEx API call fails and causes the problem... i will have to review that problem. Thank you for your help!

akyprian,

ooops... typical beginners mistake, i guess? I'll fix it this evening and try.... Thanks a lot!!

Regards,
Phoenix
PMEmail Poster
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic OptionsPages: (2) [1] 2  Reply to this topicStart new topicStart Poll

 

 
MKPortal 1.0.1a A �2003-2004 - Tutti i diritti riservati