CEF3(Chromium Embedded Framework) 搜狗输入法文本提示在左上角

Tyler926464 2015-01-27 04:50:37
CEF3(Chromium Embedded Framework)

费了好大劲,终于把CEF3嵌入到了MFC窗口中,像WebView那样的效果.

可是做好后发现一个很奇怪的问题,在Web中使用输入法打字时,

输入法提示跑到了Web窗口的左上角去了,如下图



这是个很奇葩的问题,我试了一下CEF3官方的两个Demo,发现他们也有同样的问题.

然后,我又试了一下CEF1的官方Demo,和我之前用CEF1做的例子.

结果发现CEF1是正常的.

于是开始到网上,苦苦寻找答案. Baidu,Google 键盘都敲烂了

居然没有发现一篇相关的文章!!!!!

于是到CSDN来寻找有相关经验的前辈,求抱大腿.

谁能告诉我,这个坑怎么爬出来?
...全文
5050 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
赵4老师 2017-04-28
  • 打赏
  • 举报
回复
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 X Specifies the new x-coordinate of the caret. Y 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. Remarks 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
starytx 2017-04-27
  • 打赏
  • 举报
回复
我也是CEF3嵌入MFC窗口,没发现这现象
honker110 2016-06-27
  • 打赏
  • 举报
回复
http://blog.csdn.net/sunve_163/article/details/49994487
xiaoxiaodabing 2015-11-14
  • 打赏
  • 举报
回复
这个bug楼主解决了没有?
yigezihao 2015-02-27
  • 打赏
  • 举报
回复
不知道楼主解决了没有,如果解决,可否告知解决方案?
Tyler926464 2015-01-28
  • 打赏
  • 举报
回复
引用 1 楼 skyxie 的回复:
没玩过CEF嵌入MFC窗口。 猜想是窗口属性造成的?是否有某个窗口的大小为0? 你用spy++ 对比下CEF3 (有问题的)和CEF1(没问题的)的窗口层次、大小等属性
看过,他们的窗口结构不一样,CEF3的浏览器页面窗口层下还多一个Static窗口
skyxie 2015-01-27
  • 打赏
  • 举报
回复
没玩过CEF嵌入MFC窗口。 猜想是窗口属性造成的?是否有某个窗口的大小为0? 你用spy++ 对比下CEF3 (有问题的)和CEF1(没问题的)的窗口层次、大小等属性

3,055

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC HTML/XML
社区管理员
  • HTML/XML社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧