Click here to Skip to main content
16,011,647 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: BoundsChecker errors Pin
Deian19-May-04 10:36
Deian19-May-04 10:36 
GeneralRe: BoundsChecker errors Pin
John R. Shaw19-May-04 12:30
John R. Shaw19-May-04 12:30 
GeneralRe: BoundsChecker errors Pin
Kelly Herald19-May-04 16:56
Kelly Herald19-May-04 16:56 
GeneralRe: BoundsChecker errors Pin
Joe Woodbury19-May-04 16:59
professionalJoe Woodbury19-May-04 16:59 
GeneralActive X Controls in Dialog Pin
monrobot1319-May-04 4:56
monrobot1319-May-04 4:56 
GeneralRe: Active X Controls in Dialog Pin
Mike Dimmick19-May-04 5:19
Mike Dimmick19-May-04 5:19 
GeneralRe: Active X Controls in Dialog Pin
monrobot1319-May-04 6:44
monrobot1319-May-04 6:44 
GeneralRe: Active X Controls in Dialog Pin
Andrew Quinn AUS19-May-04 5:57
Andrew Quinn AUS19-May-04 5:57 
Hi Aaron,

You are obviously adding the RichEdit control from the Controls toolbar. If this is the case then you need to do the following for it to work:

BOOL CNoactivexApp::InitInstance()
{
	AfxEnableControlContainer();

#ifdef _AFXDLL
	Enable3dControls();			// Call this when using MFC in a shared DLL
#else
	Enable3dControlsStatic();	// Call this when linking to MFC statically
#endif

	AfxInitRichEdit(); // <--------- You need to call this to be able to use the CRichEditCtrl

	CNoactivexDlg dlg;
	m_pMainWnd = &dlg;
	int nResponse = dlg.DoModal();
	if (nResponse == IDOK)
	{
		// TODO: Place code here to handle when the dialog is dismissed with OK
	}
	else if (nResponse == IDCANCEL)
	{
		// TODO: Place code here to handle when the dialog is dismissed with Cancel
	}

	// Since the dialog has been closed, return FALSE so that we exit the
	//  application, rather than start the application's message pump.
	return FALSE;
}


also make sure that #include <afxcmn.h> is listed in your stdafx.h

As a side note, this isn't an ActiveX control, if you go to the dialog resource and right-mouse "Insert ActiveX control...", select "Microsoft Rich Textbox Control 6.0" then this WILL use the ActiveX control and you DONT need to perform the AfxInitRichEdit(); call.

Hope this helps,
Andy
GeneralRe: Active X Controls in Dialog Pin
monrobot1319-May-04 6:48
monrobot1319-May-04 6:48 
GeneralRe: Active X Controls in Dialog Pin
Andrew Quinn AUS19-May-04 8:46
Andrew Quinn AUS19-May-04 8:46 
GeneralRe: Active X Controls in Dialog Pin
monrobot1319-May-04 9:02
monrobot1319-May-04 9:02 
GeneralCant rebuild ClassView file Pin
Wheatbread19-May-04 4:50
Wheatbread19-May-04 4:50 
GeneralRe: Cant rebuild ClassView file Pin
valikac19-May-04 5:03
valikac19-May-04 5:03 
GeneralRe: Cant rebuild ClassView file Pin
Wheatbread19-May-04 5:06
Wheatbread19-May-04 5:06 
GeneralRe: Cant rebuild ClassView file Pin
jmkhael19-May-04 5:03
jmkhael19-May-04 5:03 
GeneralRe: Cant rebuild ClassView file Pin
Wheatbread19-May-04 5:07
Wheatbread19-May-04 5:07 
GeneralRe: Cant rebuild ClassView file Pin
bikram singh19-May-04 5:55
bikram singh19-May-04 5:55 
GeneralRe: Cant rebuild ClassView file Pin
*Dreamz20-May-04 19:28
*Dreamz20-May-04 19:28 
GeneralCustomDraw and ClistCtrl's SubItem Pin
amit_k_gupta19-May-04 4:41
amit_k_gupta19-May-04 4:41 
GeneralRe: CustomDraw and ClistCtrl's SubItem Pin
valikac19-May-04 5:07
valikac19-May-04 5:07 
GeneralRe: CustomDraw and ClistCtrl's SubItem Pin
amit_k_gupta19-May-04 20:42
amit_k_gupta19-May-04 20:42 
GeneralRe: CustomDraw and ClistCtrl's SubItem Pin
valikac20-May-04 5:13
valikac20-May-04 5:13 
GeneralDisplaying a short movie in same window over 3D display - need an advice Pin
robert_s19-May-04 3:50
robert_s19-May-04 3:50 
GeneralStatusbox and toolbar overwritten Pin
Wigwog19-May-04 2:42
Wigwog19-May-04 2:42 
GeneralFilling the Clipboard using the CDC Pin
Cedar Sith19-May-04 2:36
Cedar Sith19-May-04 2:36 

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.