CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 1999
    Location
    CA,USA
    Posts
    22

    Dialog Based MFC Dialog Based App and RichEdit ctl will not run???

    Hi,

    I just created what was supposed to be a simple MFC Dialog based app, i.e. checked "Dialog based" in the wizard and left ActiveX checked.

    I setup my controls in the dialog and it worked OK.
    However, now that I have added a RichEdit Control into the Dialog, it will not initialize, The dialog does not display and I just get a return code 0. No error message, no anything.

    Compiler is VC 6 with the latest SP applied.

    Hellpp!!??

    Bryan.



  2. #2
    Join Date
    Apr 2000
    Location
    San Francisco, California, USA
    Posts
    4,467

    Re: Dialog Based MFC Dialog Based App and RichEdit ctl will not run???

    You have to call AfxInitRichEdit in your InitInstance function before
    creating the dialog.


    Russian Software Development Network -- http://www.rsdn.ru

  3. #3
    Join Date
    Oct 1999
    Location
    CA,USA
    Posts
    22

    Re: Dialog Based MFC Dialog Based App and RichEdit ctl will not run???

    Thanks Alex, tht works just fine.

    Bryan.



  4. #4
    Join Date
    Oct 1999
    Location
    CA,USA
    Posts
    22

    Dialog Based RichEditControl and Ctrl Functions

    Hi Alex,

    I have another problem which you may be able to help me with....

    As I said, this RichEdit Control is in a dialog, (in an RC file).

    So how can I get its control so that I can do things like; SetSel() ReplaceSel() etc.

    I know I can use GetDlgItem() but that gets me a CWnd, can I use that to get the ctrl, change text color by line, etc., etc.

    This stuff doesn't seem to be covered anywhere.

    I usually use RichEditView, so this Dialog box format seems to be a real problem.

    Cheers,

    Bryan.



  5. #5
    Join Date
    Apr 2000
    Location
    San Francisco, California, USA
    Posts
    4,467

    Re: Dialog Based RichEditControl and Ctrl Functions

    Bind RichEdit window to a CRichEditCtrl member variable using Class
    Wizard like any other control.


    Russian Software Development Network -- http://www.rsdn.ru

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured