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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. output problem

output problem

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
4 Posts 3 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.
  • S Offline
    S Offline
    susanne1
    wrote on last edited by
    #1

    Hallo i have the following code in a CRichEditView file: void Test_OnDraw(CDC* pDC,TextDoc* pDoc) { pDC->SetTextColor (RGB (0, 0, 0)); // CDC* pDc if (pDoc->m_carrDocOutput.GetSize ()) { CSize sz = pDC->GetOutputTextExtent (pDoc->m_carrDocOutput.GetAt (0)); for (short i = 0; i < pDoc->m_carrDocOutput.GetSize (); i++) pDC->TextOut (1, (sz.cy + 2) * i, pDoc->m_carrDocOutput.GetAt (i)); if (m_bAppendToEnd) { CPoint pt (1, __max (1, (sz.cy + 2) * (pDoc->m_carrDocOutput.GetSize () - 5))); ScrollToPosition (pt); } } } first the Compiler does not recognize this function : ScrollToPosition (pt); secondly when the output appears in the Output window there is no horizontal scroll bar , and when i click maximize or minimize the whole output text disappear.How can i fix this problem ? Thanks in Advance

    C 1 Reply Last reply
    0
    • S susanne1

      Hallo i have the following code in a CRichEditView file: void Test_OnDraw(CDC* pDC,TextDoc* pDoc) { pDC->SetTextColor (RGB (0, 0, 0)); // CDC* pDc if (pDoc->m_carrDocOutput.GetSize ()) { CSize sz = pDC->GetOutputTextExtent (pDoc->m_carrDocOutput.GetAt (0)); for (short i = 0; i < pDoc->m_carrDocOutput.GetSize (); i++) pDC->TextOut (1, (sz.cy + 2) * i, pDoc->m_carrDocOutput.GetAt (i)); if (m_bAppendToEnd) { CPoint pt (1, __max (1, (sz.cy + 2) * (pDoc->m_carrDocOutput.GetSize () - 5))); ScrollToPosition (pt); } } } first the Compiler does not recognize this function : ScrollToPosition (pt); secondly when the output appears in the Output window there is no horizontal scroll bar , and when i click maximize or minimize the whole output text disappear.How can i fix this problem ? Thanks in Advance

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #2

      ScrollToPosition is a member of CScrollView. is Test_OnDraw a member of a class that is derived from CScrollView ? (edit: also of CCtrlView)

      image processing toolkits | batch image processing

      modified on Thursday, July 2, 2009 9:28 AM

      S 1 Reply Last reply
      0
      • C Chris Losinger

        ScrollToPosition is a member of CScrollView. is Test_OnDraw a member of a class that is derived from CScrollView ? (edit: also of CCtrlView)

        image processing toolkits | batch image processing

        modified on Thursday, July 2, 2009 9:28 AM

        S Offline
        S Offline
        susanne1
        wrote on last edited by
        #3

        no it is a member of class derived from CRichEditView. I have also a problem intializing the CDC* pDc outside the Class that derived frm CRichEditView. inside class Test_view::CRichEditView pDC will be intialized for the OnDraw fuction but i need to intialize CDC* pDC in the Test_Doc:: CRichEditDocument.

        C 1 Reply Last reply
        0
        • S susanne1

          no it is a member of class derived from CRichEditView. I have also a problem intializing the CDC* pDc outside the Class that derived frm CRichEditView. inside class Test_view::CRichEditView pDC will be intialized for the OnDraw fuction but i need to intialize CDC* pDC in the Test_Doc:: CRichEditDocument.

          C Offline
          C Offline
          Chandrasekharan P
          wrote on last edited by
          #4

          ScrollTpPosition is a member function of CSrollView. Have a look at this link [^]

          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