// ---------------------------------------------------------------------------
bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id,
// ---------------------------------------------------------------------------
bool wxStaticBitmap::Create(wxWindow *parent, wxWindowID id,
- if ( m_isIcon && m_image.icon )
- return m_image.icon->Ok();
- else if ( m_image.bitmap )
- return m_image.bitmap->Ok();
- else
- return FALSE;
+ return m_image && m_image->Ok();
{
// reuse the current size (as wxWindow does) instead of using some
// arbitrary default size (as wxControl, our immediate base class, does)
return wxWindow::DoGetBestSize();
}
{
// reuse the current size (as wxWindow does) instead of using some
// arbitrary default size (as wxControl, our immediate base class, does)
return wxWindow::DoGetBestSize();
}
- HANDLE handle = m_isIcon ? (HANDLE)m_image.icon->GetHICON()
- : (HANDLE)m_image.bitmap->GetHBITMAP();
- ::SendMessage((HWND)m_hWnd, STM_SETIMAGE,
+ HANDLE handle = (HANDLE)m_image->GetHandle();
+ ::SendMessage(GetHwnd(), STM_SETIMAGE,
- ::MoveWindow((HWND)GetHWND(), x, y, width, height, FALSE);
+ ::MoveWindow(GetHwnd(), x, y, width, height, FALSE);