Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Controls
  New Posts New Posts RSS Feed - CXTPPropertyPage and SetModified
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

CXTPPropertyPage and SetModified

 Post Reply Post Reply
Author
Message
lrenoux View Drop Down
Groupie
Groupie


Joined: 20 April 2009
Status: Offline
Points: 62
Post Options Post Options   Thanks (0) Thanks(0)   Quote lrenoux Quote  Post ReplyReply Direct Link To This Post Topic: CXTPPropertyPage and SetModified
    Posted: 05 June 2013 at 8:11am
Since SDK 8.0/ ToolkitPro 16.1.0 and Visual 2012, it's not possible to call method SetModified from an instance of CXTPPropertyPage. Because the new SDK 8.0 method inherited from CPropertyPage search for a CPropertySheet parent class in method GetParentSheet() :

void CPropertyPage::SetModified(BOOL bChanged)
{
if (m_hWnd == NULL) // allowed for backward compatibility
return;

ASSERT(::IsWindow(m_hWnd));
ASSERT(GetParentSheet() != NULL);

CWnd* pParentWnd = GetParentSheet();
if (bChanged)
pParentWnd->SendMessage(PSM_CHANGED, (WPARAM)m_hWnd);
else
pParentWnd->SendMessage(PSM_UNCHANGED, (WPARAM)m_hWnd);
}

CPropertySheet *CPropertyPage::GetParentSheet()
{
for (CWnd *pWnd = GetParent(); pWnd != NULL; pWnd = pWnd->GetParent())
{
CPropertySheet *pSheet = DYNAMIC_DOWNCAST(CPropertySheet, pWnd);
if (pSheet != NULL)
{
return pSheet;
}
}
ASSERT(FALSE); // Could not find the CPropertySheet
return NULL;
}

and your CXTPPropertySheet doesn't inherit from CPropertySheet but CDialog.


Ticket open.

L.
Back to Top
ilya View Drop Down
Groupie
Groupie


Joined: 07 May 2012
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote ilya Quote  Post ReplyReply Direct Link To This Post Posted: 22 June 2013 at 12:12pm
Back to Top
ilya View Drop Down
Groupie
Groupie


Joined: 07 May 2012
Status: Offline
Points: 37
Post Options Post Options   Thanks (0) Thanks(0)   Quote ilya Quote  Post ReplyReply Direct Link To This Post Posted: 22 June 2013 at 4:17pm
Resolved, will be available in 16.2.1
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.