none
Not getting WM_ACTIVATE message for IME(Input Method Editor) window RRS feed

  • Question

  • Hi,
    I need help for Input Method Editor (IME) windows.......
    I am developing an application to subclass an container window of Internet explorer 8.0......
    1) I am getting the container window(IOleWindow) from IOleClientSite interface pointer through QueryInterface.......
    2) I have sub-classed the container window procedure to call my window procedure and saved the actual window procedure....This is successful.....I have sub-classed the container window procedure to monitor the container window...For example: if container window is minimized I will take some action in my application
    3) My window procedure is called successfully and I will call the actual window procedure.
    4) I have analyzed the few messages WM_IME_SETCONTEXT, WM_IME_NOTIFY and so on. From these messages I came to know that container window is a IME window.
    there are two problems
    a) I am getting WM_ACTIVATE message. If I get this message I check whether window is minimized or not using the function IsIconic(). Question is why I am not getting WM_ACTIVATE message
    b) As per the MSDN, For WM_IME_SETCONTEXT message wParam indicates whether window is active or not. If wParam is 0 window is not active. I am getting  WM_IME_SETCONTEXT with wParam as 0 when i minimize the window. When I check for IsIconic(), IsIconic() returns true even though window is minimized.....
    Could you please help me to solve above two problems......
    Thanks & Regards,
    Ramanujam
    Friday, November 4, 2011 4:14 PM

Answers

  • Thanks for your information. Its a very nice information... :)

    I am getting WM_IME_SETCONTEXT, and WM_IME_NOTIFY in a container window procedure which is a child window of a Internet Explorer. When I get WM_IME_SETCONTEXT message with wParam as 0 and If I check IsIconic() within container window procedure, IsIconic() will say window is not minimized eventhough parent Internet Explorer window is Minimized.....

    Please help me...

    Thanks & Regards,

    Ramanujam

     


    Tuesday, November 8, 2011 5:07 AM

All replies

  • Hello,

     

    For security limit, only five message you can used in windows procedure function, they are:

    • WM_NCCREATE

    • WM_PAINT

    • WM_COMMAND

    • WM_SETFOCUS

    • WM_KILLFOCUS

     

    So that you cannot get the WM_ACTIVATE and WM_IME_SETCONTEXT, WM_IME_NOTIFY message.

     

    For more information, you can see the Window Procedure section in this document:

    Creating Custom Explorer Bars, Tool Bands, and Desk Bands

     

    I hope my suggestions can help you to solve this problem.

     

    Best regards,

    Jesse


    Jesse Jiang [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Monday, November 7, 2011 10:56 AM
    Moderator
  • Thanks for your information. Its a very nice information... :)

    I am getting WM_IME_SETCONTEXT, and WM_IME_NOTIFY in a container window procedure which is a child window of a Internet Explorer. When I get WM_IME_SETCONTEXT message with wParam as 0 and If I check IsIconic() within container window procedure, IsIconic() will say window is not minimized eventhough parent Internet Explorer window is Minimized.....

    Please help me...

    Thanks & Regards,

    Ramanujam

     


    Tuesday, November 8, 2011 5:07 AM
  • You won't get the OnActivate nor will the WM_IME_SETCONTEXT work if COM was initialized in Multithreaded mode.  Use CoInitialize(NULL);
    Tuesday, August 13, 2019 3:58 PM