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.
Rufen Sie die Memberfunktion auf, um eine Meldung an jeder Seite im Eigenschaftenblatt weiterzuleiten.
LRESULT QuerySiblings(
WPARAM wParam,
LPARAM lParam
);
Parameter
wParam
Gibt zusätzliche Informationen Meldungabhängigen des Elements an.lParam
Gibt zusätzliche Informationen Meldungabhängigen des Elements an
Rückgabewert
Das Wert ungleich 0 von einer Seite im Eigenschaftenblatt oder 0, wenn alle Seiten einen Wert von 0 zurückgeben.
Hinweise
Wenn eine Seite ein Wert ungleich 0 (null) zurückgibt, sendet das Eigenschaftenblatt die Meldung nicht auf den folgenden Seiten.
Beispiel
// 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::OnApply()
{
int num = GetDlgItemInt(IDC_NUMOBJECTS);
if (num <= 0)
{
if (QuerySiblings(num, 0L))
{
AfxMessageBox(_T("Invalid data is entered. Choose Close ")
_T("button to close the dialog."));
CancelToClose();
}
}
return CPropertyPage::OnApply();
}
// 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.
ON_MESSAGE(PSM_QUERYSIBLINGS, &CColorPage::OnQuerySiblings)
LRESULT CColorPage::OnQuerySiblings(WPARAM wParam, LPARAM lParam)
{
UNREFERENCED_PARAMETER(lParam);
return (wParam <= 0);
}
Anforderungen
Header: afxdlgs.h