- wxCHECK_MSG( m_dataObjectLast, url, _T("no data in wxURLDataObject") );
-
- size_t len = m_dataObjectLast->GetDataSize();
-
- m_dataObjectLast->GetDataHere(url.GetWriteBuf(len));
- url.UngetWriteBuf();
-
- return url;
-}
-
-void wxURLDataObject::SetURL(const wxString& url)
-{
- SetData(wxDataFormat(wxDF_TEXT), url.Length()+1, url.c_str());
- SetData(wxDataFormat(CFSTR_SHELLURL), url.Length()+1, url.c_str());
-}
-
-// ----------------------------------------------------------------------------
-// private functions
-// ----------------------------------------------------------------------------
-
-static size_t wxGetNumOfBitmapColors(size_t bitsPerPixel)
-{
- switch ( bitsPerPixel )
- {
- case 1:
- // monochrome bitmap, 2 entries
- return 2;
-
- case 4:
- return 16;
-
- case 8:
- return 256;
-
- case 24:
- // may be used with 24bit bitmaps, but we don't use it here - fall
- // through
-
- case 16:
- case 32:
- // bmiColors not used at all with these bitmaps
- return 0;
-
- default:
- wxFAIL_MSG( wxT("unknown bitmap format") );
- return 0;
- }
-}
-
-size_t wxConvertBitmapToDIB(LPBITMAPINFO pbi, const wxBitmap& bitmap)
-{
- wxASSERT_MSG( bitmap.Ok(), wxT("invalid bmp can't be converted to DIB") );
-
- // shouldn't be selected into a DC or GetDIBits() would fail
- wxASSERT_MSG( !bitmap.GetSelectedInto(),
- wxT("can't copy bitmap selected into wxMemoryDC") );