X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/93fbbe07650f0f5b47a162081160007b4d9e3b87..1722a3f626f7b29b42a22fc6329ce12fb5e8ed90:/src/os2/notebook.cpp diff --git a/src/os2/notebook.cpp b/src/os2/notebook.cpp index 7605b4d78f..d29206949e 100644 --- a/src/os2/notebook.cpp +++ b/src/os2/notebook.cpp @@ -124,6 +124,8 @@ bool wxNotebook::Create( wxWindow* pParent, long lStyle, const wxString& rsName ) { + if ( (lStyle & wxBK_ALIGN_MASK) == wxBK_DEFAULT ) + lStyle |= wxBK_TOP; // // Base init // @@ -241,6 +243,22 @@ int wxNotebook::SetSelection( size_t nPage ) return nPage; } // end of wxNotebook::SetSelection +int wxNotebook::ChangeSelection( size_t nPage ) +{ + wxCHECK_MSG( IS_VALID_PAGE(nPage), wxNOT_FOUND, wxT("notebook page out of range") ); + + if (nPage != (size_t)m_nSelection) + { + ::WinSendMsg( GetHWND() + ,BKM_TURNTOPAGE + ,MPFROMLONG((ULONG)m_alPageId[nPage]) + ,(MPARAM)0 + ); + } + m_nSelection = nPage; + return nPage; +} + bool wxNotebook::SetPageText( size_t nPage, const wxString& rsStrText ) { @@ -248,7 +266,7 @@ bool wxNotebook::SetPageText( size_t nPage, return (bool)::WinSendMsg( m_hWnd ,BKM_SETTABTEXT ,MPFROMLONG((ULONG)m_alPageId[nPage]) - ,MPFROMP((PSZ)rsStrText.c_str()) + ,MPFROMP((const char*)rsStrText.c_str()) ); } // end of wxNotebook::SetPageText @@ -319,7 +337,7 @@ bool wxNotebook::SetPageImage ( return (bool)::WinSendMsg( GetHWND() ,BKM_SETTABBITMAP ,MPFROMLONG((ULONG)m_alPageId[nPage]) - ,(MPARAM)wxFlipBmp(vBitmap.GetHBITMAP()) + ,(MPARAM)wxCopyBmp(vBitmap.GetHBITMAP(), true) ); } // end of wxNotebook::SetPageImage