Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNo next file
Objective Edit User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

9.4 Further Extensions: Module State Issues


We've only exported two properties. We have not exported any of the Objective Edit control's language syntax support. These extensions are left to the developer.

You can get a good idea of how to go about extending this by examining the code property retrieval method we've provided, get_Text():

Of course, this is rudimentary, but it does illustrate two important points:

The Objective Edit libraries require initialization before they can be used. During this process, resources are allocated and made available to the module that uses them. It is important that any such resources be available only to the module and not to the application. If such resources were to live in the application, several conflicts could arise.

Consider a case where two ATL-based DLLs link in Objective Edit. Assume that the first performs control registration. The second is then loaded. Both work fine. Then let us assume that the first control gets terminated, while the rest of the application continues to run. Like any good control, the first control cleans up after itself, un-registering the class. When the second control tries to create a control of this class, it fails.

Objective Edit is aware of these issues and can be used freely inside different ATL modules. Remember to call AFX_MANAGE_STATE(AfxGetStaticModuleState()) when exporting functions that will be called from other modules. Non-module state-aware MFC controls will fail under these situations.


If you need help implementing the ATL functionality, contact Rogue Wave Professional Services.



Previous fileTop of DocumentContentsNo linkNo next file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and Stingray, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.