VincentWei / MiniGUI

A modern and mature cross-platform window system for embedded systems and smart IoT devices.
http://www.minigui.com
GNU General Public License v3.0
695 stars 157 forks source link

窗口透明属性导致双缓冲功能失效问题 #78

Open ren93 opened 3 years ago

ren93 commented 3 years ago

你好,有个问题请教下

我创建了一个带双缓冲属性的窗口

然后为了让这个窗口透明,我设置了透明属性

SetWindowBkColor(hwnd, RGBA2Pixel(HDC_SCREEN, 0,0,0,0));

但是设置了这个透明属性以后,双缓冲失效了,请问下是什么原因?有什么解决办法?

VincentWei commented 3 years ago

I think it is caused by the transparent alpha component, the old content can not be erased by the new content.

You can call SetSecondaryDC() function to specify a function implemented by yourself as the callback to update the content in your secondary DC to the screen.

ren93 commented 3 years ago

我刚接触minigui嵌入式开发,版本是minigui3.0 能说下具体怎么做吗?非常感谢!

htk719809837 commented 2 years ago

92 可以看看这个,或许有点帮助