Keyboard input in an ATL ActiveX control?

Posted on 2006-04-12
Last Modified: 2012-06-27
How do I recieve keyboard input in an ATL activeX control?

I've created a basic windowed control and when I watch it with Spy++ it never recieves an event as I type (I see wm_mousemove but never any keyboard related ones).  If it doesn't recieve an event there is nothing to trap.  I suspect that all the key presses are going to the parent (Internet Explorer in this case) but how do I intercept them?
Question by:jvoros1
    LVL 2

    Accepted Solution

    I dont know about  ATL activeX control but to capture the keystrokes you can use hooks.

    if not possible not accurate but approximate way is to use

    Author Comment

    No, I don't think thats what I'm looking for.  Thanks though.  I'm told I have to implement IOleInPlaceActiveObject::TranslateAccelerator but I can't seem to figure out how to do that.

    Featured Post

    Highfive + Dolby Voice = No More Audio Complaints!

    Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

    Join & Write a Comment

    IntroductionThis article is the second in a three part article series on the Visual Studio 2008 Debugger.  It provides tips in setting and using breakpoints. If not familiar with this debugger, you can find a basic introduction in the EE article loc…
    Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
    The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
    The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.

    730 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now