Re: IOleInPlaceSite::OnUIActivate failing in IE

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Hi Charles

Finally worked out what the problem was here after debugging into IE.
Basically my control class needed to have a data member "m_bEnabled" for the
Enabled stock property. IE seems to require this in order to perform UI
Activation on the control and thus allow the interception of keyboard
messages in TranslateAccelerator.

All this happens in the OnUIActivate function in IE. I have given the stack
trace, when clicking on the control in order to UIActivate it, below for
reference.

Thanks.
Mark

mshtml.dll!COleSite::GetBoolPropertyOnObject() + 0x3d bytes
mshtml.dll!COleSite::IsEnabled() + 0xa bytes
mshtml.dll!CElement::IsFocussable() + 0x61 bytes
mshtml.dll!CElement::BecomeCurrent() + 0x75 bytes
mshtml.dll!COleSite::CClient::OnUIActivate() + 0xf2 bytes
agraphax.dll!ATL::CComControlBase::InPlaceActivate(long iVerb=-4, const
tagRECT * __formal=0x00c929b0) Line 1016 + 0x27 bytes C++
agraphax.dll!ATL::IOleObjectImpl<agraphaxcontrol>::DoVerbUIActivate(const
tagRECT * prcPosRect=0x00c929b0, HWND__ * __formal=0x00200a84) Line 2153 +
0x11 bytes C++
agraphax.dll!ATL::IOleObjectImpl<agraphaxcontrol>::DoVerb(long iVerb=-4,
tagMSG * __formal=0x00000000, IOleClientSite * pActiveSite=0x03e44088,
tagMSG * __formal=0x00000000, HWND__ * hwndParent=0x00200a84, const tagRECT
* lprcPosRect=0x00c929b0) Line 2226 + 0x13 bytes C++
agraphax.dll!ATL::CComControlBase::OnMouseActivate(unsigned int
__formal=33, unsigned int __formal=33, unsigned int __formal=33, int &
bHandled=1) Line 296 + 0x46 bytes C++
agraphax.dll!ATL::CComControl<agraphaxcontrol,ATL::CWindowImpl<agraphaxcontrol,ATL::CWindow,ATL::CWinTraits<1442840576,0>
::ProcessWindowMessage(HWND__ * hWnd=0x00200a84, unsigned int uMsg=33,
unsigned int wParam=788216, long lParam=33619969, long & lResult=-858993460,
unsigned long dwMsgMapID=0) Line 1545 + 0x28 bytes C++
agraphax.dll!agraphaxcontrol::ProcessWindowMessage(HWND__ *
hWnd=0x00200a84, unsigned int uMsg=33, unsigned int wParam=788216, long
lParam=33619969, long & lResult=-858993460, unsigned long dwMsgMapID=0)
Line 124 + 0x1e bytes C++
agraphax.dll!ATL::CWindowImplBaseT<ATL::CWindow,ATL::CWinTraits<1442840576,0>
::WindowProc(HWND__ * hWnd=0x00c929cc, unsigned int uMsg=33, unsigned int
wParam=788216, long lParam=33619969) Line 3073 + 0x27 bytes C++


"Charles Wang[MSFT]" <changliw@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:aSAOMPSdIHA.6844@xxxxxxxxxxxxxxxxxxxxxxxxx
Hi Mark,
Thanks for letting me know of this.

You can use Microsoft public symbol server for further debugging. Please
refer to: www.windbg.org.

Now I just get a response that this seems a known issue and you can refer
to the section "Keyboard and mnemonic handling" in this article:
http://msdn2.microsoft.com/en-us/library/ms974281.aspx

For your reading convenience, I extracted part of the contents here:
"The keyboard support included with normal in-place activation only
provides for handling keystrokes in the currently UI active object.
Although this works great for compound documents, where there's usually
only one in-place active object at one time (which is also UI active), it
doesn't work so well for controls where you have many in-place active
objects in the same form or document that would all like certain
keystrokes
to affect them.

With normal in-place activation, the container will forward any keyboard
message to the currently UI active object via
IOleInPlaceActiveObject::TranslateAccelerator. Normally the object will
handle whatever accelerators it wants, returning to the container a code
that indicates whether processing took place. If the object didn't handle
the message, the container gets a shot."

Hope this helps. If you have any other questions or concerns, please feel
free to let me know.

Best regards,
Charles Wang
Microsoft Online Community Support
=====================================================
When responding to posts, please "Reply to Group" via
your newsreader so that others may learn and benefit
from this issue.
======================================================
This posting is provided "AS IS" with no warranties, and confers no
rights.
======================================================






.



Relevant Pages

  • Re: 1994 Cincinnati Sabre 750 acramatic 850sx keyboard error
    ... I have the keyboard with the raised rubber pushbottons. ... Are you talking about the ribbon cables that attach to the keyboard ... What puzzles me is the fact that after a control ... Seems like you mentioned it to be a 1994 model, that may be why you don't have the ribbon cable type control I was talking about. ...
    (alt.machines.cnc)
  • Re: Value and Text Properties of controls
    ... listbox class object to emulate the actual listbox on the form, ... ran into another bug dealing with listbox selections via keyboard method. ... default error checking stuff on a control by control basis, ... One of the reasons why I put in checks on a control by control basis, ...
    (microsoft.public.access.formscoding)
  • Re: 1994 Cincinnati Sabre 750 acramatic 850sx keyboard error
    ... Its the qwerty keyboard and the machine control panel on the right, ... I have the keyboard with the raised rubber pushbottons. ... Some of the keys were getting sticky so I removed the ...
    (alt.machines.cnc)
  • xmodmap modifier alt/meta/windows beim Umstieg SuSE 9->10 kaputt
    ... Der Dialog Control Center> Regional and Accessibility> Keyboard ...
    (de.comp.os.unix.linux.misc)
  • Re: How can I stop controls from executing default keyboard and mouse behavior?
    ... > acted upon even if the Ctrl keys were also being pressed. ... so that control is badly written. ... not react to the keyboard when they don't have the focus. ... > The general problem is controls executing built-in behavior that I ...
    (alt.comp.lang.borland-delphi)