|
-
March 8th, 2006, 08:29 AM
#1
Modeless Dialog problem
Hi,
I am using VC++6.0, MFC.
I am working on a MDI application, and got stuch place.
I ahave created a Modeless dialog, and attached it with the main frame.
when I move the FRAME WINDOW , this dialog should move along with the frame, and it is happening(here DIALOG BOX is a seprate window,displaying seprately on the desktop, attached with the frame)), and as per the app. needs, it should.
Now If I move dialog window , than it is moving, and detaches from MainFrame.
Now my objective is that, this dialog window should not move at al(WHEN I try to move DIALOG WINDOW NOT MAINFRAME WINDOW))l,so ithat it will not detach from Main Frame.
Which message Map handler I should use.Can u pl. suggest some solution in this regard.
Regs
-
March 8th, 2006, 08:50 AM
#2
Re: Modeless Dialog problem
One solution is to handle WM_NCHITTEST
Code:
UINT CMyDialog::OnNcHitTest(CPoint point)
{
UINT nRet = CDialog::OnNcHitTest(point);
if(HTCAPTION == nRet)
{
nRet = HTNOWHERE;
}
return nRet;
}
Another one is to create a dialog with no caption.
-
March 17th, 2006, 07:18 AM
#3
Re: Modeless Dialog problem
Hi,
Thanks for your reply. Now the problem has been solved.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|