#include "wx/frame.h"
#include "wx/listbox.h"
#include "wx/button.h"
+ #include "wx/bmpbuttn.h"
#include "wx/msgdlg.h"
#include "wx/scrolwin.h"
#include "wx/radiobox.h"
if ( hWnd )
::WinEnableWindow(hWnd, (BOOL)bEnable);
+ //
+ // The logic below doesn't apply to the top level windows -- otherwise
+ // showing a modal dialog would result in total greying out (and ungreying
+ // out later) of everything which would be really ugly
+ //
+ if (IsTopLevel())
+ return TRUE;
+
wxWindowList::Node* pNode = GetChildren().GetFirst();
while (pNode)
wxDropTarget* pDropTarget
)
{
- if (m_dropTarget != 0)
- {
- m_dropTarget->Revoke(m_hWnd);
- delete m_dropTarget;
- }
m_dropTarget = pDropTarget;
- if (m_dropTarget != 0)
- m_dropTarget->Register(m_hWnd);
} // end of wxWindowOS2::SetDropTarget
#endif
{
wxTheApp->DoMessage((WXMSG*)&vMsg);
}
+ if (vMsg.msg == WM_QUIT)
+ ::WinPostMsg(NULL, WM_QUIT, 0, 0);
}
#endif // wxUSE_MENUS_NATIVE
pBtn->OS2Command(BN_CLICKED, 0 /* unused */);
return TRUE;
}
+ else if (!IsTopLevel())
+ {
+ //
+ // if not a top level window, let parent
+ // handle it
+ //
+ return FALSE;
+ }
// else: but if it does not it makes sense to make
// it work like a TAB - and that's what we do.
// Note that Ctrl-Enter always works this way.
,&nX
,&nY
);
+ if (!pWin->IsOfStandardClass())
+ {
+ if (uMsg == WM_BUTTON1DOWN && pWin->AcceptsFocus() )
+ pWin->SetFocus();
+ }
bProcessed = pWin->HandleMouseEvent( uMsg
,nX
,nY
bool wxWindowOS2::HandleDestroy()
{
wxWindowDestroyEvent vEvent((wxWindow*)this);
-
+ vEvent.SetId(GetId());
(void)GetEventHandler()->ProcessEvent(vEvent);
//
#if wxUSE_DRAG_AND_DROP
if (m_dropTarget != NULL)
{
- m_dropTarget->Revoke(m_hWnd);
delete m_dropTarget;
m_dropTarget = NULL;
}
// painting
// ---------------------------------------------------------------------------
+void wxWindow::OnPaint (
+ wxPaintEvent& rEvent
+)
+{
+ HDC hDC = (HDC)wxPaintDC::FindDCInCache((wxWindow*) rEvent.GetEventObject());
+
+ if (hDC != 0)
+ {
+ OS2DefWindowProc( (WXUINT)WM_PAINT
+ ,(WXWPARAM)hDC
+ ,(WXLPARAM)0
+ );
+ }
+} // end of wxWindow::OnPaint
+
bool wxWindowOS2::HandlePaint()
{
HRGN hRgn;