CPropertyPage::OnSetActive() changed between 4.1 & 4.2
Mario Contestabile -- Mario_Contestabile.UOS__MTL@UOSMTL2.universal.com Tuesday, November 26, 1996 Environment: MSVC 4.2b, Windows NT 3.51 Service Pack 5 \msdev\mfc\src\dlgprop.cpp CPropertyPage::OnSetActive() has changed between MSVC 4.1 & 4.2. In MFC 4.1, the function looked like this: BOOL CPropertyPage::OnSetActive() { ASSERT_VALID(this); UpdateData(FALSE); return TRUE; } In MFC 4.2, it was changed to the following: BOOL CPropertyPage::OnSetActive() { ASSERT_VALID(this); if (m_bFirstSetActive) m_bFirstSetActive = FALSE; else UpdateData(FALSE); return TRUE; } Why was this change made? Why wasn't the documentation updated to reflect this? This will cause the obvious problem of displaying an empty page in instances where users of CPropertyPage expected the default implementation to call UpdateData(FALSE). After rebuilding my app under 4.2b I had the unpleaseant surprise of seeing a few empty propertypages... mcontest@universal.com
David Lowndes -- David.Lowndes@bj.co.uk Thursday, November 28, 1996 > CPropertyPage::OnSetActive() has changed between MSVC 4.1 & 4.2. Why was this change made? < I can't say why it was changed, but it resulted in your getting the DDX twice on initialisation. > Why wasn't the documentation updated to reflect this? < Why isn't so much of the new documentation considerably better than it currently is! I agree though, there should have been some note somewhere (there probably is if only you can find it) to notify this change. I had one problem arise from this change too, but luckily I realised it was because I had (wrongly) relied on this undocumented behaviour. A simple rearrangement of my code fixed the problem.
Alexander Grigoriev -- alegr@aha.ru Saturday, November 30, 1996 There is an obvious reason: UpdateData is already called in OnInitDialog(). I myself have overridden OnSetActive to remove UpdataData call, thus allowing to preserve the data entered, if an user switches property pages or wizard pages. ---------- > From: Mario Contestabile> To: mfc-l > Subject: CPropertyPage::OnSetActive() changed between 4.1 & 4.2 > Date: 27 ОПСВТС 1996 З. 0:46 > > Environment: MSVC 4.2b, Windows NT 3.51 Service Pack 5 > > \msdev\mfc\src\dlgprop.cpp > CPropertyPage::OnSetActive() has changed between MSVC 4.1 & 4.2. > > In MFC 4.1, the function looked like this: > BOOL CPropertyPage::OnSetActive() > { > ASSERT_VALID(this); > UpdateData(FALSE); > return TRUE; > } > > In MFC 4.2, it was changed to the following: > > BOOL CPropertyPage::OnSetActive() > { > ASSERT_VALID(this); > if (m_bFirstSetActive) > m_bFirstSetActive = FALSE; > else > UpdateData(FALSE); > return TRUE; > } > > Why was this change made? > Why wasn't the documentation updated to reflect this? > This will cause the obvious problem of displaying an empty page in instances > where users of CPropertyPage expected the default implementation to call > UpdateData(FALSE). > After rebuilding my app under 4.2b I had the unpleaseant surprise of seeing a > few empty > propertypages... > > mcontest@universal.com >
| Вернуться в корень Архива |