Creating Common Controls

This section contains simple examples of how to create common controls.

The examples are based on:

The common controls are:

These are sometimes referred to as common controls because they are defined within comctl32.dll.

Applications built with any common control must link with comctl32.lib (use libcomctl32.a or simply -lcomctl32 with DevC++(MinGW)).

Create Animation Control
image: create animation, click for larger image

This example demonstrates a method for creating and displaying an animation common control. Like all standard and common controls, animation controls are windows. They can display simple avi files but not those with sound; these will cause an error.

Note that the SimpleWnd example has been used with some minor modifications and the WndProc function now handles the WM_CREATE message in addition to the WM_DESTROY. This example is a 'do nothing' example serving only to demonstrate the creation and display of controls of the ANIMATE_CLASS class. Animation controls are created with the CreateWindowEx API function by varying the window styles. The API function CreateWindow can also be used.

Create Comboboxex Controls
image: create comboboxex, click for larger image

This example demonstrates a method for creating and displaying a Comboboxex common control. Like all other controls, Comboboxex controls are windows.

Note that the SimpleWnd example has been used with some minor modifications and the WndProc function now handles the WM_CREATE message in addition to the WM_DESTROY. This example is a 'do nothing' example serving only to demonstrate the creation and display of controls of the WC_COMBOBOXEX class. Comboboxex controls are created with the CreateWindowEx API function by varying the window styles. The API function CreateWindow can also be used.

Create Date and Time Picker Controls
image: create date & time picker, click for larger image

This example demonstrates a method for creating and displaying a date and time picker common control. Like all standard and common controls, date and time picker controls are windows.

Note that the SimpleWnd example has been used with some minor modifications and the WndProc function now handles the WM_CREATE message in addition to the WM_DESTROY. This example is a 'do nothing' example serving only to demonstrate the creation and display of controls of the DATETIMEPICK_CLASS class. Date and Time Picker controls are created with the CreateWindowEx API function by varying the window styles. The API function CreateWindow can also be used.

Create Header Controls
image: create header, click for larger image

This example demonstrates a method for creating and displaying a header common control. Like all standard and common controls, header controls are windows.

Note that the SimpleWnd example has been used with some minor modifications and the WndProc function now handles the WM_CREATE and WM_SIZE messages in addition to the WM_DESTROY. This example is a 'do nothing' example serving only to demonstrate the creation and display of controls of the WC_HEADER class. Header controls are created with the CreateWindowEx API function by varying the window styles. The API function CreateWindow can also be used.

Create IP Address Controls
image: create ip address, click for larger image

This example demonstrates a method for creating and displaying an IP address common control. Like all standard and common controls, IP address controls are windows.

Note that the SimpleWnd example has been used with some minor modifications and the WndProc function now handles the WM_CREATE message in addition to the WM_DESTROY. This example is a 'do nothing' example serving only to demonstrate the creation and display of controls of the WC_IPADDRESS class. IP Address controls are created with the CreateWindowEx API function by varying the window styles. The API function CreateWindow can also be used.

Create Listview Controls
image: create listview, click for larger image

This example demonstrates a method for creating and displaying a listview common control. Like all standard and common controls, listview controls are windows.

Note that the SimpleWnd example has been used with some minor modifications and the WndProc function now handles the WM_CREATE and WM_SIZE messages in addition to the WM_DESTROY. This example is a 'do nothing' example serving only to demonstrate the creation and display of controls of the WC_LISTVIEW class. Listview controls are created with the CreateWindowEx API function by varying the window styles. The API function CreateWindow can also be used.

Create Month Calendar Controls
image: create month calendar, click for larger image

This example demonstrates a method for creating and displaying a month calendar common control. Like all standard and common controls, month calendar controls are windows.

Note that the SimpleWnd example has been used with some minor modifications and the WndProc function now handles the WM_CREATE message in addition to the WM_DESTROY. This example is a 'do nothing' example serving only to demonstrate the creation and display of controls of the MONTHCAL_CLASS class. Month Calendar controls are created with the CreateWindowEx API function by varying the window styles. The API function CreateWindow can also be used.

Create Progress Bar Controls
image: create progreesbar, click for larger image

This example demonstrates a method for creating and displaying a progress bar common control. Like all standard and common controls, progress bar controls are windows.

Note that the SimpleWnd example has been used with some minor modifications and the WndProc function now handles the WM_CREATE and WM_SIZE messages in addition to the WM_DESTROY. This example is a 'do nothing' example serving only to demonstrate the creation and display of controls of the PROGRESS_CLASS class. Progress bar controls are created with the CreateWindowEx API function by varying the window styles. The API function CreateWindow can also be used.

Create Rebar Controls
image: create rebar, click for larger image

This example demonstrates a method for creating and displaying a rebar common control. Like all standard and common controls, rebar controls are windows.

Note that the SimpleWnd example has been used with some minor modifications and the WndProc function now handles the WM_CREATE and WM_SIZE messages in addition to the WM_DESTROY. This example is a 'do nothing' example serving only to demonstrate the creation and display of controls of the REBARCLASSNAME class. Rebar controls are created with the CreateWindowEx API function by varying the window styles. The API function CreateWindow can also be used.

Create Statusbar Controls
image: create statusbar, click for larger image

This example demonstrates a method for creating and displaying a statusbar common control. Like all standard and common controls, statusbar controls are windows.

Note that the SimpleWnd example has been used with some minor modifications and the WndProc function now handles the WM_CREATE and WM_SIZE messages in addition to the WM_DESTROY. This example is a 'do nothing' example serving only to demonstrate the creation and display of controls of the STATUSCLASSNAME class. Statusbar controls are created with the CreateWindowEx API function by varying the window styles. The API function CreateWindow can also be used.

Create Tab Controls
image: create tab, click for larger image

This example demonstrates a method for creating and displaying a tab common control. Like all standard and common controls, tab controls are windows.

Note that the SimpleWnd example has been used with some minor modifications and the WndProc function now handles the WM_CREATE and WM_SIZE messages in addition to the WM_DESTROY. This example is a 'do nothing' example serving only to demonstrate the creation and display of controls of the WC_TABCONTROL class. Tab controls are created with the CreateWindowEx API function by varying the window styles. The API function CreateWindow can also be used.

Create Toolbar Controls
image: create toolbar, click for larger image

This example demonstrates a method for creating and displaying a toolbar common control. Like all standard and common controls, toolbar controls are windows.

Note that the SimpleWnd example has been used with some minor modifications and the WndProc function now handles the WM_CREATE and WM_SIZE messages in addition to the WM_DESTROY. This example is a 'do nothing' example serving only to demonstrate the creation and display of controls of the TOOLBARCLASSNAME class. Toolbar controls are created with the CreateWindowEx API function by varying the window styles. The API function CreateWindow can also be used.

Create Tooltip Controls
image: create tooltips, click for larger image

This example demonstrates a method for creating and displaying a tooltip common control. Like all standard and common controls, tooltip controls are windows.

Note that the SimpleWnd example has been used with some minor modifications and the WndProc function now handles the WM_CREATE message in addition to the WM_DESTROY. This example is a 'do nothing' example serving only to demonstrate the creation and display of controls of the TOOLTIPS_CLASS class. Tooltip controls are created with the CreateWindowEx API function by varying the window styles. The API function CreateWindow can also be used.

Create Trackbar Controls
image: create trackbar, click for larger image

This example demonstrates a method for creating and displaying a trackbar common control. Like all standard and common controls, trackbar controls are windows.

Note that the SimpleWnd example has been used with some minor modifications and the WndProc function now handles the WM_CREATE and WM_SIZE messages in addition to the WM_DESTROY. This example is a 'do nothing' example serving only to demonstrate the creation and display of controls of the TRACKBAR_CLASS class. Trackbar controls are created with the CreateWindowEx API function by varying the window styles. The API function CreateWindow can also be used.

Create Treeview Controls
image: create treeview, click for larger image

This example demonstrates a method for creating and displaying a treeview common control. Like all standard and common controls, treeview controls are windows.

Note that the SimpleWnd example has been used with some minor modifications and the WndProc function now handles the WM_CREATE and WM_SIZE messages in addition to the WM_DESTROY. This example is a 'do nothing' example serving only to demonstrate the creation and display of controls of the WC_TREEVIEW class. Treeview controls are created with the CreateWindowEx API function by varying the window styles. The API function CreateWindow can also be used.

Create Updown Controls
image: create up-down, click for larger image

This example demonstrates a method for creating and displaying an updown common control. Like all standard and common controls, updown controls are windows.

Note that the SimpleWnd example has been used with some minor modifications and the WndProc function now handles the WM_CREATE message in addition to the WM_DESTROY. This example is a 'do nothing' example serving only to demonstrate the creation and display of controls of the UPDOWN_CLASS class. Updown controls are created with the CreateWindowEx API function by varying the window styles. The API function CreateWindow can also be used.