For further study

Back Home Up

As you can see, ObjectWindows packs a lot of functionality into its classes. With this tutorial, you've really only begun to scratch the surface of the things you can do with ObjectWindows. Here are a number of suggestions for things you can do to expand the tutorial application even more:

You can add other Doc/View classes to the application. To do this, compile the document class, its view classes, and a list of document templates into an object file. Then add that object file to the application when you link it. Then, when you open a new document, you'll see the new document types appear in the File Open dialog box. Note that this works even though the application knows nothing about the
Doc/View classes you added.
A good source for Doc/View classes is the DOCVIEWX application in the EXAMPLES\OWL\OWLAPI\DOCVIEW directory. You can also try writing your own document and view classes.
Try adding new GDI objects to the application. For example, you might try adding the ability to import bitmaps with the TBitmap class. Or add textured brushes with the TBrush class.
Add different drawing operations, such as lines, boxes, circles, and so on. You can add menu choices for each of these operations. You can also set up exclusive state button gadgets on the control bar to let the user change the current operation just by pressing a button gadget.
Try converting the control bar into a floating tool box by changing the TControlBar into a TToolBox in a TFloatingFrame. You can see an example of how this is done in the PAINT example in the EXAMPLES\OWL\OWLAPPS\PAINT directory.
Try adding the ability to perform multiple undo operations. You can use container classes to hold all the lines that have been changed.

You can also go through the examples in the other ObjectWindows example directories. Many of these have features in them you may want to try to add to the Drawing Pad application.

 


Copyright © 1998-2001 Yura Bidus. All rights reserved.