Results 1 to 9 of 9

Thread: Restricting the amount of chars in a textbox.

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Dec 2001
    Location
    Guess....i have wooden shoes, in my free time i sell tulips and I live in a huge windmill...
    Posts
    176

    Restricting the amount of chars in a textbox.

    I'm making a simple calculator in VC++.net (i don't compile .NET code though). What would be the best way to do this?
    JpEgy

  2. #2
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Best way to make a calculator or best way to restrict the EditBox?
    My evil laugh has a squeak in it.

    kristopherwilson.com

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Dec 2001
    Location
    Guess....i have wooden shoes, in my free time i sell tulips and I live in a huge windmill...
    Posts
    176
    The editbox yes. I made the dialog and the textbox in the Visual C++ IDE, so it's not plain API.
    Last edited by JpEgy; Jun 15th, 2002 at 06:37 PM.
    JpEgy

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Dec 2001
    Location
    Guess....i have wooden shoes, in my free time i sell tulips and I live in a huge windmill...
    Posts
    176
    Anyone?
    JpEgy

  5. #5
    Member
    Join Date
    Feb 2001
    Posts
    57
    Hmmm, I thought someone would have answered this by now. The answer's actually pretty simple:

    PHP Code:
     SendMessage(GetDlgItem(hWndIDC_TEXT), EM_SETLIMITTEXT, (WPARAMsize0); 
    Simply replace hWnd, IDC_TEXT, and size with the parameters that you want.


    chilibean

  6. #6
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    Originally posted by chilibean
    Hmmm, I thought someone would have answered this by now. The answer's actually pretty simple:

    PHP Code:
     SendMessage(GetDlgItem(hWndIDC_TEXT), EM_SETLIMITTEXT, (WPARAMsize0); 
    Simply replace hWnd, IDC_TEXT, and size with the parameters that you want.


    chilibean
    I searched for that for like an hour in the API Viewer but never found it
    My evil laugh has a squeak in it.

    kristopherwilson.com

  7. #7

    Thread Starter
    Addicted Member
    Join Date
    Dec 2001
    Location
    Guess....i have wooden shoes, in my free time i sell tulips and I live in a huge windmill...
    Posts
    176
    hehehe me too :S
    JpEgy

  8. #8
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Because it's no function, it's a message. You better search the edit box reference of MSN.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Dec 2001
    Location
    Guess....i have wooden shoes, in my free time i sell tulips and I live in a huge windmill...
    Posts
    176
    yeah i found that indeed in the Documentation of .NET. Some usefull stuff there, only hard to find...
    JpEgy

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