Re: fwh\samples\RE.prg - FiveWin Resources Editor underrated
yes.
Best regards,
Otto
www.FiveTechSoft.com
https://fivetechsoft.com/forums/

Code: Select all | Expand
hWndEdit = GetWindow( oCtrl:hWnd, GW_HWNDCHILD )
SetWindowText( hWndEdit, Str( nId ) )
Hello Antonio,
I inserted the code into the InitControls function.
But how do I find out the nId. oCtrl:nId is empty?
Best regards,
Otto
Code: Select all | Expand
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
//----------------------------------------------------------------------------//

Hello Antonio,
thank you for your help.
Although I can’t find out how to get the nID of the combobox.
I tried to insert into InitControls function your code but the nID is 1001 and not 4003. I think I get the nID of the edit control and not of the combobox.
Best regards,
Otto
Code: Select all | Expand
if hCtrl != 0
oCtrl = TControl()
oCtrl:oWnd = oDlg
oCtrl:hWnd = hCtrl
hWndEdit = GetWindow( oCtrl:hWnd, GW_HWNDCHILD )
nID := GetWindowLong( hWndEdit, GWL_ID )
Code: Select all | Expand
nID := GetWindowLong( oCtrl:hWnd, GWL_ID )
msginfo( nID )
Otto,
In function ParseControl( cLine ) make this change:
nId = Val( StrToken( cLine, 2, "," ) )
also change this section in function InitControls( oDlg ):
Code: Select all | Expand
...
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 ![]()
Here it works fine
