- case SC_MAXIMIZE:
- {
- wxMaximizeEvent event(m_windowId);
- event.SetEventObject(this);
- if (!GetEventHandler()->ProcessEvent(event))
- return Default();
- else
- return 0;
- break;
- }
- case SC_MINIMIZE:
- {
- wxIconizeEvent event(m_windowId);
- event.SetEventObject(this);
- if (!GetEventHandler()->ProcessEvent(event))
- return Default();
- else
- return 0;
- break;
- }
- default:
- return Default();
- }
- return 0;
-}
-
-void wxWindow::MSWOnLButtonDown(int x, int y, WXUINT flags)
-{
- wxMouseEvent event(wxEVT_LEFT_DOWN);
-
- event.m_x = x; event.m_y = y;
- event.m_shiftDown = ((flags & MK_SHIFT) != 0);
- event.m_controlDown = ((flags & MK_CONTROL) != 0);
- event.m_leftDown = ((flags & MK_LBUTTON) != 0);
- event.m_middleDown = ((flags & MK_MBUTTON) != 0);
- event.m_rightDown = ((flags & MK_RBUTTON) != 0);
- event.SetTimestamp(wxApp::sm_lastMessageTime);
- event.m_eventObject = this;
-
- m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVT_LEFT_DOWN;
-
- if (!GetEventHandler()->ProcessEvent(event))
- Default();
-}
-
-void wxWindow::MSWOnLButtonUp(int x, int y, WXUINT flags)
-{
- wxMouseEvent event(wxEVT_LEFT_UP);
-
- event.m_x = x; event.m_y = y;
- event.m_shiftDown = ((flags & MK_SHIFT) != 0);
- event.m_controlDown = ((flags & MK_CONTROL) != 0);
- event.m_leftDown = ((flags & MK_LBUTTON) != 0);
- event.m_middleDown = ((flags & MK_MBUTTON) != 0);
- event.m_rightDown = ((flags & MK_RBUTTON) != 0);
- event.SetTimestamp(wxApp::sm_lastMessageTime);
- event.m_eventObject = this;
-
- m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVT_LEFT_UP;
-
- if (!GetEventHandler()->ProcessEvent(event))
- Default();
-}
-
-void wxWindow::MSWOnLButtonDClick(int x, int y, WXUINT flags)
-{
- wxMouseEvent event(wxEVT_LEFT_DCLICK);
-
- event.m_x = x; event.m_y = y;
- event.m_shiftDown = ((flags & MK_SHIFT) != 0);
- event.m_controlDown = ((flags & MK_CONTROL) != 0);
- event.m_leftDown = ((flags & MK_LBUTTON) != 0);
- event.m_middleDown = ((flags & MK_MBUTTON) != 0);
- event.m_rightDown = ((flags & MK_RBUTTON) != 0);
- event.SetTimestamp(wxApp::sm_lastMessageTime);
- event.m_eventObject = this;
-
- m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVT_LEFT_DCLICK;
-
- if (!GetEventHandler()->ProcessEvent(event))
- Default();
-}
-
-void wxWindow::MSWOnMButtonDown(int x, int y, WXUINT flags)
-{
- wxMouseEvent event(wxEVT_MIDDLE_DOWN);
-
- event.m_x = x; event.m_y = y;
- event.m_shiftDown = ((flags & MK_SHIFT) != 0);
- event.m_controlDown = ((flags & MK_CONTROL) != 0);
- event.m_leftDown = ((flags & MK_LBUTTON) != 0);
- event.m_middleDown = ((flags & MK_MBUTTON) != 0);
- event.m_rightDown = ((flags & MK_RBUTTON) != 0);
- event.SetTimestamp(wxApp::sm_lastMessageTime);
- event.m_eventObject = this;
-
- m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVT_MIDDLE_DOWN;
-
- if (!GetEventHandler()->ProcessEvent(event))
- Default();
-}
-
-void wxWindow::MSWOnMButtonUp(int x, int y, WXUINT flags)
-{
- wxMouseEvent event(wxEVT_MIDDLE_UP);
-
- event.m_x = x; event.m_y = y;
- event.m_shiftDown = ((flags & MK_SHIFT) != 0);
- event.m_controlDown = ((flags & MK_CONTROL) != 0);
- event.m_leftDown = ((flags & MK_LBUTTON) != 0);
- event.m_middleDown = ((flags & MK_MBUTTON) != 0);
- event.m_rightDown = ((flags & MK_RBUTTON) != 0);
- event.SetTimestamp(wxApp::sm_lastMessageTime);
- event.m_eventObject = this;
-
- m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVT_MIDDLE_UP;
-
- if (!GetEventHandler()->ProcessEvent(event))
- Default();
-}
-
-void wxWindow::MSWOnMButtonDClick(int x, int y, WXUINT flags)
-{
- wxMouseEvent event(wxEVT_MIDDLE_DCLICK);
-
- event.m_x = x; event.m_y = y;
- event.m_shiftDown = ((flags & MK_SHIFT) != 0);
- event.m_controlDown = ((flags & MK_CONTROL) != 0);
- event.m_leftDown = ((flags & MK_LBUTTON) != 0);
- event.m_middleDown = ((flags & MK_MBUTTON) != 0);
- event.m_rightDown = ((flags & MK_RBUTTON) != 0);
- event.SetTimestamp(wxApp::sm_lastMessageTime);
- event.m_eventObject = this;
-
- m_lastXPos = event.m_x; m_lastYPos = event.m_y; m_lastEvent = wxEVT_MIDDLE_DCLICK;