FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour how to get Information from ::aControls
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
how to get Information from ::aControls
Posted: Thu Mar 30, 2023 10:07 AM
hi,

i do have REDEFINE BUTTON and i want to get hWnd of each Control
Code (fw): Select all Collapse
   FOR ii := 1 TO LEN( ::aControls )
      oObj := ::aControls[ii]
      hWnd := oObj:hWnd
      fwlog oObj, LEN(oObj), hWnd
oOBj -> TBUTTON
LEN(oObj) -> 151 // ???
hWnd -> 0
what i´m doing wrong :?:
greeting,

Jimmy
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: how to get Information from ::aControls
Posted: Thu Mar 30, 2023 11:37 AM

When we create controls on a Window, all controls are fully created and so have valid hWnd.

When we create controls on a dialog, the controls are created only when the dialog is initialized. So, hWnd is valid only after activating the dialog.

Regards



G. N. Rao.

Hyderabad, India
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: how to get Information from ::aControls
Posted: Thu Mar 30, 2023 12:43 PM
hi,
When we create controls on a dialog, the controls are created only when the dialog is initialized.
So, hWnd is valid only after activating the dialog.
ah ... ok, thx
have to over-think concept
greeting,

Jimmy

Continue the discussion