PBORCA_CompileEntryImport – PB Docs 2022
PBORCA_CompileEntryImport Description Imports the source code for a PowerBuilder object into a library and compiles it. Syntax
|
1 2 3 4 5 6 7 8 9 |
INT PBORCA_CompileEntryImport ( HPBORCA hORCASession, LPTSTR lpszLibraryName, LPTSTR lpszEntryName, PBORCA_TYPE otEntryType, lpszComments, LPTSTR lpszEntrySyntax, LONG lEntrySyntaxBuffSize, PBORCA_ERRPROC pCompErrorProc, LPVOID pUserData ); |
Argument Description hORCASession Handle to previously established ORCA session. lpszLibraryName Pointer to a string whose value is the file name of the library into which you want to import the object. lpszEntryName Pointer to a string whose…
EJB Client (obsolete) – PB Docs 2022
EJB Client (obsolete) Enterprise JavaBeans components are obsolete technology, although the components operate as usual in this release. An obsolete feature is no longer eligible for technical support and will no longer be enhanced, although it is still available. For users who still want to use the following PowerBuilder extension classes (obsolete) to connect to…
Handling enumerated types – PB Docs 2022
Handling enumerated types The GetEnumItemValue and GetEnumItemName functions allow you to convert the name of an enumerated value to an integer value, and to convert an integer value to the name of an enumerated value. This example gets the numeric value for the boolean! enumerated value, then uses it to return the string value:
|
1 2 3 4 |
pblong lType = session->GetEnumItemValue("object", boolean" ); // returns 138 LPCTSTR szEnum = session->GetEnumItemName( "object", lType ); // returns "boolean" |
…
Multiline – PB Docs 2022
Multiline property (DataWindow object) Description (RichText presentation style) Whether the column or computed field can contain multiple lines. Multiline is effective only when Width.Autosize is set to No. Applies to Column and Computed Field controls in the RichText presentation style Syntax PowerBuilder dot notation:
|
1 |
dw_control.Object.controlname.Multiline |
Describe and Modify argument:
|
1 |
"controlname.Multiline { = ' value ' }" |
Parameter Description controlname The name…
GetSharedVarID – PB Docs 2022
GetSharedVarID Description Returns the internal ID of a shared variable. Syntax
|
1 |
GettSharedVarID(pbgroup group, LPCTSTR fieldname) |
Argument Description group The group to which the shared variable belongs fieldname The name of the field that contains the shared variable, in lowercase Return value pbfieldID. Returns 0xffff if the ID cannot be found. Examples This code uses GetSharedVarID to obtain the…
Using an event name with return type and arguments – PB Docs 2022
Using an event name with return type and arguments The following description uses the first syntax. The class has two events, onclick and ondoubleclick:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
PBXEXPORT LPCTSTR PBXCALL PBX_GetDescription() { static const TCHAR desc[] = { "class visualext from userobject " "event int onclick() " "event int ondoubleclick() " "subroutine setcolor(int r, int g, int b) " "subroutine settext(string txt) " "end class " }; return desc; } |
Capturing messages and mouse clicks The code in the extension captures the Windows messages that cause the window to be drawn, as well as mouse clicks and double clicks:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
LRESULT CALLBACK CVisualExt::WindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam ) { CVisualExt* ext = (CVisualExt*)::GetWindowLong(hwnd, GWL_USERDATA); switch(uMsg) { case WM_CREATE: return 0; case WM_SIZE: return 0; case WM_COMMAND: return 0; case WM_PAINT: { PAINTSTRUCT ps; HDC hdc = BeginPaint(hwnd, &ps); RECT rc; GetClientRect(hwnd, &rc); LOGBRUSH lb; lb.lbStyle = BS_SOLID; // Get color using the visual class's GetColor method lb.lbColor = ext->GetColor(); HBRUSH hbrush = CreateBrushIndirect(&lb); HBRUSH hbrOld = (HBRUSH)SelectObject(hdc, hbrush); Rectangle(hdc, rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top); SelectObject(hdc, hbrOld); DeleteObject(hbrush); // Get text using the visual class's GetText method DrawText(hdc, ext->GetText(), ext->GetTextLength(), &rc, DT_CENTER|DT_VCENTER|DT_SINGLELINE); EndPaint(hwnd, &ps); } return 0; // Trigger event scripts in the PowerBuilder application case WM_LBUTTONUP: ext->TriggerEvent("onclick"); break; case WM_LBUTTONDBLCLK: ext->TriggerEvent("ondoubleclick"); break; } return DefWindowProc(hwnd, uMsg, wParam, lParam); } |
…
AccessibleDescription – PB Docs 2022
AccessibleDescription property (DataWindow object) Description A description of the control and/or its purpose for use by accessibility tools such as readers for visually-impaired users. Applies to Column, computed field, picture, text, graph, group box, and button controls Syntax PowerBuilder dot notation:
|
1 |
dw_control.Object.controlname.AccessibleDescription |
Describe and Modify argument:
|
1 |
"controlname.AccessibleDescription { = 'description ' }" |
Parameter Description columnname The name of the control…
Calling PowerBuilder from C++ – PB Docs 2022
Calling PowerBuilder from C++ Contents About calling PowerScript from C++ applications Calling PowerBuilder objects from C++ Accessing result sets Processing PowerBuilder messages in C++ More PBNI possibilities About this chapter A third-party application or server written in C++ can load the PowerBuilder VM, use PowerBuilder nonvisual objects, and use PowerBuilder visual controls. This chapter uses…
String – PB Docs 2022
String DataWindow expression function Description Formats data as a string according to a specified display format mask. You can convert and format date, DateTime, numeric, and time data. You can also apply a display format to a string. Syntax
|
1 |
String ( data {, format } ) |
Argument Description data The data you want returned as a string with the specified formatting….
Syntax 3: for ResourceResponse objects – PB Docs 2022
Syntax 3: for ResourceResponse objects Description Gets the response body into a string. Applies to ResourceResponse object Syntax
|
1 |
objectname.GetBody ( string data ) |
|
1 |
objectname.GetBody ( blob data ) |
|
1 |
objectname.GetBody ( string data, encoding encodingType ) |
Argument Description objectname A reference to the ResourceResponse object in which you want to get the response body. data A string or blob variable into which the function returns data. The following data encodings are supported:…