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

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


Problems with TabCtrl Pages...

Mercea Mario -- mario@edc.sorostm.ro
Sunday, October 06, 1996

Environment: VC++ 4.0, Win95

   I have an Dialog Based App. with TabCtrl Pages in it, if I
set the focus to a ListCtrl from a Page, and I press ESC, the
current Page from TabCtrl is cleared, and all the controls
from the page disappears...

Please, if someone could tell me what can cause this thing to
happen...

					Thanks.

--

|\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/|
|    Mario Mercea                        |
| -------------------------------------- |
|    E-Mail: mario@edc.sorostm.ro        |
|   FAX/BBS: +40-(0)56-133423            |
|/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\|





GoroKhM1 -- gorokhm1@SMTP.ATG-NET.COM
Monday, October 07, 1996

[Mini-digest: 4 responses]

In your derived class add:

void CMyDlg::OnCancel()
{
  // Do nothing.
  // _NOT_ to call CDialog::OnCancel() with EndDialog().
}

MarkG.


______________________________ Reply Separator _________________________________
Subject: Problems with TabCtrl Pages...
Author:  mfc-l@netcom.com at INTERNET
Date:    10/7/96 1:01 PM


Environment: VC++ 4.0, Win95
     
   I have an Dialog Based App. with TabCtrl Pages in it, if I
set the focus to a ListCtrl from a Page, and I press ESC, the 
current Page from TabCtrl is cleared, and all the controls 
from the page disappears...
     
Please, if someone could tell me what can cause this thing to 
happen...
     
     Thanks.
     
--
     
|\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/| 
|    Mario Mercea                        | 
| -------------------------------------- | 
|    E-Mail: mario@edc.sorostm.ro        | 
|   FAX/BBS: +40-(0)56-133423            | 
|/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\|
     
     

-----From: "Quang Ngo" 

Mario,

Try overriding OnOK() and OnCancel() from your tabpage and put
nothing in them, like:

void CMyPage::OnOK()
	{
	// Do nothing
	}

void CMyPage::OnCancel()
	{
	// Do nothing
	}

Good luck,
-Quang


-----From: antony@cauchy.miel.mot.com (ANTONISAMY A[MIEL])

Hi Mario Mercea,
	I think you have pasted a child dialog onto the tabs of the
	TabCtrl... If so OnOK and OnCancel gets called when you
	press RETURN or ESC key when the dialog has got focus.
	The default processing of OnOK or OnCancel is to unpop the
	dialog.... and so this disappearing pages. To avoid this
	one possible soultion is to override OnOK and OnCancel and
	do nothing in it (dont even call the default processing).

	Hope this helps.

regards & bye
- Antony

--------------------------------------------------------------------------------
Antonisamy A.                           Phone : +91 (80) 5598615
Motorola India Electronics Ltd.           Fax : +91 (80) 5598660
"The Senate"                           E-Mail : antonisamy@pobox.com
No 33A, Ulsoor Road,                            aasamy@pobox.com
Bangalore - 560 042.

              o    o    o    o    o    o    o    o
               \_o, \_o, \_o, \_o, \_o, \_o, \_o, \_o,
           _____\/)__\/)__\/)__\/)__\/)__\/)__\/)__\/)_____
        ~~~~~~~~~o~~~~o~~~~o~~~~o~~~~o~~~~o~~~~o~~~~o~~~~~~~~~
   
--------------------------------------------------------------------------------

-----From: "C.Zhang" 

Mercea Mario wrote:
> 
> Environment: VC++ 4.0, Win95
The ESC key is probably translated into Cancel message. Check your
accelerator table to see if it is the case.

[Moderator's note: I thought this was done without the accelerator table.]

> 
>    I have an Dialog Based App. with TabCtrl Pages in it, if I
> set the focus to a ListCtrl from a Page, and I press ESC, the
> current Page from TabCtrl is cleared, and all the controls
> from the page disappears...
> 
> Please, if someone could tell me what can cause this thing to
> happen...
> 
>                                         Thanks.
> 
> --
> 
> |\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/|
> |    Mario Mercea                        |
> | -------------------------------------- |
> |    E-Mail: mario@edc.sorostm.ro        |
> |   FAX/BBS: +40-(0)56-133423            |
> |/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\|




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