Windows Combo Box

Windows Predefined Controls – Part 21
Volume – Windows User Interface

Introduction
This is part 21 of my series, Windows Predefined Controls. In order to understand this tutorial, you must have read all the previous tutorials of the series. In this part of the series, we look at Windows Combo Box.

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.

What is a Combo Box?
A combo box is a control that consist of a list box and either an edit control or a static control above it. With the combo box only one item can be selected; that is, the user cannot select more than one item in the list box at the same time. When the item is selected it appears in the edit control or the static control, depending on which one the combo box is using. All controls are child windows.

The edit control or the static control above the list box is called the Selection Field. The list box of the combo box is sometimes simply called the list. The list presents the options that a user can select, and the selection field displays the option selected. The option selected is called the current selection.

If the selection field is an edit control, the user can type what he wants directly into the edit control. What he types into the edit control does not necessarily have to be found in the list.

In this series, we deal only with items in the list that are strings.

Zero-Based Indexing
The items in the list box are numbered counting from zero at the first item. Each of these numbers is called an index

Types of Combo Boxes
There are three types of combo boxes: Simple, Drop Down and Drop Down List.

The Simple Combo Box
This type of combo box has a list box and an edit control above it. You see one or more elements always in the list. When the user selects an item in the list, it is highlighted, and then you also see the selected item in the edit control. The user can also type something into the edit control that is not in the list. This type of combo box uses the CBS_SIMPLE combo box style.

Of course the list of this type of combo box can have a scroll bar. At all times you see the selection field and the list, for this combo box type.

The Drop Down Combo Box
With this type of combo box, you see only the selection field at all times. The selection field has a drop down arrow button on its right. When the user clicks the drop down arrow, he sees the list dropped down (displayed below the selection field). Then the user can select an item in the list. When the item is selected, the drop down list closes up and the selected item appears in the selection field. The selection field here is an edit control. The drop down list can have a scroll bar.

The user can also type something into the edit control that is not in the list, without dropping down the list. This type of combo box uses the CBS_DROPDOWN combo box style.

The Drop Down List Combo Box
This type of combo box is similar to the drop down combo box, described above, except that its selection field is a static control and not an edit control. This type of combo box uses the CBS_DROPDOWNLIST combo box style.

Directory List
A combo box can have lists of all sorts. A list of particular interest is the listing of a directory. We shall see more about this later.

Data Associated with List Items
An application can have associated data with the list items in a combo box. The datum associated with a list item is of type, DWORD, which means, Double Word (8 bits form a byte, 16 bits form a word and 32 bits form a DWORD). We shall see more about this later.

The Extended User Interface
Drop-down combo boxes and drop-down list combo boxes support an alternative keyboard interface called the Extended User Interface. By default and without the extended user interface, the F4 key opens or closes the list, and the Down Arrow Key changes the current selection. In a combo box with the extended user interface, however, the F4 key is disabled and pressing the Down Arrow key opens the drop-down list. In addition, the mouse wheel, which normally scrolls through the items in the list, does not have any function when the extended UI is set. More on this later!

Cue Banners
When an application starts and before any item in the list is selected, you can have text such as “Select Item from Below” displayed in the edit control of a combo box. This is an example of a cue banner. This gives a hint to the user as to what he should do with the combo box. As soon as the user selects an item in the list or as soon as he starts typing into the edit control, the cue banner disappears. That is the behavior of the cue banner. We shall see more on this later.

Creating a Combo Box
You can create a combo box using the CreateWindowEx function. The class is provided by the operating system and it is called, COMBOBOX. The style consists of WS_CHILD and CBS_SIMPLE or CBS_DROPDOWN or CBS_DROPDOWNLIST as a minimum. The rest of the arguments for the CreateWindowEx function are like those in the creation of other controls. I have dedicated a whole tutorial on the creation of combo boxes. Before we arrive at that tutorial, we shall first look at combo box styles, combo box notifications and combo box messages, each as a tutorial.

That is it for this part of the series. We stop here and continue in the next part.

Chrys

To arrive at any of the parts of this series, just type the corresponding title below in the Search Box of this page and click Search (use menu if available):

List Box Functions
Windows Combo Box
Combo Box Styles
Combo Box Notifications
Combo Box Messages
Creating Combo Boxes
Combo Box functions
 

Written by Chrys

The Complete Boxing Workout By Boxing

Boxing is increasing in popularity nowadays. But maybe this might not be entirely because of professional boxers. Big name boxers are now on the decline. And big prize fights don’t reach the purses of ten years ago.

 

But on the whole, boxing as a physical work out and exercise is going down to the grassroots with boxing gyms springing up all over the place. From my personal experience, this is because boxing is more interesting than the old standard aerobic exercises, and offers more variety than velo-spinning or the treadmill.

Boxing training gyms have gone a long way from the dark seedy and all male enclave. It has gone into the mainstream, where the largest enrollment in some places are for young women who want to develop their muscles and learn how to punch, but not necessarily in that order.

Boxing offers a lot in terms of an all-around workout. It develops stamina, with the requisite roadwork, and the jumping rope. It also helps make for more flexibility. And unlike lifting free weights, boxing develops the major muscle groups without putting emphasis on any single one. As a cardio workout, sparring, punching the speed bag, and jumping rope is understated. Jumping rope burns more calories than cycling or running.

A stint at the speed ball helps a lot with eye-hand coordination. It should be obvious but unless you think about it hard, you won’t get it. That’s because it looks almost too easy not to hit the ball. It does bounce back, doesn’t it?

One other advantage a boxing regimen has over other gym routines is the intensity of the coach. The trainer looks out for the boxer, and gives instructions which require a well-rounded training, from the speed and coordination, to the power punch on the heavy punching bag; to the legwork where you are asked to dance from side to side and gliding forward and back.

As a form of exercise, boxing does have a lot to offer.

By: Boxing Products Supplier

For more information please visit our website http://www.boxing-products.com

 

Boxing Products Supplier is the manufacturer of Boxing Gloves, Rash Guard, Boxing Equipment, MMA Shorts, MMA Gloves, Hand Wraps, Boxing Shorts, Punching Bag, Fitness Equipments, Safety Vests. For more information please visit our website http://www.boxing-products.com

Boxing Products Supplier is the manufacturer of Boxing Gloves, Rash Guard, Boxing Equipment, MMA Shorts, MMA Gloves, Hand Wraps, Boxing Shorts, Punching Bag, Fitness Equipments, Safety Vests. For more information please visit our website http://www.boxing-products.com

7 Secrets To Getting High Quality Used CardBoard Boxes FREE!!

How To Get Quality Used Cardboard  Boxes For Your Storage Needs FREE!

 

So you’re in the business of organizing and storing your valuables, and of course,  you need used cardboard boxes. This article is going to give you some tips on getting used cardboard boxes for free and where to go if you have to buy them.

 

Years ago, it was a lot easier to get used cardboard boxes. Your local grocery store was only happy to get rid of their empty used cardboard boxes. Anyone could just call up the store manager and request them. Now, that’s changed in many places. Many companies are going “green”, which means they are sending their cardboard boxes to recyclers in China.

At first thought, this may seem like a really great idea. After all, isn’t recycling all about saving the environment and saving the planet? Sure it is, but let’s take it a step beyond recycling. What good is recycling, when there is still waste of resources involved in the recycling process? The point is, that many used cardboard boxes that are being sent to the recyclers are perfect for you or someone else needing to use them for storage, shipping or moving.

 

So, we’re in a dilemma. Many cities are sending their cardboard boxes to recyclers, instead of re-using them. So how can you get them for free?

 

Try Home Depot/Sears/Best Buy/etc. – Most likely  you’ll discover that they send them to recyclers, but some areas do make exceptions.  What you do is call up the store and tell them that you are looking for refrigerator boxes and that that you were told that there is a local delivery company that does. What you want is to get the name of the delivery company and their phone number. Make sure that you get someone like a manager or a full-time employee who will give the contact information for local delivery companies, not national franchises like GE. The delivery contractors usually are only happy to give you their boxes.
Visit your small and local delivery service companies. These are “mom and pop” businesses.
Family owned appliance stores – These are usually the best places to get boxes, especially used cardboard boxes that are large enough to store enough of  your items. Refrigerator boxes are the largest, but not all boxes have to be the same size, and you may not want all boxes to be that big. There are dryer boxes, washer boxes, and even smaller ones available.
Bicycle Shops – again, the locally owned bicycle shops tend to be the best.
Building contractors – they would definitely know where to direct you to free used cardboard boxes.
Cabinet dealers – once again, great source of FREE cardboard boxes.
Furniture stores – they tend to have larger boxes available.

 

Hopefully, this list will help you on your search for free used cardboard boxes, but as stated in the first half of this article, it can be difficult in some cities and regions to get them for free. If you have exhausted all your options, have no worries. You don’t have to purchase the cardboard boxes brand new. Why buy new,  when you’re only going to be using them once, right? That’s why we’ve created www.UsedCardBoardBoxes.com. What we do is we sell high quality, low cost moving kits for anyone who is in the market for used cardboard boxes. Best of all, a portion of the proceeds goes to charity, so that we can save more trees.

The cheapest, easiest, most eco-friendly way to get boxes for packing, moving and shipping! Visit http://www.UsedCardBoardBoxes.com today!

More Boxing Articles