+ m_bIsIcon = rBitmap.IsKindOf(CLASSINFO(wxIcon));
+
+ //
+ // For now we only support an ICON
+ //
+ int nWinstyle = SS_ICON;
+
+ m_hWnd = (WXHWND)::WinCreateWindow( pParent->GetHWND()
+ ,(PSZ)wxCanvasClassName
+ ,zId
+ ,nWinstyle | WS_VISIBLE
+ ,0,0,0,0
+ ,pParent->GetHWND()
+ ,HWND_TOP
+ ,m_windowId
+ ,NULL
+ ,NULL
+ );
+ if (!m_hWnd)
+ {
+ vError = ::WinGetLastError(wxGetInstance());
+ sError = wxPMErrorToStr(vError);
+ return FALSE;
+ }
+ wxCHECK_MSG( m_hWnd, FALSE, wxT("Failed to create static bitmap") );
+ m_pImage = ConvertImage(rBitmap);
+ m_pImage->SetHandle((WXHWND)::WinSendMsg(m_hWnd, SM_QUERYHANDLE, (MPARAM)0, (MPARAM)0));
+
+ // Subclass again for purposes of dialog editing mode
+ SubclassWin(m_hWnd);
+ SetSize(nX, nY, m_pImage->GetWidth(), m_pImage->GetHeight());
+
+ return(TRUE);
+} // end of wxStaticBitmap::Create
+
+bool wxStaticBitmap::ImageIsOk() const
+{
+ return(m_pImage && m_pImage->Ok());