Header file of C ++ Builder and ActiveX

xiaoxiao2021-03-06  72

source:

http://www.temporaldoorway.com/programming/cbuilder/activex/Headerfiles.htm

Note: First excerpt, write to Chinese

The Header Files from an Imported Control

Introduction There are several header files generated by the act of importing an ActiveX control into C Builder. This article explains what they are, what they contain, and what they are used for. This material is specific to BCB4 Patch 1 and above. The Files The Following Files Are Generated by Importing A Control

OCX.h and .cpp - These are the VCL representation of the control itself The class implemented by these files can be instantiated with the normal VCL "new" TLB.h and .cpp -.. These are the classes, templates, and function implementations / constant declaration / definitions for the classes specified in the control type library. These are not able to be instantiated using the VCL "new", as discussed later in this document. The OCX File This is a fairly simple file for those used to reading VCL header files The control class definition is present This definition contains VCL representations of the control properties, methods, and events VCL style classes to support the various subobjects are not generated -... unfortunately, this is as . deep as VCL support for the control goes If you need to use subobjects of this class, you will generally have to use the classes declared in the TLB files in most cases, this will be similar to working with VCL objects -. until you needto create one from scratch, as discussed later. The TLB File This is a much more complex file. For a reasonably sized control, it can be nearly 10,000 lines. The size of these files for large applications like Excel is truly legendary. The following are the contents of this fileclass GUID, DIID etc constants; here declared as extern and initialized in the TLB .cpp; NOTE: If you use the control in a package, you must change each extern const GUID declaration in the .h to extern __declspec (Package) Const Guid, or else the declarations Will NOT BE Visible in Using Applications or Packages. For each class in the tlb ...

转载请注明原文地址:https://www.9cbs.com/read-92158.html

New Post(0)