In TD2.0, I have a function (IFAnyEdit) which checks when a user closes a form window/Table Window which has been edited but not yet saved, a message is prompted 'If you quit, the record will not be saved'.
I have now converted my applications from TD2.0 to TD6.3. This function is not working in TD6.3. Can I have a solution ?
Window Handle: hWndChild
Set hWndChild = SalGetFirstChild( hWndForm, TYPE_Any )
While hWndChild != hWndNULL
Set nType = SalGetType( hWndChild )
If nType = TYPE_ChildTable
If SalTblAnyRows( hWndChild, ROW_New | ROW_Edited | ROW_MarkDeleted, 0 )
If nType != TYPE_PushButton
If SalWindowIsDerivedFromClass( hWndChild, ICdfFilter) = FALSE AND
SalWindowIsDerivedFromClass( hWndChild, ICdfLookUpFilter) = FALSE AND
SalWindowIsDerivedFromClass( hWndChild, ICrbFilter) = FALSE AND
SalWindowIsDerivedFromClass( hWndChild, ICcmbFilter) = FALSE
If SalQueryFieldEdit( hWndChild )
Set hWndChild = SalGetNextChild( hWndChild, TYPE_Any )
The Sal function SalQueryFieldEdit(hWndChild ) does nothing in TD63.
Form window with a Tab(frm1) : Does not execute the exit check
Form window (frm2): It does the exit check
Thnks to revert
- Founder/Site Admin
- Posts: 1232
- Joined: 24 Feb 2017, 09:12
- Location: Gouda, The Netherlands
The issue is with the TabBar. This control has a different internal structure compared to the QuickTab control.
See this article:
https://wiki.tdcommunity.net/index.php/ ... ld_objects
So, when your code encounters a TabBar, you then need to drill down the tabpage layers to discover the child objects residing on each tabpage.
I changed your sample to handle the TabBar.
You are great.
Thanks a lot for your help.
Who is online
Users browsing this forum: No registered users and 0 guests