OnShowWindow() doesn't work on CPropertyPage
-
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.
-
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.
Override CPropertyPage::OnSetActive[^]
«_Superman_» _I love work. It gives me something to do between weekends.
-
Override CPropertyPage::OnSetActive[^]
«_Superman_» _I love work. It gives me something to do between weekends.
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?
-
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?
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 methodOnSetActive
in this class and use this class to create the property pages.«_Superman_» _I love work. It gives me something to do between weekends.