how to get Information from ::aControls

how to get Information from ::aControls

Postby Jimmy » Thu Mar 30, 2023 10:07 am

hi,

i do have REDEFINE BUTTON and i want to get hWnd of each Control

Code: Select all  Expand view
  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
User avatar
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: how to get Information from ::aControls

Postby nageswaragunupudi » 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
User avatar
nageswaragunupudi
 
Posts: 10625
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: how to get Information from ::aControls

Postby Jimmy » 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
User avatar
Jimmy
 
Posts: 1725
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 87 guests