How to get PreTranslateAccelerator called in composite control 
Author Message
 How to get PreTranslateAccelerator called in composite control

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



Wed, 25 Jun 2003 05:53:56 GMT  
 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/


Sat, 28 Jun 2003 01:37:12 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. A composite control calling another composite control in web browser

2. InPlaceActivate is not getting called for a Composite control (for a MFC client)

3. Getting the HWND of a child control of a composite control

4. Composite control hosted by a composite control.

5. Composite Control - why GetControlInfo is not called?

6. ATL Composite Control - GetControlInfo not called!

7. Using Rich Edit Control or ip address control in a composite control

8. Get an Item.ItemIndex of controls other than supporting CommandName inside composite controls

9. ATL Full Control - mouse activation problems in Composite Control

10. How to enumerate every control in a composite Control

11. ATL Full Control - mouse activation problems in Composite Control

12. Problem with Composite Control containing a Full Control

 

 
Powered by phpBB® Forum Software