Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (AemStones, AndrewAMD, gamers, Kingware), 1,679 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
LucasJoshua, Baklazhan, Hanky27, firatv, wandaluciaia
19054 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
(Win32) XP style buttons #172624
12/13/07 05:28
12/13/07 05:28
Joined: Mar 2007
Posts: 677
0x00000USA
M
MrCode Offline OP
User
MrCode  Offline OP
User
M

Joined: Mar 2007
Posts: 677
0x00000USA
I've been doing some experimenting in Windows buttons, and I've always wondered: how do you create a Windows XP style button?

All the buttons I create are in the Windows 95/98 style:



But I want them like this, in the Windows XP style:



I know it's a little trivial, but is there any way to change the style?

I'm using this code to create the button:

Code:

HWND hbutton= CreateWindowEx(0,"BUTTON","OK",
BS_SOLID | BS_USERBUTTON | WS_VISIBLE | WS_CHILD,
wb->posx,wb->posy,wb->sizex,wb->sizey,
hwnd,NULL,(HINSTANCE) GetWindowLong(hwnd,GWL_HINSTANCE),NULL);



EDIT: For some reason, when I run the program in Debug mode, the button is in the Windows XP style. But I would still like to know how to do this without running in debug mode.

Last edited by MrCode; 12/13/07 05:31.

Code:
void main()
{
    cout << "I am MrCode,";
    cout << "hear me roar!";
    system("PAUSE");
}
Re: (Win32) XP style buttons [Re: MrCode] #172625
12/19/07 06:05
12/19/07 06:05
Joined: Mar 2007
Posts: 677
0x00000USA
M
MrCode Offline OP
User
MrCode  Offline OP
User
M

Joined: Mar 2007
Posts: 677
0x00000USA
Anyone?

Re: (Win32) XP style buttons [Re: MrCode] #172626
12/19/07 14:48
12/19/07 14:48
Joined: Mar 2007
Posts: 197
Y
yorisimo Offline
Member
yorisimo  Offline
Member
Y

Joined: Mar 2007
Posts: 197
Check out my post: XP look and feel for common controls

Note, using the manifest method you will only see the xp style buttons after publishing. You can't see the results while running from SED.

Hope that helps.


Joris Lambrecht
My Contributions: Relative Rotation, Window Sizing

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1