git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11465
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// we need to find the dialog containing this control as
// IsDialogMessage() just eats all the messages (i.e. returns TRUE for
// them) if we call it for the control itself
// we need to find the dialog containing this control as
// IsDialogMessage() just eats all the messages (i.e. returns TRUE for
// them) if we call it for the control itself
- while ( ::GetWindowLong(hwnd, GWL_STYLE) & WS_CHILD )
+ while ( hwnd && ::GetWindowLong(hwnd, GWL_STYLE) & WS_CHILD )
{
hwnd = ::GetParent(hwnd);
}
{
hwnd = ::GetParent(hwnd);
}
- return ::IsDialogMessage(hwnd, msg) != 0;
+ return hwnd && ::IsDialogMessage(hwnd, msg) != 0;