Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VC7 VC8.0 MFC VS2010 VC++
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:
CEdit* e;
e=(CEdit*)GetDlgItem(IDC_EDIT1);
Posted 6-Sep-12 1:15am
Edited 6-Sep-12 6:53am
v2
Comments
__John_ at 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 at 6-Sep-12 20:45pm
   
that code for simple edit control!!!

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Yes, you will have to do something like :
 
CRichEditCtrl* edit1 = dynamic_cast<CRichEditCtrl*>( GetDlgItem(IDC_RICHEDIT21 ));
  Permalink  

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



Advertise | Privacy | Mobile
Web01 | 2.8.141022.2 | Last Updated 6 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100