if ( m_hWnd )
{
- if ( !::DestroyWindow(GetHwnd()) )
- wxLogLastError("DestroyWindow");
+ if (::IsWindow(GetHwnd()))
+ {
+ if ( !::DestroyWindow(GetHwnd()) )
+ wxLogLastError("DestroyWindow");
+ }
// remove hWnd <-> wxWindow association
wxRemoveHandleAssociation(this);
//else: get the dlg code from the DefWindowProc()
break;
+ case WM_SYSKEYDOWN:
case WM_KEYDOWN:
// If this has been processed by an event handler,
// return 0 now (we've handled it).
}
break;
+ case WM_SYSKEYUP:
case WM_KEYUP:
processed = HandleKeyUp((WORD) wParam, lParam);
break;
+ case WM_SYSCHAR:
case WM_CHAR: // Always an ASCII character
processed = HandleChar((WORD)wParam, lParam, TRUE);
break;
if ( width > -1 ) width1 = width;
if ( height > -1 ) height1 = height;
+ // Unfortunately this won't work in WIN16. Unless perhaps
+ // we define WS_EX_CONTROLPARENT ourselves?
+#ifndef __WIN16__
// if we have wxTAB_TRAVERSAL style, we want WS_EX_CONTROLPARENT or
// IsDialogMessage() won't work for us
if ( GetWindowStyleFlag() & wxTAB_TRAVERSAL )
{
extendedStyle |= WS_EX_CONTROLPARENT;
}
+#endif
HWND hParent = (HWND)NULL;
if ( parent )
win = wxFindWinFromHandle((WXHWND)hwnd);
if ( !win )
{
+ // the radiobox pointer is stored in GWL_USERDATA only under Win32
+#ifdef __WIN32__
// native radiobuttons return DLGC_RADIOBUTTON here and for any
// wxWindow class which overrides WM_GETDLGCODE processing to
// do it as well, win would be already non NULL
win = (wxWindow *)::GetWindowLong(hwnd, GWL_USERDATA);
}
else
+#endif // Win32
{
// hwnd is not a wxWindow, try its parent next below
hwnd = ::GetParent(hwnd);