Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Tabbed DialogBox *without MFC*?!

Status
Not open for further replies.

declspec

Programmer
Jun 8, 2001
3
RO
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'm not sure I understand clearly. What is the specific problem you are experiencing?

As to the NT/Windows Task Manager, I see :

The Main dialog (the task manager itself)
[tab]child dialog (applications)
[tab][tab]list box
[tab][tab][tab][tab]SysListView32
[tab][tab][tab][tab][tab]sysheader
[tab][tab][tab][tab]buttons
[tab]child dialog (processes)
[tab][tab][tab]child ctrls...
[tab]child dialog (Performance Monitor)
[tab][tab][tab]child ctrls...
[tab]tab ctrl
[tab]status bar

So it looks to me like the list box (SysListView32) is a child of the Applications child-dialog which is a child-dialog of the Main TaskManager dialog. How does this differ from what you have?
--Will Duty
wduty@radicalfringe.com

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top