Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

How to detect a CPropertyPage has been modified?

256 views
Skip to first unread message

David Lowndes

unread,
Sep 17, 1997, 3:00:00 AM9/17/97
to

>Do I have to keep track by myself? Is there a build-in method in MFC to do
>it? Any response will be appreciated!!!

Is CPropertyPage::SetModified what you're after?

Dave
----
Address is altered to discourage junk mail.
Remove ".---" for the real address.
http://www.bj.co.uk

Hao Huang

unread,
Sep 17, 1997, 3:00:00 AM9/17/97
to

Thanks for David's response.

CPropertyPage::SetModified() will enable/disable the Apply button on
property sheet. My problem is when user clicked OK button on
CPropertySheet, I need to know which CPropertyPage has been modified.


Hao Huang

unread,
Sep 17, 1997, 3:00:00 AM9/17/97
to

Do I have to keep track by myself? Is there a build-in method in MFC to do
it? Any response will be appreciated!!!

Hao.

Frank Hickman

unread,
Sep 18, 1997, 3:00:00 AM9/18/97
to

Hi Hao,

The only way I've been able to implement this functionality is manually
calling SetModified in child window OnChange, OnSelectChange, etc.
handlers.

HTH
--
===================
Frank Hickman
SecurTech, Inc.

fhic...@ix.netcom.com
===================


Phillip Davis

unread,
Sep 18, 1997, 3:00:00 AM9/18/97
to

> Do I have to keep track by myself? Is there a build-in method in MFC to
do
> it? Any response will be appreciated!!!

Here is a VC1.52c answer.

There is a way to tell the property that it has changed 'SetModified( BOOL
)' but no way to ask if its been changed. SetModified sets a private flag
m_bChanged but there is no way to read it. I just added one line to the
class definition:

inline BOOL IsModified( ) { return m_bChanged; }

in file afxdlgs.h for the CPropertySheet definition. Helps out
tremendously. Hope this helps you.

Phillip Davis


0 new messages