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

C / C++ / MFC

 
AnswerRe: List control view and button MFC vc++ Pin
Victor Nijegorodov23-Sep-19 7:02
Victor Nijegorodov23-Sep-19 7:02 
GeneralRe: List control view and button MFC vc++ Pin
Member 1457555623-Sep-19 7:18
Member 1457555623-Sep-19 7:18 
GeneralRe: List control view and button MFC vc++ Pin
Victor Nijegorodov23-Sep-19 7:55
Victor Nijegorodov23-Sep-19 7:55 
GeneralRe: List control view and button MFC vc++ Pin
Member 1457555623-Sep-19 8:00
Member 1457555623-Sep-19 8:00 
QuestionHow to validate input entered in Edit control MFC vc++ Pin
Member 1457555623-Sep-19 1:15
Member 1457555623-Sep-19 1:15 
AnswerRe: How to validate input entered in Edit control MFC vc++ Pin
_Flaviu23-Sep-19 3:22
_Flaviu23-Sep-19 3:22 
GeneralRe: How to validate input entered in Edit control MFC vc++ Pin
Member 1457555623-Sep-19 6:25
Member 1457555623-Sep-19 6:25 
AnswerRe: How to validate input entered in Edit control MFC vc++ Pin
Maximilien23-Sep-19 3:32
Maximilien23-Sep-19 3:32 
There are 2 schools of thought on how to do it.
  1. Do it "live" as the user types in value (mostly with the EN_CHANGE message); each time the user types something, use GetWindowText and start searching the Database; this is somewhat complicated as the search can take a long time compared to the speed the user types (you would need some way to stop the current search and start a new one each time a new character is typed in); warn the user with visual feedback (red highlights while the input is not valid.
  2. Do it when the user clicks on the "ok" (or "search") button; on the OnOK (or "search") , get the full string with GetWindowText and do some validation and search the Database; easier to implement, you can just wait for the whole search to be done and warn user after with a simple SetWindowText to your static control (or edit control) that will display the error.
Personally, I would do "2" it is simpler and quicker (unless there is a requirement to do live input validation).
I'd rather be phishing!

GeneralRe: How to validate input entered in Edit control MFC vc++ Pin
Member 1457555623-Sep-19 6:24
Member 1457555623-Sep-19 6:24 
AnswerRe: How to validate input entered in Edit control MFC vc++ Pin
Victor Nijegorodov23-Sep-19 3:39
Victor Nijegorodov23-Sep-19 3:39 
GeneralRe: How to validate input entered in Edit control MFC vc++ Pin
Member 1457555623-Sep-19 6:29
Member 1457555623-Sep-19 6:29 
Questionpdf995.ini in Program Files (x86) Pin
Erich Ruth19-Sep-19 9:24
Erich Ruth19-Sep-19 9:24 
AnswerRe: pdf995.ini in Program Files (x86) Pin
Victor Nijegorodov19-Sep-19 10:06
Victor Nijegorodov19-Sep-19 10:06 
AnswerRe: pdf995.ini in Program Files (x86) Pin
Gerry Schmitz19-Sep-19 12:21
mveGerry Schmitz19-Sep-19 12:21 
SuggestionRe: pdf995.ini in Program Files (x86) Pin
David Crow20-Sep-19 9:13
David Crow20-Sep-19 9:13 
AnswerRe: pdf995.ini in Program Files (x86) Pin
Richard MacCutchan20-Sep-19 21:04
mveRichard MacCutchan20-Sep-19 21:04 
QuestionMFC VC++ Repopulating the ClistCtrl after database is updated through dialog Pin
Member 1457555618-Sep-19 20:22
Member 1457555618-Sep-19 20:22 
SuggestionRe: MFC VC++ Repopulating the ClistCtrl after database is updated through dialog Pin
Richard MacCutchan18-Sep-19 20:57
mveRichard MacCutchan18-Sep-19 20:57 
GeneralRe: MFC VC++ Repopulating the ClistCtrl after database is updated through dialog Pin
Member 1457555619-Sep-19 3:00
Member 1457555619-Sep-19 3:00 
GeneralRe: MFC VC++ Repopulating the ClistCtrl after database is updated through dialog Pin
Richard MacCutchan19-Sep-19 5:24
mveRichard MacCutchan19-Sep-19 5:24 
GeneralRe: MFC VC++ Repopulating the ClistCtrl after database is updated through dialog Pin
Member 1457555619-Sep-19 5:36
Member 1457555619-Sep-19 5:36 
QuestionRe: MFC VC++ Repopulating the ClistCtrl after database is updated through dialog Pin
David Crow19-Sep-19 5:39
David Crow19-Sep-19 5:39 
AnswerRe: MFC VC++ Repopulating the ClistCtrl after database is updated through dialog Pin
Member 1457555619-Sep-19 5:53
Member 1457555619-Sep-19 5:53 
GeneralRe: MFC VC++ Repopulating the ClistCtrl after database is updated through dialog Pin
Richard MacCutchan19-Sep-19 6:09
mveRichard MacCutchan19-Sep-19 6:09 
GeneralRe: MFC VC++ Repopulating the ClistCtrl after database is updated through dialog Pin
Member 1457555619-Sep-19 6:23
Member 1457555619-Sep-19 6:23 

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.