Thread View: borland.public.cppbuilder.nativeapi
2 messages
2 total messages
Started by Gary Setter
Sat, 08 Mar 2003 17:11
Create a tab control with nativeapi
Author: Gary Setter
Date: Sat, 08 Mar 2003 17:11
Date: Sat, 08 Mar 2003 17:11
12 lines
1639 bytes
1639 bytes
Hi, I want to create a dialog with a tab control (SysTabControl32). I want to write to the native win32. I've looked at property pages and propertysheets. I'm puzzled that selectable pages aren't as easy as defining a child dialog for each page and a container popup dialog. The container dialog would have any buttons/ static text that apply to all pages, the tab control and child controls that represent the child dialogs. 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?
Re: Create a tab control with nativeapi
Author: 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?
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads