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)).
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.