如何识别子窗口 [英] How to identify the Child Window

查看:86
本文介绍了如何识别子窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好..

有点困惑如何识别子窗口是否存在.让我详细说明一下.我有两个主要窗口,即第一个窗口标题[Wong Fung Bullion Investment Limited-Demo CLIENT:019579(CONNECTED)]&第二个窗口标题[Sun Gold Group Company Limited-演示商人:3494(已连接)].当我双击第一个窗口的卖出按钮时,它将弹出子窗口,即添加未结交易.
在这里,我需要确定添加未完成交易"窗口是否已打开?为此,正在使用像这样的FindWindow Api:

Hello Everyone..

Am bit confused how to identify whether the child window is present or not. Let me elaborate it. Am having Two main windows namely First window title [Wing Fung Bullion Investment Limited - Demo CLIENT : 019579 (CONNECTED) ] & Second window Title[Sun Gold Group Company Limited - DEMO trader : 3494 (CONNECTED) ]. When i double click on the SELL button of First window, it pop up''s the child window i.e., Add Open Deal.
Here i need to identify the whether the Add Open Deal window is Opened or not ? For that am using FindWindow Api like this:

HWND hwnd = :: FindWindow(NULL,"Add Open Deal");



问题是面临的问题.如果打开了添加未完成交易",则hwnd的值为0x0001067a {unused = -17891602}.并且,如果未打开添加未完成交易"窗口,则hwnd的值仍为0x0001067a {unused = -17891602}.我没有得到如何识别它是否存在的信息.

请对此提出建议/指导我..

谢谢大家.



The Problem what am facing is.. If the Add Open Deal is opened then hwnd has the value 0x0001067a{unused=-17891602}. And, If Add Open Deal window is not Opened, still hwnd has the value 0x0001067a{unused=-17891602}. Am not getting how to identify whether it is present or not..

Please suggest/guide me on this..

Thank you All.

推荐答案

在您的MFC上下文中:):
In your MFC context :) :
inline bool CYourFirstWnd::IsDealOpened() const
{
  return (FALSE != ::IsWindow(m_cDealPopup.GetSafeHwnd()));
}


这篇关于如何识别子窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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