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. how to clear view's content?

how to clear view's content?

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
2 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.
  • A Offline
    A Offline
    Angel Kid
    wrote on last edited by
    #1

    I want to konw how to clear my view's content,anyone help me?thx. YES, I am here.

    M 1 Reply Last reply
    0
    • A Angel Kid

      I want to konw how to clear my view's content,anyone help me?thx. YES, I am here.

      M Offline
      M Offline
      Matt Gullett
      wrote on last edited by
      #2

      What kind of view? It could be as simple as calling SetWindowText(hWnd, ""); It could be as involved as destorying all your internal document objects and calling Invalidate(FALSE); Unless you are using one of the MFC provided control-views (tree view, edit view, list view), you are doing all the drawing yourself in the OnDraw function. If that is the case you will have to do whatever you need to do to blank the screen. For CEditView, just SetWindowText, for CTreeView I believe it is DeleteAllItems and for CListView I believe it is DeleteAllItems also. Look in MSDN for more info.

      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