用'showwindow'绘制问题。 [英] Drawing problem with 'showwindow'.

查看:70
本文介绍了用'showwindow'绘制问题。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。



我正在尝试使用'自定义控件'创建'ComboBox'。



它配置了'Button'和'ListBox'控件。



当我点击按钮显示'ListBox'时,问题是它绘制的内容控制在哪里发生'ListBox'。



点击按钮的代码如下:

m_pwndLB-> ShowWindow(SW_SHOW);

m_pwndLB-> SetFocus();



在这种情况下,移动滚动条或选择项目,问题就消失了。



所以,当我点击按钮时,我想要正常绘制'ListBox'。



请指教我。



谢谢。



我尝试了什么:



我使用配置了'Button'和'ListBox'控件的自定义控件制作'ComboBox'。

解决方案

< blockquote>你需要调用 UpdateWindow 功能(Windows) [ ShowWindow 之后的.aspxtarget =_ blanktitle =New Window> ^ ],以便绘制控件。

Hi all.

I'm trying to create 'ComboBox' by using 'Custom control'.

It configured with 'Button' and 'ListBox' controls.

When I click the button to show 'ListBox', problem what it draws controls where under the 'ListBox' happened.

The code which the button clicked is as following..
m_pwndLB->ShowWindow(SW_SHOW);
m_pwndLB->SetFocus();

In this situation, move scrollbar or select item, problem is gone.

So, I want to draw 'ListBox' normaly when I click the button.

Please advise me.

thank you.

What I have tried:

I made 'ComboBox' using custom control which configured with 'Button' and 'ListBox' controls.

解决方案

You need to call the UpdateWindow function (Windows)[^] immediately after ShowWindow, in order to get the control(s) painted.


这篇关于用'showwindow'绘制问题。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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