Click here to Skip to main content
15,887,485 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Is exe file aligned in size? Pin
includeh1030-Sep-09 9:37
includeh1030-Sep-09 9:37 
AnswerRe: Is exe file aligned in size? Pin
krmed30-Sep-09 6:02
krmed30-Sep-09 6:02 
GeneralRe: Is exe file aligned in size? Pin
Richard MacCutchan30-Sep-09 6:17
mveRichard MacCutchan30-Sep-09 6:17 
AnswerRe: Is exe file aligned in size? Pin
David Crow30-Sep-09 9:51
David Crow30-Sep-09 9:51 
GeneralRe: Is exe file aligned in size? Pin
krmed1-Oct-09 0:25
krmed1-Oct-09 0:25 
GeneralRe: Is exe file aligned in size? Pin
David Crow1-Oct-09 2:16
David Crow1-Oct-09 2:16 
QuestionComboBox speed issue with XP style Pin
user94130-Sep-09 4:49
user94130-Sep-09 4:49 
QuestionUsing CEdit with ES_NUMBER giving "Please enter a positive integer." followed by exception. Pin
Neil Urquhart30-Sep-09 4:16
Neil Urquhart30-Sep-09 4:16 
Using VC6 & MFC

I have dialog with an edit box for the user to enter an integer number. I have set the number property in the resource sheet (ES_NUMBER) to handle entering numbers. Now everything is fine in that I can enter numbers and catch the new member value in my OnChangeEdit......() function.

However !

If you have say "3" in the edit box and you want to change it to say "4", a legitimate way for the user to do this is to press backspace to delete the "3" character and type "4" to set the new value.

But if you do this I get a message box saying "Please enter a positive integer." on using the backspace key switfly followed by an exception and program crash. Not very elegant !!

I have tried to intercept this with break points in OnChangeEdit or DoDataExchange of the dialog but it never gets there before the message box pops up.

Appart from priseing out the backspace key from the keyboard is there way to get around this ? It looks to my like a glaring whole in the default way MFC works. Other more learned people than me must have hit this plenty of times ?

Neil
AnswerRe: Using CEdit with ES_NUMBER giving "Please enter a positive integer." followed by exception. Pin
sashoalm30-Sep-09 4:29
sashoalm30-Sep-09 4:29 
GeneralRe: Using CEdit with ES_NUMBER giving "Please enter a positive integer." followed by exception. Pin
Neil Urquhart30-Sep-09 4:39
Neil Urquhart30-Sep-09 4:39 
GeneralRe: Using CEdit with ES_NUMBER giving "Please enter a positive integer." followed by exception. Pin
David Crow30-Sep-09 5:43
David Crow30-Sep-09 5:43 
GeneralRe: Using CEdit with ES_NUMBER giving "Please enter a positive integer." followed by exception. Pin
Neil Urquhart30-Sep-09 6:44
Neil Urquhart30-Sep-09 6:44 
AnswerRe: Using CEdit with ES_NUMBER giving "Please enter a positive integer." followed by exception. Pin
David Crow30-Sep-09 6:50
David Crow30-Sep-09 6:50 
GeneralRe: Using CEdit with ES_NUMBER giving "Please enter a positive integer." followed by exception. Pin
Neil Urquhart4-Oct-09 20:59
Neil Urquhart4-Oct-09 20:59 
GeneralRe: Using CEdit with ES_NUMBER giving "Please enter a positive integer." followed by exception. Pin
David Crow5-Oct-09 2:49
David Crow5-Oct-09 2:49 
AnswerRe: Using CEdit with ES_NUMBER giving "Please enter a positive integer." followed by exception. Pin
Neil Urquhart30-Sep-09 5:24
Neil Urquhart30-Sep-09 5:24 
QuestionBarcode generator library Pin
Marc Soleda30-Sep-09 3:23
Marc Soleda30-Sep-09 3:23 
AnswerRe: Barcode generator library Pin
includeh1030-Sep-09 5:14
includeh1030-Sep-09 5:14 
AnswerRe: Barcode generator library Pin
Alan Balkany5-Oct-09 4:34
Alan Balkany5-Oct-09 4:34 
QuestionPure virtual Function ?? Pin
Game-point30-Sep-09 3:21
Game-point30-Sep-09 3:21 
AnswerRe: Pure virtual Function ?? Pin
David Crow30-Sep-09 3:25
David Crow30-Sep-09 3:25 
AnswerRe: Pure virtual Function ?? Pin
CPallini30-Sep-09 7:14
mveCPallini30-Sep-09 7:14 
QuestionHow to know that the programmatically that the current user is logged on through local machine or through Remote session ? Pin
Kushagra Tiwari30-Sep-09 3:10
Kushagra Tiwari30-Sep-09 3:10 
AnswerRe: How to know that the programmatically that the current user is logged on through local machine or through Remote session ? Pin
David Crow30-Sep-09 3:30
David Crow30-Sep-09 3:30 
AnswerRe: How to know that the programmatically that the current user is logged on through local machine or through Remote session ? Pin
kilt30-Sep-09 4:30
kilt30-Sep-09 4:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.