The following table contains a list of some Open Class Library tasks and cross-references them to the samples and examples used in the information that show you how to complete the task. You can find all the samples in the samples/ioc directory:
| Tasks | Sample or Example | Class Usage |
|---|---|---|
| Create a basic frame window with a line of text centered in the middle of the window | Hello World Version 1 | IFrameWindow
IStaticText |
| Align a text string within a static text control | Hello World Version 2 | IStaticText |
| Display information about an application in an information area below the client window | Hello World Version 2 | IFrameExtension IInfoArea |
| Title your application using an .rc file | Hello World Version 2 | IFrameWindow |
| Display application status in a status area | Hello World Version 3 | IFrameExtension IFrameWindow IStaticText |
| Process menu bar items | Hello World Version 3 | ICommandHandler IMenuBar |
| Let the user perform functions using accelerator keys | Hello World Version 4 | IFrameWindow IMenuBar |
| Request text information from users using a modal dialog | Hello World Version 4 | IFrameWindow |
| Display multiple controls in a client area using a canvas
control |
Hello World Version 5 | IMultiCellCanvas ISplitCanvas ISetCanvas ICanvas |
| Display information to a user in a list | Hello World Version 5 | IListBox |
| Perform an action when a user selects an item from a list | Hello World Version 5 | IListBox IListBox::Cursor ISelectHandler |
| Display and repaint an IDrawingCanvas | Hello World Version 5 | IDrawingCanvas IResizeHandler |
| Add help to an application (requires use of IPFX/X on AIX and Windows) | Hello World Version 5 | IHelpHandler IHelpWindow |
| Perform an action when an user selects an item from a combo box in a dialog window | Hello World Version 6 | IComboBox ICommandHandler IFrameWindow |
| Show multiple components on a status line | Hello World Version 6 | IFrameExtension ISplitCanvas |
| Display a digital clock (long and short form) | Hello World Version 6 | IString ITime ITimer |
| Display the date (long and short form) | Hello World Version 6 | IDate IString |
| Let the user dynamically change the font of an application using a font dialog | Hello World Version 6 | IFontDialog ISelectHandler |
| Customize an application using a notebook control | Hello World Version 6 | ICommandHandler IFrameWindow INotebook |
| Customize an application using a pop-up menu | Hello World Version 6 | IMenuHandler IPopUpMenu |
| Record a user's settings of an application | Hello World Version 6 |
IProfile |
| Customize a control |
Add Styles | IBitFlag IWindow |
| Create a message box |
Create a Message Box | IMessageBox |
| Save data from a user-edited control to a file |
Create an MLE | IMultiLineEdit |
| Display a list of choices to a user | Create a List Box | IListBox ISelectHandler |
| Displaying a discrete set of choices to a user | Create a List Box | INumericSpinButton ITextSpinButton |
| Arrange child controls in rows or columns |
Create a Set Canvas | ISetCanvas |
| Arrange child controls in a grid of rows and columns |
Create a Multicell Canvas | IMultiCellCanvas |
| Provide a scrollable view area |
Create a View Port | IViewPort |
| Let the user make a file selection using a file dialog
control |
Specify File Dialog Information | IFileDialog IFileDialog::Settings |
| Create pop-up menus |
Create a Pop-Up Menu | IMenuHandler IPopUpMenu |
| Create and populate a container control |
Create and Use Containers | ICnrAllocator IContainerControl IContainerObject |
| Enable direct manipulation support | Use Default Direct Manipulation | IDM*
classes |
| Enable direct manipulation for an entry field or an MLE control | Direct Manipulation Sample 1 | IDMHandler IEntryField IMultiLineEdit |
| Enable direct manipulation for intra-process (source and target containers in the same process) container support | Direct
Manipulation Sample 3 |
IContainerColumn IContainerControl IContainerObject IDMHandler |
| Enable direct manipulation for inter-process (source and target containers in the separate processes) container support | Direct Manipulation Sample 4 | IContainerControl IContainerObject IDMCnrItem IDMHandler IDMSourceDiscardEvent IDMSourceOperation IDMTargetDropEvent |
| Process different events (time changes on a clock) | Extend Event Handling | IHandler |
| Add mouse handlers | Handle Mouse Events | IMouseHandler |
| Use clipboards in your applications | Add Clipboard Support | IClipboardHandler IClipboard |
| Provide toolbars that the user can manipulate and customize | Create a Toolbar | IToolBar IFlyOverHelpHandler |
| Add 2D graphics support to your applications |
2DCombo Graphics Sample | IG* classes |
| Create a remote control interface using multimedia classes |
Create Master Devices | IMM* classes |
| Create a stereo interface using multimedia classes |
Create Master Devices | IMM* classes |
| Use a multiline entry field to create a simple editor | Create an MLE | ICommandHandler IFileDialog IFontDialog IFrameWindow IHandler IMenuHandler IMultiLineEdit |
| Use a view port canvas displaying a bitmap as a page in a notebook control | Notebook Sample | IBitmapControl IBitmapHandle INotebook IViewPort |
You can find all the samples in the samples/ioc directory.
![]()
Windows
Events and Event Handlers
![]()
Use the Sample Applications
Hello World Version 1: Creating a Main Window
Hello World Version 2: Adding Resource Files and
Frame Extensions
Hello World Version 3: Adding Command Handlers and
Menu Bars
Hello World Version 4: Adding Dialogs and Push
Buttons
Hello World Version 5: Adding Canvases, a List Box,
Native System Functions, and Help
Hello World Version 6: Adding a Font Dialog, Pop-up
Menus, Notebooks, and Graphics
Write an Event Handler
Task and Samples Cross-Reference Table
