100分求对话框的有关问题:怎样把子对话框显示在屏幕的顶部,并且主对话仍然可以操作

100分求对话框的问题:怎样把子对话框显示在屏幕的顶部,并且主对话仍然可以操作?
现在要实现的效果就是,
通过检测鼠标位置把子对话框显示在屏幕的顶部,
子对话框显示出来后,主对话框仍然可以编辑或操作,
子对话框不会隐藏到主对话框的后面。
这种效果和任务管理器“前端显示”属性是一样的。

搞过的高手过来指导一下。谢谢啦!急用。。。

------解决方案--------------------
做成非模式对话框就可以了吧
------解决方案--------------------
在对话框的初始化中调用BringWindowToTop()
------解决方案--------------------
子对话框做成非模式对话框
然后在initial时设置为TOP_MOST

------解决方案--------------------
如:

::SetWindowPos(m_hWnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE | SWP_NOSIZE);
------解决方案--------------------
http://www.vckbase.com/document/viewdoc/?id=1017
------解决方案--------------------
如二楼所说用非模式
------解决方案--------------------
创建模式对话框用:DialogBoxParam

创建非模对话框用:CreateDialogParam

当显示一个模式对话框时,用户在关闭这个对话框前不允许切换到同一程序的其他窗口,如记事本的“关于”

当显示一个非模对话框时,可以切换到同一程序的其他窗口,如记事本的“查找替换”
------解决方案--------------------
不可以放在MouseMove事件中,可以使用SetWindowLong给它加入WS_EX_TOPMOST样式在PreCreateWindow函数中
------解决方案--------------------
创建非模式对话框方法:
首先创建一个对话框资源IDD_DIALOG1,并双击新建一个类CTestDlg,
在你的程序中加入下面的代码:
CTestDlg *pDlg=new CTestDlg;
pDlg-> Create (IDD_DIALOG1,this);
pDlg-> ShowWindow(SW_SHOW);
------解决方案--------------------
GetCursorPos(&mPoint);
可以取到鼠标的位置。

剩下的就看你自己定的条件了
------解决方案--------------------
写成非模太的,父窗口属性改为:TOPMOST最顶层的。
------解决方案--------------------
可以通过以下三种方法判断:
1.WindowFromPoint 反回一个窗口句柄,你可以通这个句柄来判断是不是你要的窗口。
2.CRect::PtInRect 检测鼠标是否在这个矩形区内。
3.CRgn::PtInRegion 检测鼠标是否在这个区域窗口内。

------解决方案--------------------
BOOL PtInRect(
CONST RECT *lprc, // rectangle
POINT pt // point
);
Parameters
lprc
[in] Pointer to a RECT structure that contains the specified rectangle.
pt
[in] Specifies a POINT structure that contains the specified point.
Return Values
If the specified point lies within the rectangle, the return value is nonzero.

If the specified point does not lie within the rectangle, the return value is zero.

Remarks
The rectangle must be normalized before PtInRect is called. That is, lprc.right must be greater than lprc.left and lprc.bottom must be greater than lprc.top. If the rectangle is not normalized, a point is never considered inside of the rectangle.

Because applications can use rectangles for different purposes, the rectangle functions do not use an explicit unit of measure. Instead, all rectangle coordinates and dimensions are given in signed, logical values. The mapping mode and the function in which the rectangle is used determine the units of measure.

;==========================================================================
BOOL PtInRegion(
HRGN hrgn, // handle to region
int X, // x-coordinate of point
int Y // y-coordinate of point
);
Parameters
hrgn
[in] Handle to the region to be examined.
X
[in] Specifies the x-coordinate of the point in logical units.