Exported methods:
PBX_CreateVisualObject method
Description
Creates a new instance of a visual PowerBuilder extension
object.
Syntax
|
1 |
PBX_CreateVisualObject(IPB_Session* <span>pbsession</span>, pbobject <span>pbobj</span>, LPCTSTR <span>xtraName</span>, IPBX_NonVisualObject   **<span>obj</span>)<span>[Unmapped Entity: middot ]</span> |
|
Argument |
Description |
|---|---|
|
pbsession |
This IPB session |
|
pbobj |
The name of a pbobject corresponding |
|
xtraname |
The name of the PowerBuilder native class |
|
obj |
The PowerBuilder extension object to |
Return Values
PBXRESULT. PBX_OK for success.
Examples
In this example the extension contains several classes.
The object created depends on the string value of the class name
passed in.
|
1 |
PBXEXPORT PBXRESULT PBXCALL PBX_CreateVisualObject<br>(<br>   IPB_Session*         pbsession, <br>   pbobject            pbobj,<br>   LPCTSTR               className,      <br>   IPBX_VisualObject   **obj<br>)<br>{<br>   PBXRESULT result = PBX_OK;<br> <br>   string cn(className);<br>   if (cn.compare("visualext") == 0)<br>   {<br>      *obj = new CVisualExt(pbsession, pbobj);<br>   }<br>   else<br>   {<br>      *obj = NULL;<br>      result = PBX_FAIL;<br>   }<br>   return PBX_OK;<br>}; |
Usage
You must implement this method in every PowerBuilder extension
module that contains visual classes. When you use a visual extension
in a PowerBuilder application, the PBVM calls this method.
See Also
Document get from Powerbuilder help
Thank you for watching.
Subscribe
Login
0 Comments
Oldest