Article View: borland.public.cppbuilder.nativeapi
Article #17659Re: Create a tab control with nativeapi
From: Remy Lebeau (TeamB)
Date: Sat, 08 Mar 2003 21:50
Date: Sat, 08 Mar 2003 21:50
28 lines
2413 bytes
2413 bytes
Sounds like you need to read up on how TabControls and dialogs work. You most certainly can have dialogs embedded into the TabControl. The TabControl only has one display area. When you create your dialogs using CreateWindow/Ex(), simply set the TabControl HWND as the parent window, set the WS_CHILD style, and make the dialogs initialy hidden (if you are going to create them all at once, that is). Then, when the appropriate tab is selected by the user, use the TCM_ADJUSTRECT message to find out the dimensions of the display area, and then position/size the dialog it accordingly and show it normally. Because the TabControl is set as the parent for the dialog, the dialog will display inside of it. Then, when the user changes tabs, hide/destroy the current dialog and show the new one as appropriate. If you look in the Win32 API documentation for TabControls, there are code examples included. Specifically, have a look at the "Creating a Tabbed Dialog Box" example. Which, incidently, does include a note about "In many cases, you can implement multiple-page dialog boxes more easily by using property sheets." Gambit "Gary Setter" <setterg@worldnet.att.net> wrote in message news:3e6a26f6@newsgroups.borland.com... > I've convinced myself that defining child controls the represent > the child dialogs is not built into the Win32 API. Was I looking > for something this is impossible? Is such a thing not useful?
Technical Details
Message-ID:
<3e6a6387$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!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>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-08 13:47:57 PST From: "Remy Lebeau \(TeamB\)" <gambit47@yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <3e6a26f6@newsgroups.borland.com> Subject: Re: Create a tab control with nativeapi Date: Sat, 8 Mar 2003 13:50:29 -0800 Lines: 30 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: 207.175.226.26 Message-ID: <3e6a6387$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1047159687 207.175.226.26 (8 Mar 2003 13:41:27 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!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