VC++/ Rich Edit Dialog

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • San07
    New Member
    • Jul 2008
    • 7

    VC++/ Rich Edit Dialog

    Hi All,
    I don't know whether this is the right place to post my query.

    Query:
    This is in VC++. I have created a blank Dialog-based project with VC++ 6.0. When I run, I am able to see the Dialog. But If I just Drag & Drop a RichEdit2.0 Control on the Dialog and try to run, its failing.
    Is there any specific initialization I need to have for Rich Edit or any project settings?
    (It works fine if I drag and drop a static/Edit Controls i.e., a Dialog with a static/edit control is displayed when I run the application )
  • Banfa
    Recognized Expert Expert
    • Feb 2006
    • 9067

    #2
    Originally posted by San07
    its failing
    How? It doesn't compile? It crashes when run? It doesn't have the expected behaviour?

    Your description of the problem is so lacking in detail that it is almost impossible to tell.

    However I would say this, if you are just starting out on this program/C++ programming then ditch MSVC++ 6.0, it is around about a decade old and there have been 3 new versions since it came out (Visual Studio .NET (2003?), Visual Studio 2005 and Visual Studio 2008).

    Personally I only use VC++ 6.0 when I have to support projects that where originally written in it (because generally changing compilers is not something you do to a project in support). For everything else I am currently using Visual Studio 2005 and that is only because when we tried to compile the project in Visual Studio 2008, which is supposed to be compatible, it produced non-working executables, upgrade is on our list of things to do when time permits.

    Both Visual Studio 2005 and Visual Studio 2008 have versions you can download for free from Microsoft.

    Comment

    • San07
      New Member
      • Jul 2008
      • 7

      #3
      Following are the steps I followed.

      1. Open Visual Studio 2003.
      2. Create new project. (Visual C++ -> MFC Application)
      3. In the wizard, made the application type as 'Dialog- Based'.
      4. If I compile and Run, its shows the Dialog.
      5. I Draged & Droped a Rich Edit 2.0 Control.
      6. I Built the Proj.
      7. If I run the application, Its failing - Its not displaying the Dialog.

      Comment

      • Banfa
        Recognized Expert Expert
        • Feb 2006
        • 9067

        #4
        Have you added a call to AfxInitRichEdit () in the InitInstance() member of your class derived from CWinApp?

        Comment

        • San07
          New Member
          • Jul 2008
          • 7

          #5
          Hey Its working after calling AfxInitRichEdit () method.
          Thanks

          Comment

          Working...