Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Widgets - General questions or Mixed problems » How to block background redrawing in my own widget
Re: How to block background redrawing in my own widget [message #47012 is a reply to message #47007] Fri, 28 October 2016 14:01 Go to previous message
Zbych is currently offline  Zbych
Messages: 326
Registered: July 2009
Senior Member
Thanks for explanation.

Right now I override State(int reason) function from Ctrl and when size or position is changed I call Layout function to set everything:
https://github.com/ultimatepp/mirror/blob/master/bazaar/Chro miumBrowser/ChromiumBrowser.cpp

Windows code responsible for chrome position and size looks like this (flickering visible):
		CefWindowHandle hwnd = handler->GetBrowser()->GetHost()->GetWindowHandle();
		HDWP hdwp = BeginDeferWindowPos(1);
		hdwp = DeferWindowPos(hdwp, hwnd, nullptr, r.left, r.top, r.Width(), r.Height(), SWP_NOZORDER);
		EndDeferWindowPos(hdwp);


Or second version (flickering visible):
		SetWindowPos(hwnd, NULL, r.left, r.top, r.GetWidth(), r.GetHeight(), SWP_NOZORDER);


In third version I disabled it completely, so chrome doesn't change its size when I resize application window, but flickering is still visible.
The funny thing is, that with X11 backend flickering is not visible.

[Updated on: Fri, 28 October 2016 14:28]

Report message to a moderator

 
Read Message
Read Message
Read Message
Previous Topic: Question about Drag and Drop
Next Topic: Incorrect header in ppm.h
Goto Forum:
  


Current Time: Fri May 10 08:48:19 CEST 2024

Total time taken to generate the page: 0.02578 seconds