Click here to Skip to main content
14,836,972 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: List control view and button MFC vc++ Pin
Victor Nijegorodov23-Sep-19 7:02
MemberVictor Nijegorodov23-Sep-19 7:02 
GeneralRe: List control view and button MFC vc++ Pin
Member 1457555623-Sep-19 7:18
MemberMember 1457555623-Sep-19 7:18 
GeneralRe: List control view and button MFC vc++ Pin
Victor Nijegorodov23-Sep-19 7:55
MemberVictor Nijegorodov23-Sep-19 7:55 
GeneralRe: List control view and button MFC vc++ Pin
Member 1457555623-Sep-19 8:00
MemberMember 1457555623-Sep-19 8:00 
QuestionHow to validate input entered in Edit control MFC vc++ Pin
Member 1457555623-Sep-19 1:15
MemberMember 1457555623-Sep-19 1:15 
AnswerRe: How to validate input entered in Edit control MFC vc++ Pin
_Flaviu23-Sep-19 3:22
Member_Flaviu23-Sep-19 3:22 
GeneralRe: How to validate input entered in Edit control MFC vc++ Pin
Member 1457555623-Sep-19 6:25
MemberMember 1457555623-Sep-19 6:25 
AnswerRe: How to validate input entered in Edit control MFC vc++ Pin
Maximilien23-Sep-19 3:32
MemberMaximilien23-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
MemberMember 1457555623-Sep-19 6:24 
AnswerRe: How to validate input entered in Edit control MFC vc++ Pin
Victor Nijegorodov23-Sep-19 3:39
MemberVictor Nijegorodov23-Sep-19 3:39 
GeneralRe: How to validate input entered in Edit control MFC vc++ Pin
Member 1457555623-Sep-19 6:29
MemberMember 1457555623-Sep-19 6:29 
Questionpdf995.ini in Program Files (x86) Pin
Erich Ruth19-Sep-19 9:24
MemberErich Ruth19-Sep-19 9:24 
AnswerRe: pdf995.ini in Program Files (x86) Pin
Victor Nijegorodov19-Sep-19 10:06
MemberVictor 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
MemberDavid 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
MemberMember 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
MemberMember 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
MemberMember 1457555619-Sep-19 5:36 
QuestionRe: MFC VC++ Repopulating the ClistCtrl after database is updated through dialog Pin
David Crow19-Sep-19 5:39
MemberDavid Crow19-Sep-19 5:39 
AnswerRe: MFC VC++ Repopulating the ClistCtrl after database is updated through dialog Pin
Member 1457555619-Sep-19 5:53
MemberMember 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
MemberMember 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.