Click here to Skip to main content
15,917,320 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC and WinHelp. Arghh!!! Pin
PJ Arends28-May-01 10:52
professionalPJ Arends28-May-01 10:52 
GeneralRe: MFC and WinHelp. Arghh!!! Pin
Tomasz Sowinski28-May-01 11:00
Tomasz Sowinski28-May-01 11:00 
GeneralRe: MFC and WinHelp. Arghh!!! Pin
Anders Molin28-May-01 11:00
professionalAnders Molin28-May-01 11:00 
QuestionUse a texture as background? Pin
Rickard Andersson2028-May-01 8:34
Rickard Andersson2028-May-01 8:34 
AnswerRe: Use a texture as background? Pin
Christian Graus28-May-01 11:30
protectorChristian Graus28-May-01 11:30 
AnswerRe: Use a texture as background? Pin
Michael Dunn28-May-01 12:01
sitebuilderMichael Dunn28-May-01 12:01 
AnswerRe: Use a texture as background? Pin
30-May-01 4:24
suss30-May-01 4:24 
GeneralHandling Return Key within Edit Control: Need advise from Seasoned MFC Gurus Pin
28-May-01 7:38
suss28-May-01 7:38 
I have tried to search scientific way of handling retutn key on many
discussion boards and websites but no use.

I have dialog box with two edit boxes. One edit box accepts number.
When user enters number and hits enter (Carriage Return) key it
should display the corresponding data to entered record number
in another edit box.

Since it is single line edit box the enter key will be grabbed by dialog
box and I have no way to intercept enter.
Then I tried
This

In my Edit Control class I added following...

UINT CQSmartEditCtrl::OnGetDlgCode()
{
UINT code = CEdit::OnGetDlgCode();
code |= DLGC_WANTMESSAGE;
return code;
}// OnGetDlgCode

and

void CQSmartEditCtrl::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
// TODO: Add your message handler code here and/or call default
if(nChar == 13 ) // Return Key
{
AfxMessageBox("Need to Display Data");
}

CEdit::OnKeyDown(nChar, nRepCnt, nFlags);
}


But now I don't know how to handle displaying of Data because I need to send
notification to dialog that it is time to display record. How to achieve this.


Also, I have question is there any alternative way to get Return Key from within
edit box which is scientific way
Regards,


Vijay
vijay_khot@hotmail.com

GeneralRe: Handling Return Key within Edit Control: Need advise from Seasoned MFC Gurus Pin
Tomasz Sowinski28-May-01 7:50
Tomasz Sowinski28-May-01 7:50 
GeneralRe: Handling Return Key within Edit Control: Need advise from Seasoned MFC Gurus Pin
ThunderBird28-May-01 8:30
ThunderBird28-May-01 8:30 
GeneralProblem to compil Pin
28-May-01 5:54
suss28-May-01 5:54 
GeneralRe: Problem to compil Pin
Ghazi H. Wadi28-May-01 6:29
Ghazi H. Wadi28-May-01 6:29 
GeneralCWinApp::CloseAllDocuments()... Pin
l a u r e n28-May-01 3:33
l a u r e n28-May-01 3:33 
GeneralRe: CWinApp::CloseAllDocuments()... Pin
Tomasz Sowinski28-May-01 3:57
Tomasz Sowinski28-May-01 3:57 
QuestionAPI native in include?? Pin
28-May-01 3:11
suss28-May-01 3:11 
AnswerRe: API native in include?? Pin
Christian Graus28-May-01 3:24
protectorChristian Graus28-May-01 3:24 
GeneralRe: API native in include?? Pin
28-May-01 4:28
suss28-May-01 4:28 
GeneralZip your source Pin
F Braem28-May-01 2:59
F Braem28-May-01 2:59 
GeneralSounds like a good idea for... Pin
Anna-Jayne Metcalfe30-May-01 0:58
Anna-Jayne Metcalfe30-May-01 0:58 
GeneralRe: Sounds like a good idea for... Pin
F Braem30-May-01 1:05
F Braem30-May-01 1:05 
GeneralRe: Sounds like a good idea for... Pin
30-May-01 1:42
suss30-May-01 1:42 
GeneralRe: Sounds like a good idea for... Pin
Anna-Jayne Metcalfe30-May-01 9:25
Anna-Jayne Metcalfe30-May-01 9:25 
GeneralClip Button with a Rgn Pin
28-May-01 2:45
suss28-May-01 2:45 
GeneralRe: Clip Button with a Rgn Pin
Ravi Bhavnani29-May-01 6:08
professionalRavi Bhavnani29-May-01 6:08 
Questionhow to find process status Pin
28-May-01 2:12
suss28-May-01 2:12 

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.