Splash screen appears when Win32 window is scaled

Source: Internet
Author: User
Tags win32 window

Today, I had no intention of discovering a gadget that was written before. In the Zoom window, there is a splash screen, there are two main positions:

    1. A splash screen on the toolbar

    2. A splash screen appears in the Control Panel on the right (this control panel is combined with a multilayer component)

Did not notice this problem before, usually is maximized/restore window, no Zoom window, so did not find such a problem.

Search the Web and find some solutions:

[Baidu Library] VC window Flashing problem Resolution-http://wenku.baidu.com/view/3c7e747931b765ce0508146a.html

The problem I encountered was in the 2nd situation:

Reason two: Complex interface has a multi-layered window composition, when Windows changes the size of the window is the first time to redraw the parent window, and then redraw the child window, the Child parent window redraw process generally cannot be completed within a refresh period, so it will appear flashing.  We know that the part of the parent window that is blocked by the quilt window doesn't have to be redrawn: Add a style ws_clipchildren to the window so that the part of the parent window that is blocked by the quilt window is not redrawn. If there is overlap between sibling windows, then you need to add ws_clipsiblings style

I add a dwstyle to the related code that creates the main window: ws_clipchildren

Solved the splash screen of the official.

Today also found a new dwexstyle:ws_ex_composited (XP under what double-buffered drawing mechanism)

Related to the introduction:

Http://www.cppblog.com/xfpl-at-hotmail-dot-com/archive/2009/10/10/98261.html?opt=admin

Http://blog.sina.com.cn/s/blog_874559b70100thqy.html

I am in a multi-level control of the parent window, is actually a similar Java jpanel on, set dwexstyle:ws_ex_composited

It is possible to resolve the splash screen caused by the control redraw in the JPanel when zooming the window.

However, when I assigned this to a picture of the panel, I found that although the picture is completely resolved to redraw the problem of the splash screen, but the computer CPU occupied up to 50%.

There seems to be a price to pay for this dwexstyle:ws_ex_composited.

2014-01-11

Splash screen appears when Win32 window is scaled

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.