CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    May 1999
    Posts
    327

    how can I create an edit box with : in the box

    I have a dialog box with an edit box for time in the box. I can fix the length of the edit box to 5 characters, but how can I fix a semi-colon within the edit box so that the user can change the hour or the minutes, but she or he can't delete the semicolon. I saw this technique in a ms program where the user inputs the social security number as xxx-xx-xxxx and the user can't delete the dashes.

    I appreciated any type of response, especially an an example as to how to implement this.


  2. #2
    Join Date
    May 1999
    Location
    Atlanta, GA, USA
    Posts
    443

    Re: how can I create an edit box with : in the box

    Hi.

    You have two options.
    1) Use Masked Edit control(?) of ActiveX control.
    2) Derived your own EditBox class and use OnChar().

    Hope for help.
    -Masaaki Onishi-


  3. #3
    Join Date
    Apr 1999
    Posts
    21

    Re: how can I create an edit box with : in the box

    Hi, you should take a look to CodeGuru-Edit control section, there you'll find a lot of good example how to do it.

    Fabian


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured