FINDWINDOWEX的问题

lj3562732 2006-08-11 03:49:01
我是在MDI下将对话框加入到一个view中,也就是说把好几个对话框镶入到一个view中,然后我用MDI的OUTLOOKBAR中的按钮来控制对话框的生成,但当我重复点击一个按时生成的对话框就会显示在其他对话框的前面

我看很多人都用 FINDWINDOWEX来实现,然后在将他们置前,但是现在我不知道FINDWINDOWEX里面的参数怎么设置,他的父句柄是什么?子句柄是什么??
还有要将这个对话框置前怎么设置??

弄了好久都没有做出来,请高手指教
...全文
349 6 打赏 收藏 举报
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
杰仕人生_2001 2006-11-29
  • 打赏
  • 举报
回复
是不是没有初始化指针?
snowbirdfly 2006-08-19
  • 打赏
  • 举报
回复
得不到子窗体的句柄!
那用spy++获取ID看看能不能获取子窗体的ID号~~~
折腾_苏州 2006-08-19
  • 打赏
  • 举报
回复
搞不清楚关系的话,先用spy++看看组织结构,一目了然
lj3562732 2006-08-19
  • 打赏
  • 举报
回复
方法都试过了 我主要是得不到子窗体的句柄!
huaren801007 2006-08-11
  • 打赏
  • 举报
回复
可以尝试一下将hwndParent设置为AfxGetApp()->GetActiveChild();试一下
把对话框置前BringWindowToTop应该可以
dick_song 2006-08-11
  • 打赏
  • 举报
回复
FindWindowEx:
Parameters
hwndParent
Handle to the parent window whose child windows are to be searched.
If hwndParent is NULL, the function uses the desktop window as the parent window. The function searches among windows that are child windows of the desktop.

Windows NT 5.0 and later: If hwndParent is HWND_MESSAGE, the function searches all message-only windows.

hwndChildAfter
Handle to a child window. The search begins with the next child window in the Z order. The child window must be a direct child window of hwndParent, not just a descendant window.
If hwndChildAfter is NULL, the search begins with the first child window of hwndParent.

Note that if both hwndParent and hwndChildAfter are NULL, the function searches all top-level and message-only windows.

lpszClass
Pointer to a null-terminated string that specifies the class name or is an atom that identifies the class-name string. If this parameter is an atom, it must be a global atom created by a previous call to theGlobalAddAtom function. The atom, a 16-bit value, must be placed in the low-order word of lpszClass; the high-order word must be zero.
lpszWindow
Pointer to a null-terminated string that specifies the window name (the window's title). If this parameter is NULL, all window names match.

16,550

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Creator Browser
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧