15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Problems with tab control !

Marian Slastan -- Marian.Slastan@swh.sk
Wednesday, October 30, 1996

Environment: VC++ 4.1, Windows NT 4.0

Hi,

I am trying to create a tab control inside a dialog. I created resource
for the dialog including tab control and map it to a class. The problem
is when a TCN_SELCHANGE event occurs I should change the controls
inside the tab control, but I don`t know how. I tried it using a
modeless dialog or form view and it didn`t run corectly (the tab events
were not processed correctly ...).

Does anyone know the answer or did create any dialog I explained over
and whould be so kind and helps me. 

    Thank you,
       Maros Slastan



Steve Mark -- steve@otms.com
Saturday, November 02, 1996

[Mini-digest: 5 responses]

Maros,

I'm a little confused.  Which question(s) are you asking:

1. How to write a handler for a TCN_SELCHANGE message
2. How to change controls within a tab control
3. Why isn't the tab control sending TCN_SELCHANGE messages

Steve


At 01:33 AM 10/30/96 +0100, you wrote:
>Environment: VC++ 4.1, Windows NT 4.0
>
>Hi,
>
>I am trying to create a tab control inside a dialog. I created resource
>for the dialog including tab control and map it to a class. The problem
>is when a TCN_SELCHANGE event occurs I should change the controls
>inside the tab control, but I don`t know how. I tried it using a
>modeless dialog or form view and it didn`t run corectly (the tab events
>were not processed correctly ...).
>
>Does anyone know the answer or did create any dialog I explained over
>and whould be so kind and helps me. 
>
>    Thank you,
>       Maros Slastan
>
>
_________________________________________
Steven Mark
Principal Consultant, On-The-Mark Systems
(510) 648-9514             steve@otms.com
-----From: "David Lantsman" 

In the handler of TCN_SELCHANGE write something like this:

pControl->ShowWindow(pTabControl->GetCurSel() == 0 ? SW_SHOW | SW_HIDE);

for all the controls you need to display on the first page (n. 0) and so on
with the other pages and controls.

=======================================
     Sent by David Lantsman
         mailto:davidlan@luckynet.co.il

Visit me at: http://www.luckynet.co.il/~davidlan
=======================================

-----From: Mike Blaszczak 

There are no controls or dialogs or anything else "in" a tab control
besides tabs.

>Does anyone know the answer or did create any dialog I explained over
>and whould be so kind and helps me. 

DODADS.ZIP contains a dialog which does what you ask.  It's in my book,
and described in detail there.  The sample is also on my web page.

.B ekiM
http://www.nwlink.com/~mikeblas/      <-- trip report central!
95 Honda VFR-750F / 88 Yamaha FZ-700 (damaged) / 94 Mazda RX-7
Serial #00050!    /      AMA - HRC - VFROC     / Wang dang Wankel
  These words are my own - I do not speak on behalf of Microsoft.


-----From: Dong Chen 

I am not sure if I got you right. Seems to me you are trying to switch to a
different set of controls by using the tab control. If so, have you
considered to use property sheet plus property pages instead of the tab
control? That should be much easier for this task. But if you really want to
use tab control, please check out the fire example in the
samples/mfc/advanced/fire subdirectory. I think you need to create the
controls dynamically or do some hiding/showing work to respond the
TCN_SELCHANGE notification message. Good luck.
--
Dong

-----From: Chris Scott 

You can see how to do this at the WWW address listed below in the VC++ Section.

-- 
- Chris Scott
- http://ourworld.compuserve.com/homepages/lurker






| Вернуться в корень Архива |