
How to get PreTranslateAccelerator called in composite control
Greetings,
First, in which container is the control sitting ?
I have found several major bugs with VB6 and the focus/tab management :
( :(
Did you tried to override the GetControlInfo and the
TranslateAccelerator methods ?
Make them return E_NOTIMPL and manage the tab key in a
standard WM_KEYxxx handler. The handler should be under
an alternate MSG map for your CContained<TabCtrl> object.
Did you checked whether the 'TranslateAccelerator' method is
called or not ?
Are you sure that your control has the input focus ? In some cases, it
can be usefull to override the myControl::onsetfocus to make it
explicitly set the focus to the contained control.
Hope it helps
FReD
Quote:
> Hi,
> I created an ATL composite control on which I placed the tabctl32.ocx
> control. This control fills the entire composite control. To make a
long
> story short, the control contains several other dialogs and each of
the
> dialogs has edit boxes, buttons, drop-downs, etc., on them.
> I need the tab key to function in the control so that it will move the
> user to the next control as it does in normal MFC dialogs; however,
this
> does not happen.
> I found a reference to a method which should perform this
functionality
> in the Microsoft Systems Journal article "Extending ATL 3.0 Control
> Containment to Help You Write Real-world Containers". Their method is
to
> override "PreTranslateAccelerator" in the composite control class and
> iterate through the contained controls with the functionality of the
> overridden PreTranslateAccelerator. However, I have determined that my
> override of PreTranslateAccelerator is never called.
> Is there any means that I may use to get the control to call
> PreTranslateAccelerator?
> All the best,
> Matthew
Sent via Deja.com
http://www.deja.com/