FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Windows XP look

 
Post new topic   Reply to topic     Forum Index -> DFL
View previous topic :: View next topic  
Author Message
Bojo



Joined: 22 Oct 2004
Posts: 23
Location: Denmark

PostPosted: Sun Oct 24, 2004 4:47 am    Post subject: Windows XP look Reply with quote

Hi

How come some controls has the XP look (f.inst. the scrollbars in TextBox), but others (f.inst Buttons and Checkboxes) doesn't?

Regards

Bojo
Back to top
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Sun Oct 24, 2004 3:18 pm    Post subject: Reply with quote

When loading those controls from the NULL instance, they have the classic look; probably for compatibility reasons. The XP styles are loaded elsewhere, maybe shell32.
I'm not sure how I should handle this yet.
Back to top
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Mon Oct 25, 2004 12:33 pm    Post subject: Reply with quote

OK, the XP styles are from comctl32.dll version 6. Here's more information on it if you want to try it yourself: http://msdn.microsoft.com/library/en-us/dnwxp/html/xptheming.asp
I'm not using XP so I might have a hard time with it Wink
Back to top
View user's profile Send private message
qbert



Joined: 30 Mar 2004
Posts: 209
Location: Dallas, Texas

PostPosted: Mon Oct 25, 2004 3:40 pm    Post subject: Reply with quote

Does the 'XP' look by default come with those blue shadowed menus ? And 'rollover' style buttons etc ? I remember reading something about this it needs a 'manifest' of some sort i think.

Charlie
Back to top
View user's profile Send private message MSN Messenger
Bojo



Joined: 22 Oct 2004
Posts: 23
Location: Denmark

PostPosted: Mon Oct 25, 2004 3:44 pm    Post subject: Reply with quote

Vathix wrote:
OK, the XP styles are from comctl32.dll version 6. Here's more information on it if you want to try it yourself: http://msdn.microsoft.com/library/en-us/dnwxp/html/xptheming.asp
I'm not using XP so I might have a hard time with it Wink


I've tried the manifest thing with some DFL examples, and everything looks ok except the standard button!

In XP the standard button gets an ugly border:



Left button is DFL, right button is from windows explorer.
Back to top
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Wed Oct 27, 2004 5:52 am    Post subject: Reply with quote

Try:

Code:
import dfl.winapi;
SetWindowLongA(button.handle, GWL_STYLE, GetWindowLongA(button.handle, GWL_STYLE) | 0x00008000);


It sets the style BS_FLAT. If that doesn't work, then I don't know. Should I install XP just for this? ;p
Back to top
View user's profile Send private message
Bojo



Joined: 22 Oct 2004
Posts: 23
Location: Denmark

PostPosted: Wed Oct 27, 2004 8:53 am    Post subject: Reply with quote

Vathix wrote:
Try:

Code:
import dfl.winapi;
SetWindowLongA(button.handle, GWL_STYLE, GetWindowLongA(button.handle, GWL_STYLE) | 0x00008000);


It sets the style BS_FLAT. If that doesn't work, then I don't know. Should I install XP just for this? ;p


Didn't help. Sad

I've just noticed that the radiobutton also have a problem. The background is solid black, when using the XP-manifest.

The checkbox looks fine.

It seems that Visual Basic has the same problem:
http://groups.google.dk/groups?q=xp+manifest+black+background&hl=da&lr=&selm=1015509510.467705?40ernani.logica.co.uk&rnum=10
Back to top
View user's profile Send private message
Bojo



Joined: 22 Oct 2004
Posts: 23
Location: Denmark

PostPosted: Sat Oct 30, 2004 1:11 pm    Post subject: Reply with quote

Just tried making some buttons and radiobuttons in D using only the API. Everything looks fine when applying the XP manifest. Confused
Back to top
View user's profile Send private message
qbert



Joined: 30 Mar 2004
Posts: 209
Location: Dallas, Texas

PostPosted: Wed Nov 03, 2004 1:51 pm    Post subject: Reply with quote

Using only the win32 API ?

Can you paste the code and the linking / compiling options ? Maybe its something to do with the linker .

Also how do you use a manifest with DFL ?

Thanks!

Charlie
Back to top
View user's profile Send private message MSN Messenger
Bojo



Joined: 22 Oct 2004
Posts: 23
Location: Denmark

PostPosted: Wed Nov 03, 2004 3:04 pm    Post subject: Reply with quote

qbert wrote:
Using only the win32 API ?

Can you paste the code and the linking / compiling options ? Maybe its something to do with the linker .


Well, I simply took the winsamp.d example from dmd's sample folder and changed one of the buttons into a radiobutton.

Code:

//   btnDontClick = CreateWindowA("BUTTON", "DON'T CLICK!", WS_CHILD | WS_VISIBLE,
//      110, 0, 100, 25, hWnd, cast(HMENU) IDC_BTNDONTCLICK, hInst, null);

   btnDontClick = CreateWindowA("BUTTON", "DON'T CLICK!", WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON | BS_LEFT | BS_VCENTER, 110, 0, 100, 25, hWnd, cast(HMENU) IDC_BTNDONTCLICK, hInst, null);


qbert wrote:
Also how do you use a manifest with DFL ?


I just saved it as a file "Winsamp.exe.manifest"

Regards

Bo
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DFL All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group