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

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


Setting tabstops in an OCX control?

Dave Tucker -- orca!dtucker@netcom.com
Tuesday, January 09, 1996

I have created an OCX control using the CDK with MSVC 1.52c.  The control 
creates several child CEdit windows and I want to be able to tab between 
them using the the TAB key.  I create the windows using CEdit.Create(..) 
with a WS_TABSTOP style but the tab key moves focus to the next control 
outside my OCX.  How can I trap the tab and set the focus to the next CEdit 
in my control?

Thanks!

------------------------------------------------------------------------  
-----------------------------
Dave Tucker
T.R.A.D.E., Inc.
dtucker@tradeinfo.com
ph. (415) 513-0930 ext. 225
------------------------------------------------------------------------  
-----------------------------

------------------------------------------------------------------------  
-----------------------------
Dave Tucker
T.R.A.D.E., Inc.
dtucker@tradeinfo.com
ph. (415) 513-0930 ext. 225
------------------------------------------------------------------------  
-----------------------------





John & Annette Elsbree -- elsbree@msn.com
Saturday, January 13, 1996

Windows 3.x does not handle nested dialogs (which is essentially what you're 
creating here) properly. You will need to have your OLE control trap the 
WM_KEYDOWN messages for itself, in an override of PreTranslateMessage. When 
you detect the Tab (or Shift+Tab) key, set the focus appropriately.

mfcTeam.m_johnels;	// does not represent Microsoft

----------
From: 	owner-mfc-l@netcom.com on behalf of Dave Tucker
Sent: 	Tuesday, January 09, 1996 9:45 AM
To: 	'MFC Mailing List'
Subject: 	Setting tabstops in an OCX control?

I have created an OCX control using the CDK with MSVC 1.52c.  The control 
creates several child CEdit windows and I want to be able to tab between 
them using the the TAB key.  I create the windows using CEdit.Create(..) 
with a WS_TABSTOP style but the tab key moves focus to the next control 
outside my OCX.  How can I trap the tab and set the focus to the next CEdit 
in my control?




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