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. Changing Colour in CDocument

Changing Colour in CDocument

Scheduled Pinned Locked Moved C / C++ / MFC
c++tutorialquestion
3 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.
  • E Offline
    E Offline
    E3
    wrote on last edited by
    #1

    Hi all, Dose any body known how to change the color of mydoc in MDI program. I have created an Rich Text Control in the Mydoc and i set the rect to 40 pixals in so their is a space between the start of the my doc and i want to colour in that because it white and i want gray colour i trying to make it look like Visual C++ the code window so i could have line count beside the richtext box or do i have to do something different? I new at this Visaul C++ so could any body please send me on the right track. thanks an lot :)

    R W 2 Replies Last reply
    0
    • E E3

      Hi all, Dose any body known how to change the color of mydoc in MDI program. I have created an Rich Text Control in the Mydoc and i set the rect to 40 pixals in so their is a space between the start of the my doc and i want to colour in that because it white and i want gray colour i trying to make it look like Visual C++ the code window so i could have line count beside the richtext box or do i have to do something different? I new at this Visaul C++ so could any body please send me on the right track. thanks an lot :)

      R Offline
      R Offline
      Roman Fadeyev
      wrote on last edited by
      #2

      Try to use WM_ERASEBKGND message. Default handler paints window client area with color COLOR_WINDOW, and you can add own painting routine to cover over rect with gray.

      1 Reply Last reply
      0
      • E E3

        Hi all, Dose any body known how to change the color of mydoc in MDI program. I have created an Rich Text Control in the Mydoc and i set the rect to 40 pixals in so their is a space between the start of the my doc and i want to colour in that because it white and i want gray colour i trying to make it look like Visual C++ the code window so i could have line count beside the richtext box or do i have to do something different? I new at this Visaul C++ so could any body please send me on the right track. thanks an lot :)

        W Offline
        W Offline
        wimel
        wrote on last edited by
        #3

        :mad:Try to read something about Doc-view architecture. Normally your document only contains the data. In your views you represent the data (text of graph or something else) D.W.

        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