| Home | Previous Lesson: What is a C++ Class User Object? Next Lesson: Why Use a C++ User Object? |
As a non-visual user object, a C++ user object can't be dropped onto a window like other PowerBuilder controls such as CommandButton, CheckBoxes, RadioButtons, etc. Instead, you create an instance using the CREATE statement and, when you have finished using it, destroy it using the DESTROY statement.
The structure of a C++ user object is different from the structure of other PowerBuilder objects. You declare the function names, arguments and return values in PowerBuilder, and code the actual logic in C++. This is different from, say, a standard user object. In a standard user object, all the code and logic is written using PowerScript and it resides within your PowerBuilder application. In a C++ user object, the functional logic code is written in C++ and resides outside the PowerBuilder application. If you install your PowerBuilder application without the DLLs it references, you'll get an error.
That said, though, there are also several similarities between the structure of a C++ user object and other PowerBuilder objects. You can declare instance variables, user functions and user events for your C++ user object just as you do for any other PowerBuilder object.
| Home | Previous Lesson: What is a C++ Class User Object? Next Lesson: Why Use a C++ User Object? |