Getting handle of child windows where Enumchildwindows failing

Hi all,
       I have a query.
       I am writing an application to traverse and manipulate child controls of any dialog box present on the screen.
       But in some dialog boxes like  WordCount dialog box in Microsoft Word ( Tools - WordCount) , i am unable to get the handle of the child controls using EnumChildWindows.
         Is there any other way through which i can achieve this goal.
         Any help will be appreciated.

Thanks


Answer this question

Getting handle of child windows where Enumchildwindows failing

  • SBORA

    <Manas@discussions.microsoft.com> wrote in message
    news:410a56de-074f-4358-890e-e298b2613acf_WBRev3_@discussions.microsoft.com
    > But my requirement is to identify , traverse and manipulate the
    > controls present on the dialog box.
    >
    >       Now as you have informed me that they are fake , so is there
    > any way ( documented or non-documented) to make me know what controls
    > are present on the dialogbox or not. Is there any way by using DLL
    > Message Hooking or some other under the hood trick.
     
    None that I know of.
    --
    With best wishes,
        Igor Tandetnik

  • Tommy0204

    <Manas@discussions.microsoft.com> wrote in message
    news:5670a5f7-6baf-4b88-8d5b-fec315f461c9_WBRev1_@discussions.microsoft.com
    >        I am writing an application to traverse and manipulate child
    > controls of any dialog box present on the screen.
    >        But in some dialog boxes like  WordCount dialog box in
    > Microsoft Word ( Tools - WordCount) , i am unable to get the handle
    > of the child controls using EnumChildWindows. 
    That dialog does not have any. All controls on it are windowless. In other words, they are fake, not real windows (HWNDs), just painted on a dialog with regular GDI calls. MS Office uses a library of these windowless controls, to reduce footprint on system resources.
    --
    With best wishes,
        Igor Tandetnik

  • Michael Entin - MSFT

    Thank you very much for the reply.

    But my requirement is to identify , traverse and manipulate the controls present on the dialog box.

          Now as you have informed me that they are fake , so is there any way ( documented or non-documented) to make me know what controls are present on the dialogbox or not. Is there any way by using DLL Message Hooking or some other under the hood trick.

               Or i assume that in dialog boxes in which EnumChildWindows fails , then we can't have by any means the information about the controls present on the dialog.


    Please help me with this..

    Thanks
    Mohit Manaskant

  • anotherstupiddisplayname

    Try ActiveAccessibility. IAccessible::get_accChildCount and IAccessible::get_accChild will enumerate accessible children.

  • Getting handle of child windows where Enumchildwindows failing