首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

高手vc中获取模态对话框句柄有几种方法,各是什么

2012-02-16 
求助高手vc中获取模态对话框句柄有几种方法,各是什么?vc中获取模态对话框句柄有几种方法,每种方法是怎么样

求助高手vc中获取模态对话框句柄有几种方法,各是什么?
vc中获取模态对话框句柄有几种方法,每种方法是怎么样实现的?
小弟先谢啦

[解决办法]
HWND FindWindow(
LPCTSTR lpClassName, // class name NULL if you don 't know
LPCTSTR lpWindowName // window name caption of the window
);
[解决办法]
EnumWindows Function

--------------------------------------------

The EnumWindows function enumerates all top-level windows on the screen by passing the handle to each window, in turn, to an application-defined callback function. EnumWindows continues until the last top-level window is enumerated or the callback function returns FALSE.

Syntax

BOOL EnumWindows( WNDENUMPROC lpEnumFunc,
LPARAM lParam
);
Parameters

lpEnumFunc
[in] Pointer to an application-defined callback function. For more information, see EnumWindowsProc.
lParam
[in] Specifies an application-defined value to be passed to the callback function.
Return Value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

If EnumWindowsProc returns zero, the return value is also zero. In this case, the callback function should call SetLastError to obtain a meaningful error code to be returned to the caller of EnumWindows.

热点排行