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. er,how to do it?

er,how to do it?

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

    Hi, I am writing a program, I want it to display datas in the view.When you press a menu item ,the view display some data,and when you press another menu item, the view was made to empty and display another data.How to do it? It seems CView::invalidate ()does not do the thing well.Can anyone tell me? Thank you. YES, I am here.

    T S A 3 Replies Last reply
    0
    • A Angel Kid

      Hi, I am writing a program, I want it to display datas in the view.When you press a menu item ,the view display some data,and when you press another menu item, the view was made to empty and display another data.How to do it? It seems CView::invalidate ()does not do the thing well.Can anyone tell me? Thank you. YES, I am here.

      T Offline
      T Offline
      Tim Smith
      wrote on last edited by
      #2

      You have to override OnPaint to control how the data is rendered. And an FYI: "data" is the plural form. "datum" is singular. Tim Smith I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?

      1 Reply Last reply
      0
      • A Angel Kid

        Hi, I am writing a program, I want it to display datas in the view.When you press a menu item ,the view display some data,and when you press another menu item, the view was made to empty and display another data.How to do it? It seems CView::invalidate ()does not do the thing well.Can anyone tell me? Thank you. YES, I am here.

        S Offline
        S Offline
        Stan the man
        wrote on last edited by
        #3

        If it is a FormView, you could add edit or Static controls and then use UpdateData. OnInitialUpdate is called in the beginning. You would use this to initialize anything. This means updating the initial data on the page.

        A 1 Reply Last reply
        0
        • S Stan the man

          If it is a FormView, you could add edit or Static controls and then use UpdateData. OnInitialUpdate is called in the beginning. You would use this to initialize anything. This means updating the initial data on the page.

          A Offline
          A Offline
          Angel Kid
          wrote on last edited by
          #4

          Sorry, not CView::OnInitialUpdate(), it is CView::Invalidate (),I made the mistake.I just want empty the view and display ,how to do it? YES, I am here.

          1 Reply Last reply
          0
          • A Angel Kid

            Hi, I am writing a program, I want it to display datas in the view.When you press a menu item ,the view display some data,and when you press another menu item, the view was made to empty and display another data.How to do it? It seems CView::invalidate ()does not do the thing well.Can anyone tell me? Thank you. YES, I am here.

            A Offline
            A Offline
            Angel Kid
            wrote on last edited by
            #5

            f YES, I am here.

            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