- Code: Select all Expand view
DEFINE DIALOG oDlg RESOURCE cResDlgName
ACTIVATE DIALOG oDlg ;
ON INIT ( lFound := LookForControl( oDlg:hWnd, nCtrlId ), oDlg:End() )
...
function LookForControl( hDlg, nCtrlId )
local hCtrl
while ( hCtrl := GetWindow( hDlg, GW_CHILD ) ) != 0 .and. GetParent( hCtrl ) == hDlg
if GetWindowLong( hCtrl, GWL_ID ) == nCtrlId
return .T.
endif
hCtrl = GetWindow( hCtrl, GW_HWNDNEXT )
end
return .F.