X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7a3ac804897d5cffdf2e79556a510d31898cdf0d..b4a2ab728bf4627ab2b41385b69e31f10c1fd3b1:/src/msw/notebook.cpp?ds=sidebyside diff --git a/src/msw/notebook.cpp b/src/msw/notebook.cpp index fe431a1234..5ffffe5781 100644 --- a/src/msw/notebook.cpp +++ b/src/msw/notebook.cpp @@ -62,6 +62,23 @@ // hide the ugly cast #define m_hwnd (HWND)GetHWND() +// ---------------------------------------------------------------------------- +// constants +// ---------------------------------------------------------------------------- + +// This is a work-around for missing defines in gcc-2.95 headers +#ifndef TCS_RIGHT + #define TCS_RIGHT 0x0002 +#endif + +#ifndef TCS_VERTICAL + #define TCS_VERTICAL 0x0080 +#endif + +#ifndef TCS_BOTTOM + #define TCS_BOTTOM TCS_RIGHT +#endif + // ---------------------------------------------------------------------------- // event table // ---------------------------------------------------------------------------- @@ -195,7 +212,7 @@ int wxNotebook::GetRowCount() const int wxNotebook::SetSelection(int nPage) { - wxCHECK_MSG( IS_VALID_PAGE(nPage), -1, _T("notebook page out of range") ); + wxCHECK_MSG( IS_VALID_PAGE(nPage), -1, T("notebook page out of range") ); ChangePage(m_nSelection, nPage); @@ -214,7 +231,7 @@ void wxNotebook::AdvanceSelection(bool bForward) bool wxNotebook::SetPageText(int nPage, const wxString& strText) { - wxCHECK_MSG( IS_VALID_PAGE(nPage), FALSE, _T("notebook page out of range") ); + wxCHECK_MSG( IS_VALID_PAGE(nPage), FALSE, T("notebook page out of range") ); TC_ITEM tcItem; tcItem.mask = TCIF_TEXT; @@ -225,7 +242,7 @@ bool wxNotebook::SetPageText(int nPage, const wxString& strText) wxString wxNotebook::GetPageText(int nPage) const { - wxCHECK_MSG( IS_VALID_PAGE(nPage), _T(""), _T("notebook page out of range") ); + wxCHECK_MSG( IS_VALID_PAGE(nPage), T(""), T("notebook page out of range") ); wxChar buf[256]; TC_ITEM tcItem; @@ -242,7 +259,7 @@ wxString wxNotebook::GetPageText(int nPage) const int wxNotebook::GetPageImage(int nPage) const { - wxCHECK_MSG( IS_VALID_PAGE(nPage), -1, _T("notebook page out of range") ); + wxCHECK_MSG( IS_VALID_PAGE(nPage), -1, T("notebook page out of range") ); TC_ITEM tcItem; tcItem.mask = TCIF_IMAGE; @@ -252,7 +269,7 @@ int wxNotebook::GetPageImage(int nPage) const bool wxNotebook::SetPageImage(int nPage, int nImage) { - wxCHECK_MSG( IS_VALID_PAGE(nPage), FALSE, _T("notebook page out of range") ); + wxCHECK_MSG( IS_VALID_PAGE(nPage), FALSE, T("notebook page out of range") ); TC_ITEM tcItem; tcItem.mask = TCIF_IMAGE; @@ -282,7 +299,7 @@ void wxNotebook::SetTabSize(const wxSize& sz) // remove one page from the notebook bool wxNotebook::DeletePage(int nPage) { - wxCHECK_MSG( IS_VALID_PAGE(nPage), FALSE, _T("notebook page out of range") ); + wxCHECK_MSG( IS_VALID_PAGE(nPage), FALSE, T("notebook page out of range") ); if ( m_nSelection == nPage ) { // advance selection backwards - the page being deleted shouldn't be left @@ -306,7 +323,7 @@ bool wxNotebook::DeletePage(int nPage) // remove one page from the notebook, without deleting bool wxNotebook::RemovePage(int nPage) { - wxCHECK_MSG( IS_VALID_PAGE(nPage), FALSE, _T("notebook page out of range") ); + wxCHECK_MSG( IS_VALID_PAGE(nPage), FALSE, T("notebook page out of range") ); TabCtrl_DeleteItem(m_hwnd, nPage); @@ -368,7 +385,7 @@ bool wxNotebook::InsertPage(int nPage, } if ( TabCtrl_InsertItem(m_hwnd, nPage, &tcItem) == -1 ) { - wxLogError(_T("Can't create the notebook page '%s'."), strText.c_str()); + wxLogError(T("Can't create the notebook page '%s'."), strText.c_str()); return FALSE; }