+ SetName(rName);
+ if (pParent)
+ pParent->AddChild(this);
+
+ if (nId == -1)
+ m_windowId = (int)NewControlId();
+ else
+ m_windowId = nId;
+
+ m_windowStyle = lStyle;
+
+ int nX= rPos.x;
+ int nY = rPos.y;
+ char zId[16];
+
+ m_windowStyle = lStyle;
+
+ 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));