X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3b9e3455225b670d30ee0fb67f8821ada9640f6d..91b4bd63177025704dd39679a2a7c4198eeb7909:/src/os2/statbmp.cpp diff --git a/src/os2/statbmp.cpp b/src/os2/statbmp.cpp index a04f0547cd..d06a109a0e 100644 --- a/src/os2/statbmp.cpp +++ b/src/os2/statbmp.cpp @@ -9,6 +9,10 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// +#ifdef __GNUG__ +#pragma implementation "statbmp.h" +#endif + // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -26,9 +30,7 @@ // macors // --------------------------------------------------------------------------- -#if !USE_SHARED_LIBRARY IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl) -#endif // --------------------------------------------------------------------------- // wxStaticBitmap @@ -47,22 +49,23 @@ bool wxStaticBitmap::Create( Init(); SetName(rName); - if (pParent) parent->AddChild(this); + if (pParent) + pParent->AddChild(this); - m_backgroundColour = parent->GetBackgroundColour() ; - m_foregroundColour = parent->GetForegroundColour() ; + m_backgroundColour = pParent->GetBackgroundColour() ; + m_foregroundColour = pParent->GetForegroundColour() ; - if ( id == -1 ) + if (nId == -1) m_windowId = (int)NewControlId(); else m_windowId = nId; m_windowStyle = lStyle; - int nX= pos.x; - int nY = pos.y; - int nWidth = size.x; - int nHeight = size.y; + int nX= rPos.x; + int nY = rPos.y; + int nWidth = rSize.x; + int nHeight = rSize.y; m_windowStyle = lStyle; @@ -70,9 +73,9 @@ bool wxStaticBitmap::Create( // TODO: create static bitmap control const wxChar* zClassname = wxT("WX_STATIC"); - int nWinstyle ? SS_ICON : SS_BITMAP; + int nWinstyle = m_bIsIcon ? SS_ICON : SS_BITMAP; - m_hWnd = (WXWHND)::WinCreateWindow( pParent->GetHWND() + m_hWnd = (WXHWND)::WinCreateWindow( pParent->GetHWND() ,zClassname ,wxT("") ,nWinstyle | WS_VISIBLE @@ -90,14 +93,14 @@ bool wxStaticBitmap::Create( // Subclass again for purposes of dialog editing mode SubclassWin(m_hWnd); - SetFont(GetParent()->GetFont()); + SetFont(*wxSMALL_FONT); SetSize(nX, nY, nWidth, nHeight); return(FALSE); } bool wxStaticBitmap::ImageIsOk() const { - return(m_pImage ** m_pImage->Ok()); + return(m_pImage && m_pImage->Ok()); } void wxStaticBitmap::Free() @@ -131,7 +134,7 @@ void wxStaticBitmap::SetImage( int nH; GetPosition(&nX, &nY); - GetSize(&nW, &nHh); + GetSize(&nW, &nH); ::WinSendMsg( GetHwnd() ,SM_SETHANDLE @@ -169,3 +172,11 @@ void wxStaticBitmap::SetImage( ::WinInvalidateRect(GetHwndOf(GetParent()), &vRect, TRUE); } +MRESULT wxStaticBitmap::OS2WindowProc( + WXUINT uMsg +, WXWPARAM wParam +, WXLPARAM lParam +) +{ + return wxWindow::OS2WindowProc(uMsg, wParam, lParam); +} // end of wxStaticBitmap::OS2WindowProc