1. wxSpinButton fixed: it now sends EVT_SPIN_UP/DOWN messages (and unnecessary
old code which didn't send them anyhow removed). It also allows to veto the changes, but this feature is not portable and as such is not documented. 2. wxBitmapBuuton doesn't lose its bitmap any more 3. wxImage::ConvertToBitmap() doesn't crash if image is !Ok() but just returns wxNullBitmap. 4. wxProgressDialog looks much nicer under Windows and its estimated/elapsed/ remaining time fields actually show some non random numbers now 5. MDI client window doesn't flicker because wxMDIParentFrame doesn't position it at (0, 0) first before moving it to correct location 6. other minor fixes... git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3181 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -115,7 +115,7 @@ wxSpinButton::~wxSpinButton()
|
||||
|
||||
int wxSpinButton::GetValue() const
|
||||
{
|
||||
return LOWORD(::SendMessage(GetHwnd(), UDM_GETPOS, 0, 0));
|
||||
return (short)LOWORD(::SendMessage(GetHwnd(), UDM_GETPOS, 0, 0));
|
||||
}
|
||||
|
||||
void wxSpinButton::SetValue(int val)
|
||||
@@ -133,52 +133,38 @@ void wxSpinButton::SetRange(int minVal, int maxVal)
|
||||
bool wxSpinButton::MSWOnScroll(int orientation, WXWORD wParam,
|
||||
WXWORD pos, WXHWND control)
|
||||
{
|
||||
if ( !control )
|
||||
return FALSE;
|
||||
wxCHECK_MSG( control, FALSE, _T("scrolling what?") )
|
||||
|
||||
wxSpinEvent event(wxEVT_NULL, m_windowId);
|
||||
event.SetPosition(pos);
|
||||
event.SetOrientation(orientation);
|
||||
event.SetEventObject(this);
|
||||
|
||||
switch ( wParam )
|
||||
if ( wParam != SB_THUMBPOSITION )
|
||||
{
|
||||
case SB_TOP:
|
||||
event.m_eventType = wxEVT_SCROLL_TOP;
|
||||
break;
|
||||
|
||||
case SB_BOTTOM:
|
||||
event.m_eventType = wxEVT_SCROLL_BOTTOM;
|
||||
break;
|
||||
|
||||
case SB_LINEUP:
|
||||
event.m_eventType = wxEVT_SCROLL_LINEUP;
|
||||
break;
|
||||
|
||||
case SB_LINEDOWN:
|
||||
event.m_eventType = wxEVT_SCROLL_LINEDOWN;
|
||||
break;
|
||||
|
||||
case SB_PAGEUP:
|
||||
event.m_eventType = wxEVT_SCROLL_PAGEUP;
|
||||
break;
|
||||
|
||||
case SB_PAGEDOWN:
|
||||
event.m_eventType = wxEVT_SCROLL_PAGEDOWN;
|
||||
break;
|
||||
|
||||
case SB_THUMBTRACK:
|
||||
case SB_THUMBPOSITION:
|
||||
event.m_eventType = wxEVT_SCROLL_THUMBTRACK;
|
||||
break;
|
||||
|
||||
default:
|
||||
return FALSE;
|
||||
// probable SB_ENDSCROLL - we don't react to it
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
wxSpinEvent event(wxEVT_SCROLL_THUMBTRACK, m_windowId);
|
||||
event.SetPosition((short)pos); // cast is important for negative values!
|
||||
event.SetEventObject(this);
|
||||
|
||||
return GetEventHandler()->ProcessEvent(event);
|
||||
}
|
||||
|
||||
bool wxSpinButton::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
|
||||
{
|
||||
LPNMUPDOWN lpnmud = (LPNMUPDOWN)lParam;
|
||||
|
||||
wxSpinEvent event(lpnmud->iDelta > 0 ? wxEVT_SCROLL_LINEUP
|
||||
: wxEVT_SCROLL_LINEDOWN,
|
||||
m_windowId);
|
||||
event.SetPosition(lpnmud->iPos + lpnmud->iDelta);
|
||||
event.SetEventObject(this);
|
||||
|
||||
bool processed = GetEventHandler()->ProcessEvent(event);
|
||||
|
||||
*result = event.IsAllowed() ? 0 : 1;
|
||||
|
||||
return processed;
|
||||
}
|
||||
|
||||
bool wxSpinButton::MSWCommand(WXUINT cmd, WXWORD id)
|
||||
{
|
||||
// No command messages
|
||||
|
||||
Reference in New Issue
Block a user