CAxWindow flicker in a DHTML control?
-
I've been writing a DHTML control and have noticed it flickers a lot when resized with 'Show window contents while moving/resizing' on. This happens even with the unmodified wizard-generated DHTML control (using vs.net, add atl control, dhtml control). The control works by using CAxWindow as an activex container window and creating a control (IWebBrowser2) inside it. For an example, create the dhtml control with the wizard, compile, then drop the control onto a form in vb/c# and make it fill the form. Then compile that and resize it. Although I've read up a bunch about flicker, I'm not quite sure how I'm supposed to extend or modify CAxWindow to remove this flickering. Any ideas?
-
I've been writing a DHTML control and have noticed it flickers a lot when resized with 'Show window contents while moving/resizing' on. This happens even with the unmodified wizard-generated DHTML control (using vs.net, add atl control, dhtml control). The control works by using CAxWindow as an activex container window and creating a control (IWebBrowser2) inside it. For an example, create the dhtml control with the wizard, compile, then drop the control onto a form in vb/c# and make it fill the form. Then compile that and resize it. Although I've read up a bunch about flicker, I'm not quite sure how I'm supposed to extend or modify CAxWindow to remove this flickering. Any ideas?
I think this is an issue with the DHTML control (MSHTML). I see the same problem in an app I'm working on which uses CHtmlView. Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
-
I've been writing a DHTML control and have noticed it flickers a lot when resized with 'Show window contents while moving/resizing' on. This happens even with the unmodified wizard-generated DHTML control (using vs.net, add atl control, dhtml control). The control works by using CAxWindow as an activex container window and creating a control (IWebBrowser2) inside it. For an example, create the dhtml control with the wizard, compile, then drop the control onto a form in vb/c# and make it fill the form. Then compile that and resize it. Although I've read up a bunch about flicker, I'm not quite sure how I'm supposed to extend or modify CAxWindow to remove this flickering. Any ideas?
not too sure about the WebBrowser activex control, but if you're using CWindow or it's classes, the following can help... Insert a message handler as follows
MESSAGE_HANDLER(WM_ERASEBKGND, OnEraseBackground)
then implement the handler...LRESULT OnEraseBackground(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { return 1; }
Ryan