|
-
Jun 15th, 2002, 08:13 AM
#1
Thread Starter
Addicted Member
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?
-
Jun 15th, 2002, 10:02 AM
#2
Stuck in the 80s
Best way to make a calculator or best way to restrict the EditBox?
-
Jun 15th, 2002, 10:53 AM
#3
Thread Starter
Addicted Member
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
-
Jun 17th, 2002, 08:40 AM
#4
Thread Starter
Addicted Member
-
Jun 17th, 2002, 03:22 PM
#5
Member
Hmmm, I thought someone would have answered this by now. The answer's actually pretty simple:
PHP Code:
SendMessage(GetDlgItem(hWnd, IDC_TEXT), EM_SETLIMITTEXT, (WPARAM) size, 0);
Simply replace hWnd, IDC_TEXT, and size with the parameters that you want.
chilibean
-
Jun 18th, 2002, 10:11 AM
#6
Stuck in the 80s
Originally posted by chilibean
Hmmm, I thought someone would have answered this by now. The answer's actually pretty simple:
PHP Code:
SendMessage(GetDlgItem(hWnd, IDC_TEXT), EM_SETLIMITTEXT, (WPARAM) size, 0);
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
-
Jun 19th, 2002, 11:02 AM
#7
Thread Starter
Addicted Member
-
Jul 2nd, 2002, 05:10 AM
#8
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.
-
Jul 2nd, 2002, 09:02 AM
#9
Thread Starter
Addicted Member
yeah i found that indeed in the Documentation of .NET. Some usefull stuff there, only hard to find...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|