如何在对话框中获取工具栏控件事件? [英] How do I get toolbar control events in my dialog?

查看:71
本文介绍了如何在对话框中获取工具栏控件事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

自从我在MFC中完成此操作已经很长时间了......



我为工具对话框创建了一个自定义工具栏类,我已经使用它了为各种参数添加了一些滑块控件。现在,在对话框中我想知道滑块值何时被更改。我如何参加CSlider活动? (CSlider是CToolbar的孩子,它是CDialog的成员。)



我尝试过:



我试过记住和谷歌搜索:)

解决方案

因此,滑块控件调用工具栏中的OnHScroll - 我只需要重新打包该消息并使用 SendMessage 将其发送到父级(对话框) - 简单! ;)

It's a long time since I've done this in MFC...

I made a custom toolbar class for a tool dialog, to which I've added some slider controls for various parameters. Now, in the dialog I want to know when the slider values are altered. How do I get at the CSlider events? (The CSlider is a child of the CToolbar, which is a member of the CDialog).

What I have tried:

I've tried remembering and Googling :)

解决方案

So, the slider controls call OnHScroll in the toolbar - I simply have to repackage that message and send it on to the parent (the dialog) using SendMessage - easy! ;)


这篇关于如何在对话框中获取工具栏控件事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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