积极答复者
IE9页面窗口子类化后的重绘问题

问题
-
大致过程是:
获取显示网页的窗口,类名为:Internet Explorer_Server
然后窗口子类化截取WM_PAINT消息,选调用CallWindowProc让IE先画,然后我再在IE画好的基础上画一些额外的东西
大致代码:C/C++ code
-
LRESULT CALLBACK NewWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { LRESULT lRes = CallWindowProc(g_fnOld, hwnd, uMsg, wParam, lParam); if ( uMsg == WM_PAINT ) { hdc = GetDC(hWnd); // 在此画我自己额外的东西 ReleaseDC(hWnd, hdc); return 0; } }
这样写在IE6/7/8都没有问题,但是在IE9中感觉我一画上去就被擦除了。不知道为什么?
按道理,只要涉及到绘制界面的操作都会走这个消息,然后我始终都可以画的上呀。
不明白。 -
答案
-
IE9换了Direct3D,
The following is signature, not part of post
Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
Visual C++ MVP- 已标记为答案 spyinsky 2011年5月4日 15:46
全部回复
-
IE9换了Direct3D,
The following is signature, not part of post
Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
Visual C++ MVP- 已标记为答案 spyinsky 2011年5月4日 15:46
-
要标注的话,自己加HTML或者用IHighlightRenderingServices
The following is signature, not part of post
Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
Visual C++ MVP -
不行,IE9没有用GDI,所以不会有WM_PAINT。
The following is signature, not part of post
Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
Visual C++ MVP