CEdit style - Programmer

This is a discussion on CEdit style - Programmer ; I need to put decimal numbers into an editbox - I've found a style that only allows numbers, but won't allow a '.' for decimal point. Is there a style for this, or do I code it myself? Steve Ralph...

+ Reply to Thread
Results 1 to 3 of 3

Thread: CEdit style

  1. CEdit style

    I need to put decimal numbers into an editbox - I've found a style that only
    allows numbers, but won't allow a '.' for decimal point. Is there a style
    for
    this, or do I code it myself?

    Steve Ralph



  2. Re: CEdit style

    You have to code it yourself

    void CMyEdit::OnChar(char nChar,.....)
    {
    if (isdigit(nChar) || nChar == '.' || nChar == '-')
    {
    CEdit::OnChar(....);
    }
    }

    Ali R.

    "Steve Ralph" wrote in message
    news:L81wb.11978$lm1.86342@wards.force9.net...
    > I need to put decimal numbers into an editbox - I've found a style that

    only
    > allows numbers, but won't allow a '.' for decimal point. Is there a style
    > for
    > this, or do I code it myself?
    >
    > Steve Ralph
    >
    >




  3. Re: CEdit style

    Thanks Ali R - I was thinking this was probably the case, so you've saved me
    rooting in the docs

    SR
    "Ali R." wrote in message
    news:EBrwb.5139$r42.2716544125@newssvr30.news.prod igy.com...
    > You have to code it yourself
    >
    > void CMyEdit::OnChar(char nChar,.....)
    > {
    > if (isdigit(nChar) || nChar == '.' || nChar == '-')
    > {
    > CEdit::OnChar(....);
    > }
    > }
    >
    > Ali R.
    >
    > "Steve Ralph" wrote in message
    > news:L81wb.11978$lm1.86342@wards.force9.net...
    > > I need to put decimal numbers into an editbox - I've found a style that

    > only
    > > allows numbers, but won't allow a '.' for decimal point. Is there a

    style
    > > for
    > > this, or do I code it myself?
    > >
    > > Steve Ralph
    > >
    > >

    >
    >




+ Reply to Thread