hWndEdit = GetWindow( oCtrl:hWnd, GW_HWNDCHILD )
SetWindowText( hWndEdit, Str( nId ) )
function InitControls( oDlg )
local hDlg := oDlg:hWnd, hCtrl := GetWindow( hDlg, GW_CHILD ), oCtrl
local hWndEdit
if hCtrl != 0
oCtrl = TControl()
oCtrl:oWnd = oDlg
oCtrl:hWnd = hCtrl
oCtrl:Link()
AAdd( oDlg:aControls, oCtrl )
oCtrl:lDrag = .T.
oCtrl:bGotFocus = { || oCtrl:ShowDots() }
endif
while hCtrl != 0
hCtrl = GetWindow( hCtrl, GW_HWNDNEXT )
if hCtrl != 0
oCtrl = TControl()
oCtrl:oWnd = oDlg
oCtrl:hWnd = hCtrl
hWndEdit = GetWindow( oCtrl:hWnd, GW_HWNDCHILD )
SetWindowText( hWndEdit, " ( oCtrl:nId )" )
oCtrl:Link()
oCtrl:lDrag = .T.
oCtrl:bGotFocus = { || oCtrl:ShowDots() }
endif
end
return nil
//----------------------------------------------------------------------------//
if hCtrl != 0
oCtrl = TControl()
oCtrl:oWnd = oDlg
oCtrl:hWnd = hCtrl
hWndEdit = GetWindow( oCtrl:hWnd, GW_HWNDCHILD )
nID := GetWindowLong( hWndEdit, GWL_ID )
nID := GetWindowLong( oCtrl:hWnd, GWL_ID )
msginfo( nID )
...
while hCtrl != 0
hCtrl = GetWindow( hCtrl, GW_HWNDNEXT )
if hCtrl != 0
oCtrl = TControl()
oCtrl:oWnd = oDlg
oCtrl:hWnd = hCtrl
// Is it an editable combobox
if ( hWndEdit := GetWindow( oCtrl:hWnd, GW_HWNDCHILD ) ) != 0
nID = GetWindowLong( oCtrl:hWnd, GWL_ID )
SetWindowText( hWndEdit, Str( nID ) )
endif
oCtrl:Link()
oCtrl:lDrag = .T.
oCtrl:bGotFocus = { || oCtrl:ShowDots() }
endif
end
return nil
Here it works fine
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 49 guests