# endif
#endif /* wxUSE_DYNAMIC_LOADER */
+#if !wxUSE_DYNLIB_CLASS
+# if wxUSE_UXTHEME
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_UXTHEME requires wxUSE_DYNLIB_CLASS"
+# else
+# undef wxUSE_UXTHEME
+# define wxUSE_UXTHEME 0
+# endif
+# endif
+# if wxUSE_MEDIACTRL
+# ifdef wxABORT_ON_CONFIG_ERROR
+# error "wxUSE_MEDIACTRL requires wxUSE_DYNLIB_CLASS"
+# else
+# undef wxUSE_MEDIACTRL
+# define wxUSE_MEDIACTRL 0
+# endif
+# endif
+#endif /* wxUSE_DYNLIB_CLASS */
+
#endif /* _WX_MSW_CHKCONF_H_ */
bmp = node->GetData()->CreateBitmap(id, client, size);
if ( bmp.Ok() )
{
-#if wxUSE_IMAGE
+#if wxUSE_IMAGE && (!defined(__WXMSW__) || wxUSE_WXDIB)
if ( size != wxDefaultSize &&
(bmp.GetWidth() != size.x || bmp.GetHeight() != size.y) )
{
{
wxBitmap bmp = wxDefaultArtProvider_CreateBitmap(id);
-#if wxUSE_IMAGE
+#if wxUSE_IMAGE && (!defined(__WXMSW__) || wxUSE_WXDIB)
if (bmp.Ok())
{
// fit into transparent image with desired size hint from the client
const wxBitmap& bitmap,
long type)
{
+#if !defined(__WXMSW__) || wxUSE_WXDIB
wxImage img = bitmap.ConvertToImage();
AddFile(filename, img, type);
+#endif
}
#endif // wxUSE_IMAGE
void wxIconBundle::AddIcon( const wxString& WXUNUSED(file), long WXUNUSED(type) )
#endif
{
-#if wxUSE_IMAGE
+#if wxUSE_IMAGE && (!defined(__WXMSW__) || wxUSE_WXDIB)
size_t count = wxImage::GetImageCount( file, type );
size_t i;
wxImage image;
bool wxRegion::Union(const wxBitmap& bmp)
{
+#if (!defined(__WXMSW__) || wxUSE_WXDIB)
if (bmp.GetMask())
{
wxImage image = bmp.ConvertToImage();
0);
}
else
+#endif
{
return Union(0, 0, bmp.GetWidth(), bmp.GetHeight());
}
const wxColour& transColour,
int tolerance)
{
+#if (!defined(__WXMSW__) || wxUSE_WXDIB)
wxImage image = bmp.ConvertToImage();
return DoRegionUnion(*this, image,
transColour.Red(),
transColour.Green(),
transColour.Blue(),
tolerance);
+#else
+ return false;
+#endif
}
#else
return m_smallImageList;
}
-#if wxUSE_MIMETYPE && wxUSE_IMAGE
+#if wxUSE_MIMETYPE && wxUSE_IMAGE && (!defined(__WXMSW__) || wxUSE_WXDIB)
// VS: we don't need this function w/o wxMimeTypesManager because we'll only have
// one icon and we won't resize it
{
m_smallImageList->Add(bmp);
}
-#if wxUSE_IMAGE
+#if wxUSE_IMAGE && (!defined(__WXMSW__) || wxUSE_WXDIB)
else
{
wxImage img = bmp.ConvertToImage();
dc2.SelectObject(wxNullBitmap);
-#if wxUSE_IMAGE_IN_DRAGIMAGE
+#if wxUSE_IMAGE_IN_DRAGIMAGE && (!defined(__WXMSW__) || wxUSE_WXDIB)
// Make the bitmap masked
wxImage image = bitmap.ConvertToImage();
image.SetMaskColour(255, 255, 255);
void wxHtmlImageCell::SetImage(const wxImage& img)
{
+#if !defined(__WXMSW__) || wxUSE_WXDIB
if ( img.Ok() )
{
delete m_bitmap;
*/
m_bitmap = new wxBitmap(img);
}
+#endif
}
#if wxUSE_GIF && wxUSE_TIMER
if ( m_window->GetClientRect().Intersects(rect) &&
m_gifDecoder->ConvertToImage(&img) )
{
+#if !defined(__WXMSW__) || wxUSE_WXDIB
if ( (int)m_gifDecoder->GetWidth() != m_Width ||
(int)m_gifDecoder->GetHeight() != m_Height ||
m_gifDecoder->GetLeft() != 0 || m_gifDecoder->GetTop() != 0 )
true /* use mask */);
}
else
+#endif
SetImage(img);
m_window->Refresh(img.HasMask(), &rect);
}
wxInputStream *is = fileBgImage->GetStream();
if ( is )
{
+#if !defined(__WXMSW__) || wxUSE_WXDIB
wxImage image(*is);
if ( image.Ok() )
m_WParser->GetWindow()->SetBackgroundImage(image);
+#endif
}
}
}
// we're prepared to handle the errors
wxLogNull noLog;
-
+
+#if wxUSE_DYNLIB_CLASS
// do we have it?
wxDynamicLibrary dllComCtl32(_T("comctl32.dll"), wxDL_VERBATIM);
}
}
}
+#endif
}
return s_verComCtl32;
// Create from XPM data
bool wxBitmap::CreateFromXpm(const char **data)
{
-#if wxUSE_IMAGE && wxUSE_XPM
+#if wxUSE_IMAGE && wxUSE_XPM && wxUSE_WXDIB
Init();
wxCHECK_MSG( data != NULL, false, wxT("invalid bitmap data") )
return handler->LoadFile(this, filename, type, -1, -1);
}
-#if wxUSE_IMAGE
+#if wxUSE_IMAGE && wxUSE_WXDIB
else // no bitmap handler found
{
wxImage image;
{
return handler->SaveFile(this, filename, type, palette);
}
-#if wxUSE_IMAGE
+#if wxUSE_IMAGE && wxUSE_WXDIB
else // no bitmap handler found
{
// FIXME what about palette? shouldn't we use it?
HCURSOR hcursor = wxBitmapToHCURSOR( wxBitmap(imageSized),
hotSpotX, hotSpotY );
+#if wxUSE_WXDIB
if ( !hcursor )
{
wxLogWarning(_("Failed to create cursor."));
return;
}
+#else
+ HCURSOR hcursor = 0;
+#endif
m_refData = new wxCursorRefData(hcursor, true /* delete it later */);
}
return false;
}
+#if wxUSE_DYNLIB_CLASS
INITCOMMONCONTROLSEX icex;
icex.dwSize = sizeof(icex);
icex.dwICC = ICC_DATE_CLASSES;
}
s_initDone = true;
+#endif
}
#include "wx/msw/debughlp.h"
-#if wxUSE_DBGHELP
+#if wxUSE_DBGHELP && wxUSE_DYNLIB_CLASS
// ----------------------------------------------------------------------------
// constants
dc2.SelectObject(wxNullBitmap);
+#if wxUSE_WXDIB
// Make the bitmap masked
wxImage image = bitmap.ConvertToImage();
image.SetMaskColour(255, 255, 255);
return Create(wxBitmap(image), cursor);
+#else
+ return false;
+#endif
}
#if wxUSE_TREECTRL
// Get the bitmap
wxBitmap wxImageList::GetBitmap(int index) const
{
+#if wxUSE_WXDIB
int bmp_width = 0, bmp_height = 0;
GetSize(index, bmp_width, bmp_height);
image = bitmap.ConvertToImage();
image.SetMaskColour(r, g, b);
bitmap = wxBitmap(image);
-
+#else
+ wxBitmap bitmap;
return bitmap;
+#endif
}
// Get the icon
memdc.SelectObject(bmp);
// if there is no special brush just use the solid background colour
+#if wxUSE_UXTHEME
HBRUSH hbr = (HBRUSH)m_hbrBackground;
+#else
+ HBRUSH hbr = 0;
+#endif
wxBrush brush;
if ( !hbr )
{
static void ResolveShellFunctions()
{
+#if wxUSE_DYNLIB_CLASS
+
// start with the newest functions, fall back to the oldest ones
#ifdef __WXWINCE__
wxString shellDllName(_T("coredll"));
// because we also link to it statically, so it's ok
gs_shellFuncs.initialized = true;
+#endif
}
// ============================================================================
if ( m_disabledImgList )
{
wxBitmap bmpDisabled = tool->GetDisabledBitmap();
-#if wxUSE_IMAGE
+#if wxUSE_IMAGE && wxUSE_WXDIB
if ( !bmpDisabled.Ok() )
{
// no disabled bitmap specified but we still need to
// Dynamic library function defs.
//+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+#if wxUSE_DYNLIB_CLASS
static wxDynamicLibrary s_mprLib;
+#endif
typedef DWORD (WINAPI* WNetOpenEnumPtr)(DWORD, DWORD, DWORD, LPNETRESOURCE, LPHANDLE);
typedef DWORD (WINAPI* WNetEnumResourcePtr)(HANDLE, LPDWORD, LPVOID, LPDWORD);
{
::InterlockedExchange(&s_cancelSearch, FALSE); // reset
+#if wxUSE_DYNLIB_CLASS
if (!s_mprLib.IsLoaded() && s_mprLib.Load(_T("mpr.dll")))
{
#ifdef UNICODE
#endif
s_pWNetCloseEnum = (WNetCloseEnumPtr)s_mprLib.GetSymbol(_T("WNetCloseEnum"));
}
+#endif
wxArrayString list;
return wxNullBitmap;
}
if (!(size == wxDefaultSize)) img.Rescale(size.x, size.y);
+#if !defined(__WXMSW__) || wxUSE_WXDIB
return wxBitmap(img);
-
+#else
+ return wxBitmap();
+#endif
}