Click here to Skip to main content
15,889,863 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I'm a new bee to MFC.

I'm trying to do a simple MFC dialog base project. This project involves multiple text boxes. So my question is "Is it possible to have multiple rich edit control in a single dialog. So if possible how can i create a pointer to it?
Similar to this:
C++
CEdit* e;
e=(CEdit*)GetDlgItem(IDC_EDIT1);
Posted
Updated 6-Sep-12 6:53am
v2
Comments
__John_ 6-Sep-12 8:07am    
I cant think of any reason why you cant have more than one rich edit control.
The code you posted looks fine.
What error are you getting, where do you hit a problem?
Sharath2790 6-Sep-12 20:45pm    
that code for simple edit control!!!

1 solution

Yes, you will have to do something like :

C++
CRichEditCtrl* edit1 = dynamic_cast<CRichEditCtrl*>( GetDlgItem(IDC_RICHEDIT21 ));
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900