Click here to Skip to main content
Click here to Skip to main content

CWinXPButtonST

By , 6 Sep 2001
 

Sample Image - CWinXPButtonST.jpg

Abstract

CWinXPButtonST is a CButtonST derived class that emulates the look'n'feel of the buttons (or menu items) found in Office XP and, maybe, in Windows XP. Button borders can have square or rounded corners.
This is just an example on how CButtonST can be used to create other button styles not supplied by default.

Functions

CWinXPButtonST has only one function.

SetRounded

This function enables or disables the rounded border for the button.

// Parameters:
//        [IN]    bRounded
//                If TRUE the button will have a rounded border.
//        [IN]    bRepaint
//                If TRUE the button will be repainted.
//
// Return value:
//        BTNST_OK
//               Function executed successfully.
//
DWORD SetRounded(BOOL bRounded, BOOL bRepaint = TRUE)

Remarks

CButtonST architecture makes possible to produce a whole range of buttons not available by default. If someone implements new button styles I will happy to include his code in the next CButtonST demo application.

Disclaimer

THE SOFTWARE AND THE ACCOMPANYING FILES ARE DISTRIBUTED "AS IS" AND WITHOUT ANY WARRANTIES WHETHER EXPRESSED OR IMPLIED. NO REPONSIBILITIES FOR POSSIBLE DAMAGES OR EVEN FUNCTIONALITY CAN BE TAKEN. THE USER MUST ASSUME THE ENTIRE RISK OF USING THIS SOFTWARE.

Terms of use

THIS SOFTWARE IS FREE FOR PERSONAL USE OR FREEWARE APPLICATIONS. IF YOU USE THIS SOFTWARE IN COMMERCIAL OR SHAREWARE APPLICATIONS THEN DONATIONS GRATEFULLY ACCEPTED

Davide Calabro'
P.O. Box 65
21019 Somma Lombardo (VA)
Italy

SoftechSoftware homepage
SoftechSoftware Email

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

About the Author

Davide Calabro
Web Developer
Italy Italy
Member
No Biography provided

Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page   
GeneralNice one PinmemberJaiju jacob9 Sep '05 - 0:21 
Searched lot for it. Cool | :cool:
QuestionBorder when mouse isn't over ? PinmemberNiFF13 Nov '04 - 10:40 
Hello,
 
You made a great job with these controls, congratulations. I read the source code, but unfortunately I didn't find how to draw the border when the mouse pointer is outside the CWinXPButtonST button. How can I do that? I tried with DrawBorder(TRUE, TRUE), but it doesn't change. Also, in the sample app, the CWinXPButtonST hasn't any border when the pointer is away.
 
Thanks for your help and for your work.

 
Nicolas.
Generalvery good PinmemberColderRain13 Sep '02 - 17:28 
It's help meHmmm | :|
 
my QQ:17812155
 
validate: VC gens
 
E-mail: ColderRain@msn.com
GeneralGreat Job, a couple of issues PinmemberGreg Berman20 Sep '01 - 11:19 
First off great class. Is there a new CButtonST v3.3? I couldn't get it off your site.
 
1) When using the rounded setting if you set a background color it fills as a rectangle.
 
2) Using the flag BTNST_COLOR_FG_FOCUS to set color doesn't seem to do anything.
 
Again great job and thanks for contributing.
Poke tongue | ;-P Poke tongue | ;-P
GeneralRe: Great Job, a couple of issues PinmemberDavide Calabro4 Nov '01 - 22:40 
General1 thing missing PinmemberErik Thompson7 Sep '01 - 7:32 
The drop shadow for the icons when mousing over the buttons, this is part of the look n feel. Smile | :)
 
Cheers,
-Erik
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
My thoughts are my own and reflect on no other.
GeneralRe: 1 thing missing PinmemberDavide Calabro8 Sep '01 - 1:08 
GeneralLooks nice. PinmemberRay Hayes7 Sep '01 - 6:00 
A link to the parent class would be useful though!
 
Regards,
Ray
GeneralRe: Looks nice. PinmemberRichard Green7 Sep '01 - 6:59 
GeneralRe: Looks nice. PinmemberDavide Calabro8 Sep '01 - 1:09 
GeneralRe: Looks nice. PinmemberRay Hayes8 Sep '01 - 8:19 
GeneralRe: Looks nice. PinmemberDavide Calabro9 Sep '01 - 21:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Permalink | Advertise | Privacy | Mobile
Web02 | 2.6.130516.1 | Last Updated 7 Sep 2001
Article Copyright 2001 by Davide Calabro
Everything else Copyright © CodeProject, 1999-2013
Terms of Use
Layout: fixed | fluid