看不见的CButton,直到按下? [英] Invisible CButton until pressed?

查看:89
本文介绍了看不见的CButton,直到按下?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


有关如何执行此操作的任何想法?

我的想法是创建一个CDialog,加载一个bmp图像来填充整个对话框.此bmp图像将是我的程序的外观.图片将包含按钮.在这里,我将创建一个CButton owner-draw-class,其中在按下按钮时会在该区域显示一个新图片.当不再按下按钮时,CButton应该是透明的/不可见的.

这是我的问题的最后一部分.我不知道如何从cbutton恢复/重画对话框的bmp图像.有什么想法吗?

此致
Ole

Hi
Any ideas on how to do that?

My idea was to create an CDialog, load an bmp-image that fills the whole dialog. This bmp-image would be how my program should look like. The picture would contain buttons. Here i will make an CButton owner-draw-class where i show a new picture (on that area) when the button is pressed. When the button is no longer pressed, the CButton should be transperant/invisible.

It is the last part that is my problem. I dont know how to restore/redraw the dialog''s bmp-image from the cbutton. Any ideas?

Kind regards
Ole

推荐答案

没关系,我只是复制了原始背景并在按钮不可见时显示该背景.喜欢:

透明列表框 [
Never mind, I just copied the original background and display that when the button should be invisible. Like:

Transparent ListBox[^]

I would just be smarter if I could get the parent-window (the dialog) to redraw the area where the button is placed... without the button getting a redraw-command.

Kind regards

Ole


这篇关于看不见的CButton,直到按下?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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