-
October 4th, 2012, 09:33 PM
#1
[Question] How to get Data from Edit Class
I Have two questions Regarding to Edit Class :
Q1: If I want to input only integer Number to Edit Class. how can I Prevent user to input characters to Edit Class
Q2 : How can I get data Input to Edit_Class
Simply my Application is to create Edit_Classes to Let user provide the application Numbers
Thanks & Regards
-
October 5th, 2012, 01:20 AM
#2
Re: [Question] How to get Data from Edit Class
Handle WM_CHAR message and check if the inputted character is a digit or not.
You should also handle the case of a negative numbers if they are allowed: it means that the "minus" is allowed only as the first symbol in the control.
Victor Nijegorodov
-
October 5th, 2012, 08:21 AM
#3
Re: [Question] How to get Data from Edit Class
Originally Posted by mecheil.edwar
I Have two questions Regarding to Edit Class :
Q1: If I want to input only integer Number to Edit Class. how can I Prevent user to input characters to Edit Class
Q2 : How can I get data Input to Edit_Class
Simply my Application is to create Edit_Classes to Let user provide the application Numbers
Thanks & Regards
A1: ES_NUMBER
A2: GetDlgItemInt
Best regards,
Igor
-
October 9th, 2012, 02:10 AM
#4
Re: [Question] How to get Data from Edit Class
Only handling WM_CHAR is most likely not enough, you will also have to handle WM_PASTE.
-
October 9th, 2012, 02:57 AM
#5
Re: [Question] How to get Data from Edit Class
Thanks to all for their effective replies,
But still I have problem to get Real Number (as Example 23.334)
If I can get any sample Example It will be better to clear using concpet
My Best Regards to all
-
October 9th, 2012, 03:26 AM
#6
Re: [Question] How to get Data from Edit Class
-
October 19th, 2012, 04:50 AM
#7
Re: [Question] How to get Data from Edit Class
Thanks for VictorN , Igor and Marc for their answers ,
I have other question , If I add Edit Class inside Dialog Class ,
I found that WM_CHAR message is not working ,
How I can get WM_CHAR Message from Dialog class to control char from dialog Box
My Best Regards
-
October 19th, 2012, 07:23 AM
#8
Re: [Question] How to get Data from Edit Class
Victor Nijegorodov
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
|