Article View: borland.public.cppbuilder.nativeapi
Article #17487Re: Create a tab control with nativeapi
From: Gary Setter
Date: Tue, 11 Mar 2003 14:32
Date: Tue, 11 Mar 2003 14:32
66 lines
3786 bytes
3786 bytes
I've convinced myself that defining child controls that represent the child
dialogs is not built into the Win32 API. Was I looking for something that is
impossible? Is such a thing not useful?
"Remy Lebeau (TeamB)" <gambit47@yahoo.com> wrote in message
news:3e6a6387$1@newsgroups.borland.com...
> Sounds like you need to read up on how TabControls and dialogs work.
<snip>
Thanks for the reply.
Sorry, I was not making myself clear. I wanted to define a container popup
dialog and two child dialogs in the resource. I wanted the container dialog
to have two control that represented where the child dialogs were to appear.
As Remy Lebeau rightly pointed out, you can create a tab control and a child
dialog for each tab. But, you have to connect the container dialog to the
child dialog in the application code. You can't (as far as I know) design
the dialogs and how they connect in the resource editor.
I was looking for something like this where CHILDDLG is my fantasy: Notice
that both a CHILDDLG and DIALOG use id IDD_DIALOG2.
IDD_DIALOG1 DIALOG DISCARDABLE 0, 0, 186, 106
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Dialog"
FONT 8, "MS Sans Serif"
BEGIN
DEFPUSHBUTTON "OK",IDOK,33,86,50,14
PUSHBUTTON "Cancel",IDCANCEL,97,86,50,14
CONTROL "Tab1",IDC_TAB1,"SysTabControl32",WS_TABSTOP,7,7,166,75
CONTROL "CHILDDLG",IDD_DIALOG2 ,"CHILDDLG",0x0,10,20,97,54
CONTROL "CHILDDLG",IDD_DIALOG3 ,"CHILDDLG",0x0,10,20,97,54
END
IDD_DIALOG2 DIALOG DISCARDABLE 0, 0, 97, 53
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
CONTROL "Radio1",IDC_RADIO1,"Button",BS_AUTORADIOBUTTON |
WS_TABSTOP,14,13,73,13
CONTROL "Radio2",IDC_RADIO2,"Button",BS_AUTORADIOBUTTON |
WS_TABSTOP,15,27,75,17
END
IDD_DIALOG3 DIALOG DISCARDABLE 0, 0, 76, 57
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
BEGIN
CONTROL "Check1",IDC_CHECK1,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,5,6,59,14
CONTROL "Check2",IDC_CHECK2,"Button",BS_AUTOCHECKBOX |
WS_TABSTOP,3,32,66,15
END
I was asking, if MS wanted to, could they make a CHILDDLG control that is
instantiated by calling CreateDialogParam (vs CreateWindow)? If this was
available the designer of the UI could take greater control of the design.
The answer, I think, is that all the calls to CreateDialogParam need a
DialogProc, and param value, which is how dialogs are customized. Where
would these parameters come from? The solution is to make the child dialogs
in container dialogs init code.
Best regard,
Gary
Technical Details
Message-ID:
<3e6df8cd@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mailReferences:
<3e6a26f6@newsgroups.borland.com> <3e6a6387$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,ecf8b49220dfe452 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2003-03-12 17:44:33 PST From: "Gary Setter" <setterg@worldnet.att.net> Newsgroups: borland.public.cppbuilder.nativeapi References: <3e6a26f6@newsgroups.borland.com> <3e6a6387$1@newsgroups.borland.com> Subject: Re: Create a tab control with nativeapi Date: Tue, 11 Mar 2003 08:32:29 -0600 Lines: 67 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 12.84.32.219 Message-ID: <3e6df8cd@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1047394509 12.84.32.219 (11 Mar 2003 06:55:09 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!iad-peer.news.verio.net!news.verio.net!newsfeed.wirehub.nl!news.kweb.on.ca!KWeb!newsgroups.borland.com!not-for-mail