Print Page | Close Window

CXTPPropertyPage and SetModified

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=21691
Printed Date: 17 November 2024 at 5:33am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTPPropertyPage and SetModified
Posted By: lrenoux
Subject: CXTPPropertyPage and SetModified
Date 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.



Replies:
Posted By: ilya
Date Posted: 22 June 2013 at 12:12pm
The issue is caused by VS2012

PS.
http://msdn.microsoft.com/en-us/library/bb531344.aspx" rel="nofollow - http://msdn.microsoft.com/en-us/library/bb531344.aspx


Posted By: ilya
Date Posted: 22 June 2013 at 4:17pm
Resolved, will be available in 16.2.1



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net