有谁能帮我的忙?给MaskEditBox增加一个得到焦点和失去焦点的事件?

laozhuang 2000-07-07 04:23:00
我正在写一个程序,要用到MaskEditBox,但是MaskEditBox本身并没有OnKillFocus和
OnSetFocus这两个事件,我应该如何为它增加一个得到焦点和失去焦点的事件?
急急急!!!
请大家帮帮忙!!!!!!
Email:fj9lihu@sina.com
...全文
88 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
laozhuang 2000-07-07
  • 打赏
  • 举报
回复
谢谢lara!!!您提供给了我一个很好的方法谢谢您!
不过我还想能不能把这个约束控件做成输入金额的控件,
如下所示:
千|百|十|万|千|百|十|元|角|分
# |#|# |# |# |# |# |# |# |#
按人民币大写的方法将小写数字与上面一行的中文一一对应起来,我所用的控件,
是Microsoft所提供的VB中的ActiveX控件MSMASK32.ocx能够做到限制输入的字符
的目的只能输入数字。
请您帮忙是不是可以用您的方法生成一个MSmask的新类来继承它,后再给它新增处理
OnKillFocus和OnSetFocus两个事件呢多谢您的帮助!!!!!!
lara 2000-07-07
  • 打赏
  • 举报
回复
我试了一下,很好用。
我把辕马发到你的信箱了,叫mask.zip
lara 2000-07-07
  • 打赏
  • 举报
回复
做一个新类,从CEdit继承,在新类里田家消息响应函数。
1 , vb5dialog.zipThis demonstrates how to subclass the Common Dialog Dialogs and manipulate a specific Dialog.2 , cpnl.zipForm_Taskbar is a control for Visual Basic which, once placed onto a form, makes the form act like the Taskbar (minus the Start Menu).3 , vbo_progbar.zipImplement a common control progress bar with added features that are not accessable using COMCTL32.OCX! 4 , vbo_infolabel.zipThis control adds a great user-friendly interface with and icon and "Hover" ability. Based on a control seen in ICQ. 5 , vbo_checkcombo.zipAdd a checkbox to a combo box and use it to enabled/disable the combo! or whatever you would like to do with it! 6 , vbo_controlframe.zipCreate your own system button such as a Maximize, Minimize, Close, and many others with ease! 7 , vbo_ctextbox.zipThis class makes using the Textbox or Edit class API simple. Easily set properties and access many features not available directly from VB. 8 , taskbar.zipForm_Taskbar is a control for Visual Basic which, once placed onto a form, makes the form act like the Taskbar (minus the Start Menu).9 , NT_Service.zipThis is an OCX that allows you to create an NT service application...add the control to your project and register it as a service!!10 , Scroller.zipThis is a Control Container, it's like a frame control but it lets you scroll the content up and down...11 , TrayArea.zipThis control lets you add your icon to the System Tray Area and handle some events such as MouseMove, MouseDown, MouseUp and DblClick.12 , Resizer.zipThis is a very useful control: It's a container control, you can insert two controls inside and then you'll have a vertical (or horizontal) resizer bar (like the Windows File Explorer). A resizer can contain another resizer... an so on. (you can divide you form in as many sizable sections as you want...).13 , Label3D.zipTh

16,466

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧