[solved]RichEdit control in Dialog: "Retrun" does'nt Work !
-
Hi everybady. I Inserted a richedit control in a Dialog.When I typed string in richedit control I found the control didnt response RETURN key.There was not problem in CRichEditView in single document app. I think perhaps the dialog would process the RETURN down message,and the richedit control had no chance to response it. I used "ModifyStyle(0,ES_WANTRETURN)" set richedit control's style but this didnt resolve the problem. What's the different between richedit control in dialog and document-view app ? Thanks. :sigh: Thanks everybody,I found I must set ES_WANTRETURN in visual studio ,
ModifyStyle(0,ES_WANTRETURN)
in the OnInitDialog() can't modify the style. I wonder whether the RichEditCtrl's style must be set when create.
-
Hi everybady. I Inserted a richedit control in a Dialog.When I typed string in richedit control I found the control didnt response RETURN key.There was not problem in CRichEditView in single document app. I think perhaps the dialog would process the RETURN down message,and the richedit control had no chance to response it. I used "ModifyStyle(0,ES_WANTRETURN)" set richedit control's style but this didnt resolve the problem. What's the different between richedit control in dialog and document-view app ? Thanks. :sigh: Thanks everybody,I found I must set ES_WANTRETURN in visual studio ,
ModifyStyle(0,ES_WANTRETURN)
in the OnInitDialog() can't modify the style. I wonder whether the RichEditCtrl's style must be set when create.
-
Hi everybady. I Inserted a richedit control in a Dialog.When I typed string in richedit control I found the control didnt response RETURN key.There was not problem in CRichEditView in single document app. I think perhaps the dialog would process the RETURN down message,and the richedit control had no chance to response it. I used "ModifyStyle(0,ES_WANTRETURN)" set richedit control's style but this didnt resolve the problem. What's the different between richedit control in dialog and document-view app ? Thanks. :sigh: Thanks everybody,I found I must set ES_WANTRETURN in visual studio ,
ModifyStyle(0,ES_WANTRETURN)
in the OnInitDialog() can't modify the style. I wonder whether the RichEditCtrl's style must be set when create.
Does your rich edit have the multiline style?
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > "It doesn't work, fix it" does not qualify as a bug report. < > Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
-
I think you're absolutely right on that, the dialog eats your return key press in
IsDialogMessage
. If you're using a dialog template you could try modifing the style in the resource editor instead of in your code. /MMattias G wrote:
you could try modifing the style in the resource editor instead of in your code
Thanks. I wonder which style I should modify in the resource editor.
-
Does your rich edit have the multiline style?
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > "It doesn't work, fix it" does not qualify as a bug report. < > Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
Code-o-mat wrote:
Does your rich edit have the multiline style?
I added the multiline style.
-
Code-o-mat wrote:
Does your rich edit have the multiline style?
I added the multiline style.
Did it help?
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > "It doesn't work, fix it" does not qualify as a bug report. < > Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <