[ 1357527 ] Cast to void to silence GCC's warnings.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1214,7 +1214,7 @@ void wxListCtrl::SetImageList(wxImageList *imageList, int which)
|
||||
m_imageListState = imageList;
|
||||
m_ownsImageListState = false;
|
||||
}
|
||||
ListView_SetImageList(GetHwnd(), (HIMAGELIST) imageList ? imageList->GetHIMAGELIST() : 0, flags);
|
||||
(void) ListView_SetImageList(GetHwnd(), (HIMAGELIST) imageList ? imageList->GetHIMAGELIST() : 0, flags);
|
||||
}
|
||||
|
||||
void wxListCtrl::AssignImageList(wxImageList *imageList, int which)
|
||||
@@ -2766,7 +2766,7 @@ static void wxConvertToMSWListItem(const wxListCtrl *ctrl,
|
||||
// pszText is not const, hence the cast
|
||||
lvItem.pszText = (wxChar *)info.m_text.c_str();
|
||||
if ( lvItem.pszText )
|
||||
lvItem.cchTextMax = info.m_text.Length();
|
||||
lvItem.cchTextMax = info.m_text.length();
|
||||
else
|
||||
lvItem.cchTextMax = 0;
|
||||
}
|
||||
@@ -2835,4 +2835,3 @@ static void wxConvertToMSWListCol(int WXUNUSED(col), const wxListItem& item,
|
||||
}
|
||||
|
||||
#endif // wxUSE_LISTCTRL
|
||||
|
||||
|
@@ -408,97 +408,97 @@ wxNotebook::~wxNotebook()
|
||||
|
||||
size_t wxNotebook::GetPageCount() const
|
||||
{
|
||||
// consistency check
|
||||
wxASSERT( (int)m_pages.Count() == TabCtrl_GetItemCount(GetHwnd()) );
|
||||
// consistency check
|
||||
wxASSERT( (int)m_pages.Count() == TabCtrl_GetItemCount(GetHwnd()) );
|
||||
|
||||
return m_pages.Count();
|
||||
return m_pages.Count();
|
||||
}
|
||||
|
||||
int wxNotebook::GetRowCount() const
|
||||
{
|
||||
return TabCtrl_GetRowCount(GetHwnd());
|
||||
return TabCtrl_GetRowCount(GetHwnd());
|
||||
}
|
||||
|
||||
int wxNotebook::SetSelection(size_t nPage)
|
||||
{
|
||||
wxCHECK_MSG( IS_VALID_PAGE(nPage), wxNOT_FOUND, wxT("notebook page out of range") );
|
||||
wxCHECK_MSG( IS_VALID_PAGE(nPage), wxNOT_FOUND, wxT("notebook page out of range") );
|
||||
|
||||
if ( int(nPage) != m_nSelection )
|
||||
{
|
||||
wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, m_windowId);
|
||||
event.SetSelection(nPage);
|
||||
event.SetOldSelection(m_nSelection);
|
||||
event.SetEventObject(this);
|
||||
if ( !GetEventHandler()->ProcessEvent(event) || event.IsAllowed() )
|
||||
if ( int(nPage) != m_nSelection )
|
||||
{
|
||||
// program allows the page change
|
||||
event.SetEventType(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED);
|
||||
(void)GetEventHandler()->ProcessEvent(event);
|
||||
wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, m_windowId);
|
||||
event.SetSelection(nPage);
|
||||
event.SetOldSelection(m_nSelection);
|
||||
event.SetEventObject(this);
|
||||
if ( !GetEventHandler()->ProcessEvent(event) || event.IsAllowed() )
|
||||
{
|
||||
// program allows the page change
|
||||
event.SetEventType(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED);
|
||||
(void)GetEventHandler()->ProcessEvent(event);
|
||||
|
||||
TabCtrl_SetCurSel(GetHwnd(), nPage);
|
||||
TabCtrl_SetCurSel(GetHwnd(), nPage);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return m_nSelection;
|
||||
return m_nSelection;
|
||||
}
|
||||
|
||||
bool wxNotebook::SetPageText(size_t nPage, const wxString& strText)
|
||||
{
|
||||
wxCHECK_MSG( IS_VALID_PAGE(nPage), false, wxT("notebook page out of range") );
|
||||
wxCHECK_MSG( IS_VALID_PAGE(nPage), false, wxT("notebook page out of range") );
|
||||
|
||||
TC_ITEM tcItem;
|
||||
tcItem.mask = TCIF_TEXT;
|
||||
tcItem.pszText = (wxChar *)strText.c_str();
|
||||
TC_ITEM tcItem;
|
||||
tcItem.mask = TCIF_TEXT;
|
||||
tcItem.pszText = (wxChar *)strText.c_str();
|
||||
|
||||
return TabCtrl_SetItem(GetHwnd(), nPage, &tcItem) != 0;
|
||||
return TabCtrl_SetItem(GetHwnd(), nPage, &tcItem) != 0;
|
||||
}
|
||||
|
||||
wxString wxNotebook::GetPageText(size_t nPage) const
|
||||
{
|
||||
wxCHECK_MSG( IS_VALID_PAGE(nPage), wxEmptyString, wxT("notebook page out of range") );
|
||||
wxCHECK_MSG( IS_VALID_PAGE(nPage), wxEmptyString, wxT("notebook page out of range") );
|
||||
|
||||
wxChar buf[256];
|
||||
TC_ITEM tcItem;
|
||||
tcItem.mask = TCIF_TEXT;
|
||||
tcItem.pszText = buf;
|
||||
tcItem.cchTextMax = WXSIZEOF(buf);
|
||||
wxChar buf[256];
|
||||
TC_ITEM tcItem;
|
||||
tcItem.mask = TCIF_TEXT;
|
||||
tcItem.pszText = buf;
|
||||
tcItem.cchTextMax = WXSIZEOF(buf);
|
||||
|
||||
wxString str;
|
||||
if ( TabCtrl_GetItem(GetHwnd(), nPage, &tcItem) )
|
||||
str = tcItem.pszText;
|
||||
wxString str;
|
||||
if ( TabCtrl_GetItem(GetHwnd(), nPage, &tcItem) )
|
||||
str = tcItem.pszText;
|
||||
|
||||
return str;
|
||||
return str;
|
||||
}
|
||||
|
||||
int wxNotebook::GetPageImage(size_t nPage) const
|
||||
{
|
||||
wxCHECK_MSG( IS_VALID_PAGE(nPage), wxNOT_FOUND, wxT("notebook page out of range") );
|
||||
wxCHECK_MSG( IS_VALID_PAGE(nPage), wxNOT_FOUND, wxT("notebook page out of range") );
|
||||
|
||||
TC_ITEM tcItem;
|
||||
tcItem.mask = TCIF_IMAGE;
|
||||
TC_ITEM tcItem;
|
||||
tcItem.mask = TCIF_IMAGE;
|
||||
|
||||
return TabCtrl_GetItem(GetHwnd(), nPage, &tcItem) ? tcItem.iImage : wxNOT_FOUND;
|
||||
return TabCtrl_GetItem(GetHwnd(), nPage, &tcItem) ? tcItem.iImage : wxNOT_FOUND;
|
||||
}
|
||||
|
||||
bool wxNotebook::SetPageImage(size_t nPage, int nImage)
|
||||
{
|
||||
wxCHECK_MSG( IS_VALID_PAGE(nPage), false, wxT("notebook page out of range") );
|
||||
wxCHECK_MSG( IS_VALID_PAGE(nPage), false, wxT("notebook page out of range") );
|
||||
|
||||
TC_ITEM tcItem;
|
||||
tcItem.mask = TCIF_IMAGE;
|
||||
tcItem.iImage = nImage;
|
||||
TC_ITEM tcItem;
|
||||
tcItem.mask = TCIF_IMAGE;
|
||||
tcItem.iImage = nImage;
|
||||
|
||||
return TabCtrl_SetItem(GetHwnd(), nPage, &tcItem) != 0;
|
||||
return TabCtrl_SetItem(GetHwnd(), nPage, &tcItem) != 0;
|
||||
}
|
||||
|
||||
void wxNotebook::SetImageList(wxImageList* imageList)
|
||||
{
|
||||
wxNotebookBase::SetImageList(imageList);
|
||||
wxNotebookBase::SetImageList(imageList);
|
||||
|
||||
if ( imageList )
|
||||
{
|
||||
TabCtrl_SetImageList(GetHwnd(), (HIMAGELIST)imageList->GetHIMAGELIST());
|
||||
}
|
||||
if ( imageList )
|
||||
{
|
||||
(void) TabCtrl_SetImageList(GetHwnd(), (HIMAGELIST)imageList->GetHIMAGELIST());
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// Name: tabctrl.cpp
|
||||
// Name: src/msw/tabctrl.cpp
|
||||
// Purpose: wxTabCtrl
|
||||
// Author: Julian Smart
|
||||
// Modified by:
|
||||
@@ -315,7 +315,7 @@ int wxTabCtrl::SetSelection(int item)
|
||||
void wxTabCtrl::SetImageList(wxImageList* imageList)
|
||||
{
|
||||
m_imageList = imageList;
|
||||
TabCtrl_SetImageList( (HWND) GetHWND(), (HIMAGELIST) imageList->GetHIMAGELIST() );
|
||||
(void) TabCtrl_SetImageList( (HWND) GetHWND(), (HIMAGELIST) imageList->GetHIMAGELIST() );
|
||||
}
|
||||
|
||||
// Set the text for an item
|
||||
@@ -430,5 +430,4 @@ void wxMapBitmap(HBITMAP hBitmap, int width, int height)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
// __WIN95__
|
||||
#endif // __WIN95__
|
||||
|
@@ -835,9 +835,9 @@ void wxTreeCtrl::SetIndent(unsigned int indent)
|
||||
void wxTreeCtrl::SetAnyImageList(wxImageList *imageList, int which)
|
||||
{
|
||||
// no error return
|
||||
TreeView_SetImageList(GetHwnd(),
|
||||
imageList ? imageList->GetHIMAGELIST() : 0,
|
||||
which);
|
||||
(void) TreeView_SetImageList(GetHwnd(),
|
||||
imageList ? imageList->GetHIMAGELIST() : 0,
|
||||
which);
|
||||
}
|
||||
|
||||
void wxTreeCtrl::SetImageList(wxImageList *imageList)
|
||||
@@ -2020,7 +2020,7 @@ wxTreeItemId wxTreeCtrl::DoTreeHitTest(const wxPoint& point, int& flags)
|
||||
hitTestInfo.pt.x = (int)point.x;
|
||||
hitTestInfo.pt.y = (int)point.y;
|
||||
|
||||
TreeView_HitTest(GetHwnd(), &hitTestInfo);
|
||||
(void) TreeView_HitTest(GetHwnd(), &hitTestInfo);
|
||||
|
||||
flags = 0;
|
||||
|
||||
@@ -2210,12 +2210,12 @@ WXLRESULT wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara
|
||||
int x = GET_X_LPARAM(lParam),
|
||||
y = GET_Y_LPARAM(lParam);
|
||||
HTREEITEM htItem = GetItemFromPoint(GetHwnd(), x, y);
|
||||
|
||||
|
||||
TV_HITTESTINFO tvht;
|
||||
tvht.pt.x = x;
|
||||
tvht.pt.y = y;
|
||||
|
||||
TreeView_HitTest(GetHwnd(), &tvht);
|
||||
|
||||
(void) TreeView_HitTest(GetHwnd(), &tvht);
|
||||
|
||||
switch ( nMsg )
|
||||
{
|
||||
@@ -2240,7 +2240,7 @@ WXLRESULT wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara
|
||||
{
|
||||
m_htClickedItem = (WXHTREEITEM) htItem;
|
||||
m_ptClick = wxPoint(x, y);
|
||||
|
||||
|
||||
if ( wParam & MK_CONTROL )
|
||||
{
|
||||
SetFocus();
|
||||
@@ -2280,7 +2280,7 @@ WXLRESULT wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara
|
||||
{
|
||||
// avoid doing anything if we click on the only
|
||||
// currently selected item
|
||||
|
||||
|
||||
SetFocus();
|
||||
|
||||
wxArrayTreeItemIds selections;
|
||||
@@ -2334,29 +2334,29 @@ WXLRESULT wxTreeCtrl::MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lPara
|
||||
tv.hdr.hwndFrom = GetHwnd();
|
||||
tv.hdr.idFrom = ::GetWindowLong( GetHwnd(), GWL_ID );
|
||||
tv.hdr.code = TVN_BEGINDRAG;
|
||||
|
||||
|
||||
tv.itemNew.hItem = HITEM(m_htClickedItem);
|
||||
|
||||
|
||||
TVITEM tviAux;
|
||||
ZeroMemory(&tviAux, sizeof(tviAux));
|
||||
tviAux.hItem = HITEM(m_htClickedItem);
|
||||
tviAux.mask = TVIF_STATE | TVIF_PARAM;
|
||||
tviAux.stateMask = 0xffffffff;
|
||||
TreeView_GetItem( GetHwnd(), &tviAux );
|
||||
|
||||
|
||||
tv.itemNew.state = tviAux.state;
|
||||
tv.itemNew.lParam = tviAux.lParam;
|
||||
|
||||
|
||||
tv.ptDrag.x = x;
|
||||
tv.ptDrag.y = y;
|
||||
|
||||
|
||||
::SendMessage( pWnd, WM_NOTIFY, tv.hdr.idFrom, (LPARAM)&tv );
|
||||
}
|
||||
m_htClickedItem.Unset();
|
||||
}
|
||||
}
|
||||
#endif // __WXWINCE__
|
||||
|
||||
|
||||
if ( m_dragImage )
|
||||
{
|
||||
m_dragImage->Move(wxPoint(x, y));
|
||||
@@ -3152,4 +3152,3 @@ int wxTreeCtrl::GetState(const wxTreeItemId& node)
|
||||
}
|
||||
|
||||
#endif // wxUSE_TREECTRL
|
||||
|
||||
|
Reference in New Issue
Block a user