窗口大小调整时,工具栏按钮会闪烁 [英] Toolbar buttons flicker upon window resize

查看:136
本文介绍了窗口大小调整时,工具栏按钮会闪烁的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试寻找这个问题的答案,但我发现没什么用处......

I tried searching for an answer to this problem, but I found nothing useful....

我使用CreateToolbarEx()API函数创建了一个工具栏。  我使用的样式标志是WS_CHILD,WS_VISIBLE,WS_CLIPSIBLINGS和CCS_TOP。  当出现WM_SIZE消息时,我调用"SendMessage(hToolbar,TB_AUTOSIZE,0,0L)"。  另外,
我的工具栏上有十个按钮,其中包含16x16颜色的位图。

I have created a toolbar using the CreateToolbarEx() API function.  The style flags that I use are WS_CHILD, WS_VISIBLE, WS_CLIPSIBLINGS, and CCS_TOP.  When a WM_SIZE message occurs I call "SendMessage(hToolbar, TB_AUTOSIZE, 0, 0L)".  Also, my toolbar has ten buttons that contain 16x16 color bitmaps.

是否有人知道每当主窗口调整大小时防止轻弹按钮或闪烁工具栏的秘诀? ?

Does anybody know the secret to preventing flicking buttons or the flickering toolbar whenever the main window is resized??

谢谢!

jmmc

推荐答案


http://msdn.microsoft.com/en-us/library/ms940417.aspx

我发现没有使用wParam和lParam,你应该将它们设置为0 。

I found the wParam and lParam were not used, you should set them as 0.

请尝试这样:SendMessage(hToolbar,TB_AUTOSIZE,0,0);

please try like this: SendMessage(hToolbar, TB_AUTOSIZE, 0, 0);


这篇关于窗口大小调整时,工具栏按钮会闪烁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆