Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Help for using Tab control

tropfen
New Contributor I
691 Views
Hello,

I am using IVF 9.0 on MS VS 2003 in combination with XFT/Xeffort. I would like to add an Tab control including two tabs. One should have an listview control on its page, the second an CTS_ownerdraw control. I cant find the right code to create an access to both. What do I have to do?

Thanks in advance

Frank
0 Kudos
1 Reply
Jugoslav_Dujic
Valued Contributor II
691 Views
Well, LVTest sample mostly does that; note that both listview controls are drawn in the main dialog already (but obscured by the tab control) -- they will appear if you change Format/Tab order.

Note, however, that this sample uses the feature of the tab controls to automatically resize its "child" controls to fit the tab area. That is suitable if you want to have only one control on each tab, occupying entire area.

A more common (slightly more complicated) approach is to design two (or more) child dialogs, and place controls on them as desired. Then, launch those two dialogs as modeless and hidden, with main dialog as the parent, and assign them to the Tab control's tabs. Then, you can do XModalDialog for the parent dialog.

Owner-drawn static controls can be created in run-time using XCtlCreate. In the VS resource editor, "Owner drawn" is not available for all types of controls; simple "static controls" need a manual tweak in .rc file. See the remarks on "DLG_DRAWITEM" in Xeffort help.

HTH,
Jugoslav
0 Kudos
Reply