旋转控件中的浮点值. [英] Floating values in Spin Controls.

查看:65
本文介绍了旋转控件中的浮点值.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello techies,

我刚刚在Spin Controls上分配了一个任务,我将它们显示在对话框中并带有浮点值(即:10.23、25.36等),因为这些值会渐隐和递减,所以我使用了UP和向下箭头滚动.

在OnInitDialog()下,我完成了m_spin.SetRange(0.00,100.00); &m_spin.SetPos(1.00);

但是当我要填充原始浮点值并且如果我尝试增加/减少该浮点值时,它不会执行,而是通过刷新浮点值来仅滚动整数值.

请向我建议在自旋控件中滚动填充的float值的过程.

提前谢谢.

Aditz.

Hello techies,

I''ve just got an assignment on Spin Controls, I''ve to display them on the dialog with float values(viz:10.23,25.36 etc), for the values to be increamenting & decrementing I''ve used a UP & DOWN Arrow to scroll.

Under OnInitDialog() I ve done m_spin.SetRange(0.00,100.00) ; & m_spin.SetPos(1.00);

But when I''ll to populate the original float values and for that float values if I tried to increment/decrement it doesn''t performs, rather it scrolls only the integer values by flushing the float values.

Please suggest me the procedure to scroll the populated float values in the spin control.

Thanks in advance.

Aditz.

推荐答案

您必须自己实现此逻辑,方法是对标准CSpinButtonCtrl [ CNumSpinCtrl-一个简单的数字旋转控件 [
You have to implement this logic yourself, by sub-classing the standard CSpinButtonCtrl[^] control.
This article CNumSpinCtrl - a simple numeric spin control[^] is good example.


这篇关于旋转控件中的浮点值.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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