• <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>
  • 操縱遨游工具欄的方法,解決spy++無法捕獲控件的問題(2)

    發表于:2009-04-23來源:作者:點擊數: 標簽:工具spy捕獲控件解決
    利用微軟內部工具 mitaspy可以發現msaa對象。這說明,mita比maui要強。mita也是微軟以后的標準。 同時發現了FindWindowEx只能搜索子窗口,不能搜索孫子窗口,所以,需要提前注意窗口的嵌套層次。 這個問題完結了。我也不研究了。繼續其他的學習。 更新后的代
    利用微軟內部工具 mitaspy可以發現msaa對象。這說明,mita比maui要強。mita也是微軟以后的標準。

    同時發現了FindWindowEx只能搜索子窗口,不能搜索孫子窗口,所以,需要提前注意窗口的嵌套層次。
    這個問題完結了。我也不研究了。繼續其他的學習。

    更新后的代碼


    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Reflection;
    using System.Runtime.InteropServices;
    using Aclearcase/" target="_blank" >ccessibility;

    namespace ConsoleApplication1
    {
        class Program
        {
            static void Main(string[] args)
            {
                int hWnd = FindWindowEx(0, 0, "Maxthon2_Frame", null);
                int sub = FindWindowEx(hWnd, 0, "XTPDockBar", null);
                int subhwnd = FindWindowEx(sub, 0, null, "標準工具欄");
                if (subhwnd!= null)
                    Console.WriteLine("OK, Found the toolbar");
                msaa((IntPtr)subhwnd);

                Console.ReadKey();
            }

            [DllImport("oleacc", CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true)]
            public static extern int AccessibleChildren(IAccessible paccContainer, int iChildStart, int cChildren, [In, Out, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] object[] rgvarChildren, ref int pcObtained);

            [DllImport("oleacc.dll")]
            internal static extern int AccessibleObjectFromWindow(
                          IntPtr hwnd,
                          uint id,
                          ref Guid iid,
                          [In, Out, MarshalAs(UnmanagedType.IUnknown)] ref object ppvObject);

            internal enum OBJID : uint
            {
                WINDOW = 0x00000000,
                SYSMENU = 0xFFFFFFFF,
                TITLEBAR = 0xFFFFFFFE,
                MENU = 0xFFFFFFFD,
                CLIENT = 0xFFFFFFFC,
                VSCROLL = 0xFFFFFFFB,
                HSCROLL = 0xFFFFFFFA,
                SIZEGRIP = 0xFFFFFFF9,
                CARET = 0xFFFFFFF8,

    原文轉自:http://www.kjueaiud.com

    老湿亚洲永久精品ww47香蕉图片_日韩欧美中文字幕北美法律_国产AV永久无码天堂影院_久久婷婷综合色丁香五月

  • <ruby id="5koa6"></ruby>
    <ruby id="5koa6"><option id="5koa6"><thead id="5koa6"></thead></option></ruby>

    <progress id="5koa6"></progress>

  • <strong id="5koa6"></strong>