前提是我这个窗口没有CAPTION.
也就是说用FindWindow函数, 无法指定caption.在win32下,不是MFC 还有其它方法吗?或者是如何修改FindWindow ?
也就是说用FindWindow函数, 无法指定caption.在win32下,不是MFC 还有其它方法吗?或者是如何修改FindWindow ?
解决方案 »
- 清空DC上的内容
- 如何才删除HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\test 这种注册表键值
- 编辑状态下的右键popup menu的控制问题.
- 谁能给我一个写条屏的程序,,谢谢了!!
- ACCESS数据库的问题
- cstdionfile 怎么实现行读完文本后,行写入,我writestring后都连在一起了
- 关于接口查询的问题,在线等待
- 鼠标键盘消息的响应出错
- 请问如何改变windows media player控件上有个windows标志的图片!
- 怎么让一个应用程序的窗口是一个不规则的图形
- 做视频开发,需要学些什么东西??
- 在MFC中使用boost::tregex_iterator的问题
EnumWindows可以查找.
窗口样式啊等等,都行的
区别窗口的唯一凭证就是HWND, 没有HWND你只能分析窗口特征了.
其他的可以用
EnumWindows
{
HWND hWnd;
} ;
struct Tag_STRUCT Struct; Struct.hWnd = m_hWnd;
WritePrivateProfileStruct("Section","Key",&Struct,sizeof(Struct),"C:\\1.ini");
程序B中 struct Tag_STRUCT
{
HWND hWnd;
} ;
struct Tag_STRUCT Struct; GetPrivateProfileStruct("Section","Key",&Struct,sizeof(Struct),"C:\\1.ini");
HWND hwnd = ::FindWindow(NULL,"wuming"); if(hwnd != NULL)
MessageBox("Found!"); if(hwnd == Struct.hWnd )
MessageBox("the same !"); ::ShowWindow(hwnd,SW_HIDE);
The WindowFromPoint function retrieves a handle to the window that contains the specified point.
HWND WindowFromPoint(
POINT Point // point
);
Parameters
Point
[in] Specifies a POINT structure that defines the point to be checked.
Return Values
The return value is a handle to the window that contains the point. If no window exists at the given point, the return value is NULL. If the point is over a static text control, the return value is a handle to the window under the static text control.
GetProp //以下方法本人没用过,上面可以
SetWindowLong
GWL_USERDATA
Sets the user data associated with the window. This data is intended for use by the application that created the window. Its value is initially zero.