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. OnShowWindow() doesn't work on CPropertyPage

OnShowWindow() doesn't work on CPropertyPage

Scheduled Pinned Locked Moved C / C++ / MFC
question
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.
  • D Offline
    D Offline
    Donguy1976
    wrote on last edited by
    #1

    Hello all, I am using OnShowWindow() in CDialogs to do somethings when a dialog become visible after it was hidden. I want to do the same thing for a property page and then calling the function OnShowWindow() doesn't do anyhing, because this function doesn't get called when the property page becomes visible after it was hidden. I can use OnPaint() and that works fine. But i want to avoid using OnPaint() as that get called for so many reasons. Where as OnShowWindow() is exclusive when a window is displayed after it was initially hidden. So is there a different function i can use in CPropertyPage when it becomes visible? Thanks in advance.

    _ 1 Reply Last reply
    0
    • D Donguy1976

      Hello all, I am using OnShowWindow() in CDialogs to do somethings when a dialog become visible after it was hidden. I want to do the same thing for a property page and then calling the function OnShowWindow() doesn't do anyhing, because this function doesn't get called when the property page becomes visible after it was hidden. I can use OnPaint() and that works fine. But i want to avoid using OnPaint() as that get called for so many reasons. Where as OnShowWindow() is exclusive when a window is displayed after it was initially hidden. So is there a different function i can use in CPropertyPage when it becomes visible? Thanks in advance.

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      Override CPropertyPage::OnSetActive[^]

      «_Superman_»  _I love work. It gives me something to do between weekends.

      _Microsoft MVP (Visual C++) (October 2009 - September 2013)

      Polymorphism in C

      D 1 Reply Last reply
      0
      • _ _Superman_

        Override CPropertyPage::OnSetActive[^]

        «_Superman_»  _I love work. It gives me something to do between weekends.

        _Microsoft MVP (Visual C++) (October 2009 - September 2013)

        Polymorphism in C

        D Offline
        D Offline
        Donguy1976
        wrote on last edited by
        #3

        This function get's called only when the Propertypage is displayed, like while navigating through the tabs. I want it to be called when i go from ShowWindow(false) to ShowWindow(true) i.e., when the property page is displayed after it was hidden. And this function doesn't get called in that scenario. And you said override this, can you explain how to do that? Will that work for my scenario?

        _ 1 Reply Last reply
        0
        • D Donguy1976

          This function get's called only when the Propertypage is displayed, like while navigating through the tabs. I want it to be called when i go from ShowWindow(false) to ShowWindow(true) i.e., when the property page is displayed after it was hidden. And this function doesn't get called in that scenario. And you said override this, can you explain how to do that? Will that work for my scenario?

          _ Offline
          _ Offline
          _Superman_
          wrote on last edited by
          #4

          I'm not completely clear of your requirement, but I guess my earlier solution should work for you. What I mean by override is to create a new class that derives from CPropertyPage, write the method OnSetActive in this class and use this class to create the property pages.

          «_Superman_»  _I love work. It gives me something to do between weekends.

          _Microsoft MVP (Visual C++) (October 2009 - September 2013)

          Polymorphism in C

          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