Hello.
I was trying to write an application interface program where I need to have
a window just like the Windows NT / 2000 task manager has: three tabs; the
first two - with list boxes, the last one - a set of graph controls.
NOTE: I *do not* need to create a property sheet!
I am writing the program without the MFC, so it's "pure win32"... The problem is that I can't "make" the program get rid of the dialogs I use for tabs....
I will try to explain: when the user selects one tab the program shows the corresponding dialog (all three dialogs are created when program is started and are hidden). The three dialogs are designed using the Resource Editor
(styles applied: Child, No border, DS_CONTROL, 3d-Look). The main window is a dialog too (styles: Overlapped, Resizing, 3d-Look).
The program goes like this:
WinMain(...)
{
// ...
DialogBox(..., ID_MAINDLG, ...)
// ...
}
MainDlgProc(...)
{
case WM_INITDIALOG:
CreateTheThreeDialogs_Using_CreateDialog();
return TRUE;
case WM_NOTIFY:
if ((NMHDR*)lParam->code == TBN_SELCHANGE:
{
ShowTheCorrespondingDialog();
break;
}
}
Now: the dialogs appear as childs of the main dialog (CreateDialog(..., hwndMainDlg, ...)).
!!!--- BIG Q: ---!!!
Why does the "child dialog" is still there or how can I make the program to leave only the ListBox (or any other controls that are placed on the "child dialog"?!?
I mean, if you do a "spy" on TaskManager, you can see there only the listbox control, not the "child dialog"!!! The controls go like this: ListBox (first), SysTabControl32 (second), Dialog (last one). There is no "child dialog" (the dialog on which the ListBox is placed)!!!
NOTE: TaskManager does not create the controls independently, it has al of the "tabs" in separate dialog resources.
I would appreciate if you could help me on this one.
__________________________________
"The truth is... inside the code."
I was trying to write an application interface program where I need to have
a window just like the Windows NT / 2000 task manager has: three tabs; the
first two - with list boxes, the last one - a set of graph controls.
NOTE: I *do not* need to create a property sheet!
I am writing the program without the MFC, so it's "pure win32"... The problem is that I can't "make" the program get rid of the dialogs I use for tabs....
I will try to explain: when the user selects one tab the program shows the corresponding dialog (all three dialogs are created when program is started and are hidden). The three dialogs are designed using the Resource Editor
(styles applied: Child, No border, DS_CONTROL, 3d-Look). The main window is a dialog too (styles: Overlapped, Resizing, 3d-Look).
The program goes like this:
WinMain(...)
{
// ...
DialogBox(..., ID_MAINDLG, ...)
// ...
}
MainDlgProc(...)
{
case WM_INITDIALOG:
CreateTheThreeDialogs_Using_CreateDialog();
return TRUE;
case WM_NOTIFY:
if ((NMHDR*)lParam->code == TBN_SELCHANGE:
{
ShowTheCorrespondingDialog();
break;
}
}
Now: the dialogs appear as childs of the main dialog (CreateDialog(..., hwndMainDlg, ...)).
!!!--- BIG Q: ---!!!
Why does the "child dialog" is still there or how can I make the program to leave only the ListBox (or any other controls that are placed on the "child dialog"?!?
I mean, if you do a "spy" on TaskManager, you can see there only the listbox control, not the "child dialog"!!! The controls go like this: ListBox (first), SysTabControl32 (second), Dialog (last one). There is no "child dialog" (the dialog on which the ListBox is placed)!!!
NOTE: TaskManager does not create the controls independently, it has al of the "tabs" in separate dialog resources.
I would appreciate if you could help me on this one.
__________________________________
"The truth is... inside the code."