如何找到一个父非托管的Win32应用程序,一个孩子 [英] How to find a child of a parent unmanaged win32 app

查看:144
本文介绍了如何找到一个父非托管的Win32应用程序,一个孩子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

基本上我要寻找一个win32的方法来调用在C#中的焦点设置到非托管应用程序的孩子。

Basically I am looking for a win32 method to invoke in C# to set the focus to a children of an unmanaged application.

但首先我需要找到子控件的句柄这是问题。任何有效的Win32函数来解决这个?

But first I need to find the child control's handle which is the problem. Any useful win32 functions to solve this?

推荐答案

有一个库,支持枚举和搜索窗口句柄,它可在的 http://mwinapi.sourceforge.net/

There is a library which supports enumerating and searching window handles, which is available at http://mwinapi.sourceforge.net/

只是让你不必每次都推倒重来;)

Just so that you do not have to reinvent the wheel every time ;)

开始以

SystemWindow.AllToplevelWindows

,然后就挖你一路下跌(看类名,进程名,标题,对话框的ID,等等)。

and then just dig your way down (looking at class names, process names, titles, dialog IDs, whatever).

这篇关于如何找到一个父非托管的Win32应用程序,一个孩子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆