|
-
June 28th, 2004, 04:26 AM
#1
How to prevent Modeless Dialog box on the Task Bar
Hai all,
I use a modeless dialog box in my application.
But, the window for the modeless dialog in the task bar is also seen.
How can i prevent it?
Also, when I resize the application window, I can not change the position of the modeless dialog box, correspondingly.
Simply, I am trying to make the Modeless Dialog box to be a part of my application window.
Please help me,
With Thanks and Rgds,
Arun
-
June 28th, 2004, 12:52 PM
#2
May be you want to make the modeless dialog a child of the application window.
-
June 29th, 2004, 02:36 AM
#3
Re:How to prevent Modeless Dialog box on the Task Bar
Yes kirant,
I want the modeless dalog to be a child of application window.
how can it be done?
With thanks,
Arun
-
June 29th, 2004, 10:40 AM
#4
Just to give you an idea:
1. Create a sample SDI MFC app.
2. Compile.
3. Now, add a dialog resource , say IDD_DIALOG1
4. Drop an edit box , for e.g.
5. Select the dialog properties, in the styles tab, select style as child, and border as None
6. Save the resource
7. Go to class wizard and add a new class for this dialog, say CMyModelessDlg.
8. open the view class' header file and include the CMyModelessDlg.h
9. Add a member variable to the view class
CMyModelessDlg m_oDlg;
10. Go to class wizard of the View class and add a WM_CREATE handler.
11. In the OnCreate add this:
Code:
int CSampviewView::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CView::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
m_oDlg.Create(IDD_DIALOG1,this);
m_oDlg.ShowWindow(SW_SHOW);
return 0;
}
Hope this helps..
-
July 3rd, 2004, 02:28 AM
#5
Thanks Kirant.
Its work.
With thanks,
Arun
-
July 3rd, 2004, 02:23 PM
#6
To clarify:
If you call Create to cerate modeless dialog and pass pointer to a window, dialog becomes a child of that window only if WS_CHILD style is set.
Otherwise window becomes an owner of a dialog, not a parent.
There are only 10 types of people in the world:
Those who understand binary and those who do not.
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
|