假设我有一个编译的二进制程序,它运行并在屏幕上显示一些 GUI。我需要从 Win32 中的另一个程序访问其工具栏,找到一个按钮并单击它。
我知道如何找到工具栏的 Hwnd,但我真的不知道如何枚举它上面的按钮。任何想法如何在 Win32 调用中做到这一点?
有没有像 Spy++ 这样的工具可以在工具栏下显示按钮句柄?Spy++ 不这样做。
谢谢
我正在尝试以编程方式在类成员之上添加新属性......
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Text;
using System.Threading.Tasks;
namespace Test11
{
public class SomeAttribute : Attribute
{
public SomeAttribute(string value)
{
this.Value = value;
}
public string Value { get; set; }
}
// for attribute to be injected the property should be "virtual"
public class ClassA
{
public virtual int Value { get; set; }
}
public class Test
{
public static void Func()
{
var type = typeof(ClassA);
var aName = …
Run Code Online (Sandbox Code Playgroud)