Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
LRESULT QuerySiblings( WPARAM wParam**, LPARAM** lParam );
Return Value
The nonzero value from a page in the property sheet, or 0 if all pages return a value of 0.
Parameters
wParam
Specifies additional message-dependent information.
lParam
Specifies additional message-dependent information
Remarks
Call this member function to forward a message to each page in the property sheet. If a page returns a nonzero value, the property sheet does not send the message to subsequent pages.
Example
// Validate the value entered in the Number edit control. If its
// value is not a natural number, request CPropertySheet (i.e. parent
// window of the page) to send a PSM_QUERYSIBLINGS message to each
// LOADED page (a page won't be loaded in memory until it is shown).
// If one of the pages returns a nonzero value in response to the
// PSM_QUERYSIBLINGS message, then inform the user and change the OK
// to Close and disable the Cancel button. CStylePage is a
// CPropertyPage-derived class.
BOOL CStylePage::OnKillActive()
{
int num = GetDlgItemInt(IDC_NUMOBJECTS);
if (num <= 0)
{
if (QuerySiblings(num, 0L))
{
AfxMessageBox("An invalid data is entered. Choose Close
button to close the dialog.");
CancelToClose();
}
}
return CPropertyPage::OnKillActive();
}
// This is an example of trapping the PSM_QUERYSIBLINGS in one of
// the pages. CColorPage is a CPropertyPage-derived class. Upon
// receiving this message, wParam contains the value passed to
// QuerySiblings() call. CColorPage will check this value and return
// FALSE only if the value is greater than 1.
BEGIN_MESSAGE_MAP(CColorPage, CPropertyPage)
// ...
ON_MESSAGE(PSM_QUERYSIBLINGS, OnQuerySiblings)
END_MESSAGE_MAP()
LRESULT CColorPage::OnQuerySiblings( WPARAM wParam, LPARAM lParam )
{
return (wParam <= 0);
}