- Riccardo Pasqualetti
- PowerBuilder
- Wednesday, 14 February 2024 02:02 PM UTC
Hi everyone,
I have my application that works into SAP BusinessOne
To open my windows into SAP MDI I get SAP MDI handle's and set this as parent to my windows using windows api SetParent
I don't know why but some windows open without issue others don't show, powerbuilder function Open works but window is not visible.
I'm using PowerBuilder 2022 R3 3289 on Windows 2019 Server 64bit, 64bit environment
If I use my application builded with PowerBuilder R2 build 2819 I don't have this issue.
Any suggestions?
Thanks
-----------------------------------------------------------------------------------------------------------
Window open event
long ll_rc
long ll_hPBWindow
long ll_parent_handle
ll_parent_handle = wf_get_handle_sap(string(gole_sbo_application.Desktop.Title))
ll_hPBWindow = handle(This)
ll_rc = SetParent( ll_hPBWindow, ll_parent_handle)
-----------------------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------------
Function to get SAP MDI handle's wf_get_handle_sap(string as_windowname)
Constant long GW_HWNDFIRST = 0
Constant long GW_HWNDLAST = 1
Constant long GW_HWNDNEXT = 2
Constant long GW_HWNDPREV = 3
Constant long GW_OWNER = 4
Constant long GW_CHILD = 5
Constant long GW_MAX = 5
Constant long MAX_WIDTH = 1255
long ll_hFrameWindow
long ll_hParentWindow
long ll_Desktop
long ll_Child
String ls_WindowName
String ls_ClassName
String ls_ieopened
SetNull( ls_WindowName )
ll_hFrameWindow = FindWindowA( 'TMFrameClass', as_windowname)
ll_Child = GetWindow( ll_hFrameWindow, GW_CHILD )
DO WHILE (ll_Child > 0)
ls_ClassName = Space(MAX_WIDTH)
ls_WindowName = Space(MAX_WIDTH)
GetClassNameW( ll_Child, ls_ClassName, MAX_WIDTH )
GetWindowTextW( ll_Child, ls_WindowName, MAX_WIDTH )
IF ls_classname = 'TMMDIClientClass' and IsWindowVisible(ll_Child) THEN
Return ll_Child
END IF
ll_Child = GetWindow( ll_Child, GW_HWNDNEXT )
LOOP
Return ll_Child
------------------------------------------------------------------------------------------------------------
Find Questions by Tag
Helpful?
If a reply or comment is helpful for you, please don’t hesitate to click the Helpful button. This action is further confirmation of their invaluable contribution to the Appeon Community.