Broad Network


Uses of the Different Types of Buttons

Windows Predefined Controls – Part 9

Volume - Windows User Interface

Forward: In this part of the series, we look at Uses of the Different Types of Buttons.

By: Chrysanthus Date Published: 29 Aug 2012

Introduction

This is part 9 of my series, Windows Predefined Controls. In order to understand this tutorial, you most have read all the previous tutorials of the series. In this part of the series, we look at Uses of the Different Types of Buttons.

Note: If you cannot see the code or if you think anything is missing (broken link, image absent), just contact me at forchatrans@yahoo.com. That is, contact me for the slightest problem you have about what you are reading.

Selecting a Button
A button is selected like any other control, by pressing the Tab key on the keyboard repeatedly until the button receives focus or by clicking the button. In some cases when a button is clicked, it is selected and at the same time an action takes place. When any control has focus, whatever you do on the keyboard affects that control.

Push Buttons
A push button needs the BS_PUSHBUTTON style. For a default push button, use the BS_DEFPUSHBUTTON style instead. If you want a split button (windows vista) as your default button, use the BS_DEFSPLITBUTTON button instead. The push state of a button can be either pushed or not pushed. When a push button is pushed, the button is drawn as a sunken button. When it is not pushed, it is drawn as a raised button.

Check Boxes
The state of a check box can be checked (On), cleared (Off), or (for three-state check box) indeterminate. You can have more than one check box in a window. If you have more than one check box in a group or in a window, you can have more than one of the check boxes checked (ticked). Under that condition we say the check boxes are NOT mutually exclusive. Check boxes are used for non-mutually exclusive items.

Radio Buttons
When a user has a number of items to choose from and if he can choose only one of the items, then those items are said to be mutually exclusive. In this case, you have to use radio buttons. Among radio buttons, only one can have the dot. If you click one radio button, it receives the dot; any other radio button that had the dot loses it.

Let us end here for this part of the series. We continue in the next part.

Chrys

Related Courses

C++ Course
Relational Database and Sybase
Windows User Interface
Computer Programmer – A Jack of all Trade – Poem
NEXT

Comments

Become the Writer's Fan
Send the Writer a Message