git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38294
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// recalculate the scrollbars parameters
if(m_rowsFirst >= rowCount)
// recalculate the scrollbars parameters
if(m_rowsFirst >= rowCount)
- m_rowsFirst = rowCount-1;
+ m_rowsFirst = (rowCount > 0) ? rowCount - 1 : 0;
if(m_columnsFirst >= columnCount)
if(m_columnsFirst >= columnCount)
- m_columnsFirst = columnCount-1;
+ m_columnsFirst = (columnCount > 0) ? columnCount - 1 : 0;
+#if 0
+ // checks disabled due to size_t type of members
+ // but leave them here if anyone would want to do some debugging
if(m_rowsFirst < 0)
m_rowsFirst = 0;
if(m_columnsFirst < 0)
m_columnsFirst = 0;
if(m_rowsFirst < 0)
m_rowsFirst = 0;
if(m_columnsFirst < 0)
m_columnsFirst = 0;
ScrollToRowColumn(m_rowsFirst, m_columnsFirst);
}
ScrollToRowColumn(m_rowsFirst, m_columnsFirst);
}
//---------------------------------------------------------------------------
// End wxMediaCtrl Compilation Guard and this file
//---------------------------------------------------------------------------
//---------------------------------------------------------------------------
// End wxMediaCtrl Compilation Guard and this file
//---------------------------------------------------------------------------
-#endif // wxUSE_MEDIACTRL
\ No newline at end of file
+#endif // wxUSE_MEDIACTRL
hret = cp->Advise(new wxActiveXEvents(this, ta->guid),
&adviseCookie);
wxASSERT_MSG( SUCCEEDED(hret),
hret = cp->Advise(new wxActiveXEvents(this, ta->guid),
&adviseCookie);
wxASSERT_MSG( SUCCEEDED(hret),
- wxString::Format(wxT("Cannot connect!\nHRESULT:%X"), hret)
+ wxString::Format(wxT("Cannot connect!\nHRESULT:%X"), (unsigned int)hret)