Step 2: Define the classes and functions in the extension

PowerBuilder Native Interface

Step 2: Define the classes and functions in the extension

The description for a visual class follows the same rules as for a nonvisual class, but it must inherit from the UserObject system class:

PBXEXPORT LPCTSTR PBXCALL PBX_GetDescription()
{
   static const TCHAR desc[] = {
      "class myvisualext from userobject\n"
      "subroutine func_1(int arg1, int arg2)\n"
      "subroutine func_2(string arga)\n"
      "end class\n"
   };

return desc;
}

There are no events in the preceding example, but a typical visual extension makes use of events such as mouse clicks. There are two ways to declare and handle events. See "Event processing in visual extensions".