Partially applied patch [ 531199 ] new EVT_MOVING and EVT_SIZING

Changed to reuse wxMoveEvent, wxSizeEvent
Only applied the Mac part as a TODO comment


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@20816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2003-06-01 14:37:28 +00:00
parent 5c5428f913
commit 5706de1cf4
6 changed files with 217 additions and 1 deletions

View File

@@ -2188,6 +2188,24 @@ long wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam
processed = HandleMove(GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam));
break;
case WM_MOVING:
{
LPRECT pRect = (LPRECT)lParam;
wxRect rc;
rc.SetLeft(pRect->left);
rc.SetTop(pRect->top);
rc.SetRight(pRect->right);
rc.SetBottom(pRect->bottom);
processed = HandleMoving(rc);
if (processed) {
pRect->left = rc.GetLeft();
pRect->top = rc.GetTop();
pRect->right = rc.GetRight();
pRect->bottom = rc.GetBottom();
}
}
break;
case WM_SIZE:
switch ( wParam )
{
@@ -2216,6 +2234,24 @@ long wxWindowMSW::MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam
}
break;
case WM_SIZING:
{
LPRECT pRect = (LPRECT)lParam;
wxRect rc;
rc.SetLeft(pRect->left);
rc.SetTop(pRect->top);
rc.SetRight(pRect->right);
rc.SetBottom(pRect->bottom);
processed = HandleSizing(rc);
if (processed) {
pRect->left = rc.GetLeft();
pRect->top = rc.GetTop();
pRect->right = rc.GetRight();
pRect->bottom = rc.GetBottom();
}
}
break;
#ifndef __WXMICROWIN__
case WM_ACTIVATEAPP:
wxTheApp->SetActive(wParam != 0, FindFocus());
@@ -3818,6 +3854,17 @@ bool wxWindowMSW::HandleMove(int x, int y)
return GetEventHandler()->ProcessEvent(event);
}
bool wxWindowMSW::HandleMoving(wxRect& rect)
{
wxMoveEvent event(rect, m_windowId);
event.SetEventObject(this);
bool rc = GetEventHandler()->ProcessEvent(event);
if (rc)
rect = event.GetRect();
return rc;
}
bool wxWindowMSW::HandleSize(int WXUNUSED(w), int WXUNUSED(h),
WXUINT WXUNUSED(flag))
{
@@ -3830,6 +3877,17 @@ bool wxWindowMSW::HandleSize(int WXUNUSED(w), int WXUNUSED(h),
return GetEventHandler()->ProcessEvent(event);
}
bool wxWindowMSW::HandleSizing(wxRect& rect)
{
wxSizeEvent event(rect, m_windowId);
event.SetEventObject(this);
bool rc = GetEventHandler()->ProcessEvent(event);
if (rc)
rect = event.GetRect();
return rc;
}
bool wxWindowMSW::HandleGetMinMaxInfo(void *mmInfo)
{
MINMAXINFO *info = (MINMAXINFO *)mmInfo;