CDialog::Create() is failing on Win7 32 bit PC because dialog have Richedit control.
Once i remove that control from dialog,It got created but i need Richedit control.
Why CDialog::Create() is fails when i use Richedit control ? Also i called "AfxInitRichEdit2()"
Asked
Active
Viewed 250 times
0

bala
- 275
- 2
- 3
- 13
-
Check what GetLastError returnes – xMRi Nov 07 '13 at 13:47
-
GetLastError returns 0. – bala Nov 07 '13 at 13:50
-
Where is it failing in the MFC code. – rrirower Nov 07 '13 at 13:50
-
@rrirower create API is failing. – bala Nov 07 '13 at 13:52
-
@user2778665 And, as was asked earlier, what does that function return for an error code? – rrirower Nov 07 '13 at 14:06
-
CDialog dlg ; BOOL res = dlg.create ( CDialog::IDD , PWnd ) ; here res is false and error code is zero . – bala Nov 07 '13 at 14:19
-
@user2778665 Your usage of AfxInitRichEdit2 implies you are using version 2.0 or 3.0 of the rich edit control. Is that correct? – rrirower Nov 07 '13 at 15:48
-
I think 2.0 because in .rc file it shows "RichEdit20A" this.Am I correct? – bala Nov 07 '13 at 16:22
-
@user2778665 I would assume that is correct. Next question...did you define a member variable for the control, and, if so, did you cut and paste, or, use the ClassWizard to define the control? Have you tried to step through the dialog creation code to determine the cause of the false return? – rrirower Nov 07 '13 at 18:37
-
See this link: http://msdn.microsoft.com/en-us/library/Windows/desktop/ms645452(v=vs.84).aspx – bala Nov 08 '13 at 05:36
-
I think in that PC control is not registered. Can some one tell what can i do ? – bala Nov 08 '13 at 05:40