Read all handles of controls, associate ONLY handle Win/Dlg

Read all handles of controls, associate ONLY handle Win/Dlg

Postby ericmagaldi » Tue Mar 06, 2007 9:50 am

How read all handles of controls, associate ONLY handle Window/Dialog activate.

objective, realize refresh without require any object.

Example:
Code: Select all  Expand view
SetKey(VK_F5, {|a,b,c| ReadAllHandles() })
...
...
function ReadAllHandles()
local nWnd,nHandle

nWnd :=GetActiveWindow()
//nHandle = nil, first control
do while .t.
   nHandle:=NEXTDLGTAB(nWnd,nHandle)

   if ! MsgYesNo('nHandle=>'+NTRIM(nHandle) + CHR(13) + ;
      GetClassName(nHandle) + CHR(13) + ;
      GetWindowText(nHandle) + CHR(13) + ;
      'GetParent(nHandle)=>'+ntrim(GetParent(nHandle)) ;
      )

      exit

   endif

enddo
return nil


two problems.
If Control be in SysTabControl32( TFolder ), not know how read.
if Control be Disable, GetNextDlgTabItem skip handle control.

Please.
virtually,
Éric
xHarbour.org + Borland C + FiveWin (2.8/6.12) + Pelles C + HBMake + ADSCDX
São Paulo - Brasil
http://xBaseSuporte.freeforums.org
User avatar
ericmagaldi
 
Posts: 37
Joined: Tue Feb 20, 2007 9:26 am
Location: São Paulo - Brazil

Postby Antonio Linares » Thu Mar 08, 2007 11:24 am

Éric,

> If Control be in SysTabControl32( TFolder ), not know how read.

Use GetClassName( hCtrlWnd ) to check for SysTabControl32 and check its childs

> if Control be Disable, GetNextDlgTabItem skip handle control.

Use GetWindow( hWnd, GW_CHILD ) and GW_HWNDNEXT
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42077
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 70 guests

cron