]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/bitmap.cpp
implemented bsearch() for CE; added src/msw/wince/crt.cpp
[wxWidgets.git] / src / msw / bitmap.cpp
index 12294cdc71130308123c380562ab7120813eaa3e..37e69a0e5c995feb00b1d272cb520a75011d1d38 100644 (file)
@@ -275,13 +275,7 @@ bool wxBitmap::CopyFromCursor(const wxCursor& cursor)
     if ( !cursor.Ok() )
         return FALSE;
 
-#ifdef __WIN16__
-    wxFAIL_MSG( _T("don't know how to convert cursor to bitmap") );
-
-    return FALSE;
-#else
     return CopyFromIconOrCursor(cursor);
-#endif // Win16
 }
 
 bool wxBitmap::CopyFromIcon(const wxIcon& icon)
@@ -291,37 +285,7 @@ bool wxBitmap::CopyFromIcon(const wxIcon& icon)
     if ( !icon.Ok() )
         return FALSE;
 
-    // GetIconInfo() doesn't exist under Win16 and I don't know any other way
-    // to create a bitmap from icon there - but using this way we won't have
-    // the mask (FIXME)
-#ifdef __WIN16__
-    int width = icon.GetWidth(),
-        height = icon.GetHeight();
-
-    // copy the icon to the bitmap
-    ScreenHDC hdcScreen;
-    HDC hdc = ::CreateCompatibleDC(hdcScreen);
-    HBITMAP hbitmap = ::CreateCompatibleBitmap(hdcScreen, width, height);
-    HBITMAP hbmpOld = (HBITMAP)::SelectObject(hdc, hbitmap);
-
-    ::DrawIcon(hdc, 0, 0, GetHiconOf(icon));
-
-    ::SelectObject(hdc, hbmpOld);
-    ::DeleteDC(hdc);
-
-    wxBitmapRefData *refData = new wxBitmapRefData;
-    m_refData = refData;
-
-    refData->m_width = width;
-    refData->m_height = height;
-    refData->m_depth = wxDisplayDepth();
-
-    refData->m_hBitmap = (WXHBITMAP)hbitmap;
-
-    return TRUE;
-#else // Win32
     return CopyFromIconOrCursor(icon);
-#endif // Win16/Win32
 }
 
 #if wxUSE_WXDIB
@@ -362,47 +326,6 @@ wxBitmap::~wxBitmap()
 {
 }
 
-wxBitmap::wxBitmap()
-{
-    Init();
-}
-
-wxBitmap::wxBitmap(const wxBitmap& bitmap)
-{
-    Init();
-    Ref(bitmap);
-}
-
-wxBitmap::wxBitmap(const char **data)
-{
-    CreateFromXpm(data);
-}
-
-wxBitmap::wxBitmap(char **data)
-{
-    CreateFromXpm((const char **)data);
-}
-
-#if wxUSE_IMAGE
-
-wxBitmap::wxBitmap(const wxImage& image, int depth)
-{
-    (void)CreateFromImage(image, depth);
-}
-
-wxBitmap::wxBitmap(const wxImage& image, const wxDC& dc)
-{
-    (void)CreateFromImage(image, dc);
-}
-
-#endif // wxUSE_IMAGE
-
-wxBitmap::wxBitmap(const wxIcon& icon)
-{
-    Init();
-    CopyFromIcon(icon);
-}
-
 wxBitmap::wxBitmap(const char bits[], int width, int height, int depth)
 {
     Init();
@@ -470,7 +393,11 @@ wxBitmap::wxBitmap(const char bits[], int width, int height, int depth)
 }
 
 // Create from XPM data
+#if wxUSE_IMAGE && wxUSE_XPM
 bool wxBitmap::CreateFromXpm(const char **data)
+#else
+bool wxBitmap::CreateFromXpm(const char **WXUNUSED(data))
+#endif
 {
 #if wxUSE_IMAGE && wxUSE_XPM
     Init();
@@ -561,10 +488,6 @@ bool wxBitmap::DoCreate(int w, int h, int d, WXHDC hdc)
     else // create a DDB
 #endif
     {
-        if ( d == -1 )
-            d = wxDisplayDepth();
-
-        GetBitmapData()->m_depth = d;
 
 #ifndef __WXMICROWIN__
         if ( d > 0 )