CEF3(Chromium Embedded Framework)费了好大劲,终于把CEF3嵌入到了MFC窗口中,像WebView那样的效果.可是做好后发现一个很奇怪的问题,在Web中使用输入法打字时,输入法提示跑到了Web窗口的左上角去了,如下图这是个很奇葩的问题,我试了一下CEF3官方的两个Demo,发现他们也有同样的问题.然后,我又试了一下CEF1的官方Demo,和我之前用CEF1做的例子.结果发现CEF1是正常的.于是开始到网上,苦苦寻找答案. Baidu,Google 键盘都敲烂了居然没有发现一篇相关的文章!!!!!于是到CSDN来寻找有相关经验的前辈,求抱大腿.谁能告诉我,这个坑怎么爬出来?

解决方案 »

  1.   

    没玩过CEF嵌入MFC窗口。
    猜想是窗口属性造成的?是否有某个窗口的大小为0?
    你用spy++  对比下CEF3 (有问题的)和CEF1(没问题的)的窗口层次、大小等属性
      

  2.   


    看过,他们的窗口结构不一样,CEF3的浏览器页面窗口层下还多一个Static窗口
      

  3.   

    这个bug楼主解决了没有?
      

  4.   

    http://blog.csdn.net/sunve_163/article/details/49994487
      

  5.   

    我也是CEF3嵌入MFC窗口,没发现这现象
      

  6.   

    SetCaretPos
    The SetCaretPos function moves the caret to the specified coordinates. If the window that owns the caret was created with the CS_OWNDC class style, then the specified coordinates are subject to the mapping mode of the device context associated with that window. BOOL SetCaretPos(
      int X,  // horizontal position
      int Y   // vertical position
    );
     
    Parameters

    Specifies the new x-coordinate of the caret. 

    Specifies the new y-coordinate of the caret. 
    Return Values
    If the function succeeds, the return value is nonzero.If the function fails, the return value is zero. To get extended error information, callGetLastError. Res
    SetCaretPos moves the caret whether or not the caret is hidden. The system provides one caret per queue. A window should create a caret only when it has the keyboard focus or is active. The window should destroy the caret before losing the keyboard focus or becoming inactive. A window can set the caret position only if it owns the caret. QuickInfo
      Windows NT: Requires version 3.1 or later.
      Windows: Requires Windows 95 or later.
      Windows CE: Requires version 1.0 or later.
      Header: Declared in winuser.h.
      Import Library: Use user32.lib.See Also
    Carets Overview, Caret Functions, GetCaretPos, HideCaret, ShowCaret