Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Problem with creating richeditctrl?

Problem with creating richeditctrl?

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    Banks K
    wrote on last edited by
    #1

    Hello All, i have dialog base application and I am try to create richeditctrl in oninitdiaog function follows : m_RichEditCtrl.Create(WS_CHILD|WS_VISIBLE|WS_BORDER|ES_MULTILINE, CRect(10,10,100,200), this, 1); but it doesn't show on dialog box what i have forget please anyone tell me.... thanks

    R 1 Reply Last reply
    0
    • B Banks K

      Hello All, i have dialog base application and I am try to create richeditctrl in oninitdiaog function follows : m_RichEditCtrl.Create(WS_CHILD|WS_VISIBLE|WS_BORDER|ES_MULTILINE, CRect(10,10,100,200), this, 1); but it doesn't show on dialog box what i have forget please anyone tell me.... thanks

      R Offline
      R Offline
      Rolando Cruz
      wrote on last edited by
      #2

      Hi, Should work fine but... Did you remember to enter AfxInitRichEdit2() in the InitInstance of the application?

      Rolando :suss:

      B 1 Reply Last reply
      0
      • R Rolando Cruz

        Hi, Should work fine but... Did you remember to enter AfxInitRichEdit2() in the InitInstance of the application?

        Rolando :suss:

        B Offline
        B Offline
        Banks K
        wrote on last edited by
        #3

        i forget this but now i have called this function but still it is now showing what can be a problem?

        R 1 Reply Last reply
        0
        • B Banks K

          i forget this but now i have called this function but still it is now showing what can be a problem?

          R Offline
          R Offline
          Rolando Cruz
          wrote on last edited by
          #4

          Make sure you are calling the AfxInitRichEdit2() function at the begining of the application and not within OnInitDialog(); Also, did you declare m_RichEditCtrl as a CRichEditCtrl? I tested this using VS 2005 version 8.0.50727.762 (SP.050727-7600) and your code was copied and pasted into the OnInitDialog without changes. All I then did was declare m_RichEditCtrl as a CRichEditCtrl. Other than this I do not know what else to tell you. Hope this helps.

          Rolando :suss:

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups