pressing return in an edit control
-
Hi all, When i run my MFC application, if i click in an edit control an press the "return" button the application exits. Why ? How can i avoid that ? Thanx in advance, Desmo16.
Set edit box style from resource editor as "Want return" or
pEdit->ModifyStyle(0,ES_WANTRETURN);
SaRath.
_"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
-
Hi all, When i run my MFC application, if i click in an edit control an press the "return" button the application exits. Why ? How can i avoid that ? Thanx in advance, Desmo16.
-
Hi all, When i run my MFC application, if i click in an edit control an press the "return" button the application exits. Why ? How can i avoid that ? Thanx in advance, Desmo16.
Desmo16 wrote:
Hi all, When i run my MFC application, if i click in an edit control an press the "return" button the application
Also make you Edit Control Multiline!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers, Alok Gupta VC Forum Q&A :- I/ IV Support CRY- Child Relief and You
-
Hi all, When i run my MFC application, if i click in an edit control an press the "return" button the application exits. Why ? How can i avoid that ? Thanx in advance, Desmo16.
You can set Want return to true in property window from editbox_**
**_
whitesky
-
set the Want Return style for the edit control. if u dont want to ur application when the enter key is pressed, simply overide the OnOK() funtion in the dialog class. Inside that funtion do not call CDialog::OnOK().. nave
-
Set edit box style from resource editor as "Want return" or
pEdit->ModifyStyle(0,ES_WANTRETURN);
SaRath.
_"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
-
I think this will not work.. try this.... simply overide the OnOK() and do not call CDialog::OnOK()
OnOK(){}
Else give Multiline property to edit box Dream bigger... Do bigger...Expect smaller aji -- modified at 7:14 Wednesday 12th July, 2006and
OnCancel
for Esc_**
**_
whitesky
-
I think this will not work.. try this.... simply overide the OnOK() and do not call CDialog::OnOK()
OnOK(){}
Else give Multiline property to edit box Dream bigger... Do bigger...Expect smaller aji -- modified at 7:14 Wednesday 12th July, 2006 -
You can also aproach PretranslateMessage function SaRath.
_"Where I am from, there is no plan B. So, take advantage of today becuase tomorrow is not promised. - 50 Cent"
PretranslateMessage
:omg: Regards, FarPointer Blog:FARPOINTER