我用回调函数根据进程获取到另外一个程序的Window
也可以回调枚举出界面上所有的控件
但是获取到的很多控件的ClassName是类似Afx:10000000:b:10011:1900015:0 这样的东东,而且每次都不一样
这些控件也没有标题
所以我想sendmessage去操作某一个按钮时。
无法得知我需要发送消息的按钮到底是哪一个。这样动态的我怎么识别到那个Handle的是需要操作的啊???
高手提供点思路

解决方案 »

  1.   

    The GetWindowText function copies the text of the specified window's title bar (if it has one) into a buffer. If the specified window is a control, the text of the control is copied. 
      

  2.   

    The GetDlgItem function retrieves a handle to a control in the specified dialog box. 
    用GetDlgItem可以返回句柄
      

  3.   

    findwindow获取窗体句柄
    findwindowex获取窗体内子控件句柄
    sendmessage时句柄用子控件的