summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
f07dc2e)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21907
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
size_t wxBitmapDataObject::GetDataSize() const
{
size_t wxBitmapDataObject::GetDataSize() const
{
return wxDIB::ConvertFromBitmap(NULL, GetHbitmapOf(GetBitmap()));
return wxDIB::ConvertFromBitmap(NULL, GetHbitmapOf(GetBitmap()));
+#else
+ return 0;
+#endif
}
bool wxBitmapDataObject::GetDataHere(void *buf) const
{
}
bool wxBitmapDataObject::GetDataHere(void *buf) const
{
BITMAPINFO * const pbi = (BITMAPINFO *)buf;
return wxDIB::ConvertFromBitmap(pbi, GetHbitmapOf(GetBitmap())) != 0;
BITMAPINFO * const pbi = (BITMAPINFO *)buf;
return wxDIB::ConvertFromBitmap(pbi, GetHbitmapOf(GetBitmap())) != 0;
+#else
+ return FALSE;
+#endif
}
bool wxBitmapDataObject::SetData(size_t WXUNUSED(len), const void *buf)
{
}
bool wxBitmapDataObject::SetData(size_t WXUNUSED(len), const void *buf)
{
const BITMAPINFO * const pbmi = (const BITMAPINFO *)buf;
HBITMAP hbmp = wxDIB::ConvertToBitmap(pbmi);
const BITMAPINFO * const pbmi = (const BITMAPINFO *)buf;
HBITMAP hbmp = wxDIB::ConvertToBitmap(pbmi);
SetBitmap(bitmap);
return TRUE;
SetBitmap(bitmap);
return TRUE;
+#else
+ return FALSE;
+#endif
}
// ----------------------------------------------------------------------------
}
// ----------------------------------------------------------------------------
bool wxDropTarget::Register(WXHWND hwnd)
{
bool wxDropTarget::Register(WXHWND hwnd)
{
- HRESULT hr = ::CoLockObjectExternal(m_pIDropTarget, TRUE, FALSE);
+ HRESULT hr;
+
+ // May exist in later WinCE versions
+#ifndef __WXWINCE__
+ hr = ::CoLockObjectExternal(m_pIDropTarget, TRUE, FALSE);
if ( FAILED(hr) ) {
wxLogApiError(wxT("CoLockObjectExternal"), hr);
return FALSE;
}
if ( FAILED(hr) ) {
wxLogApiError(wxT("CoLockObjectExternal"), hr);
return FALSE;
}
hr = ::RegisterDragDrop((HWND) hwnd, m_pIDropTarget);
if ( FAILED(hr) ) {
hr = ::RegisterDragDrop((HWND) hwnd, m_pIDropTarget);
if ( FAILED(hr) ) {
+ // May exist in later WinCE versions
+#ifndef __WXWINCE__
::CoLockObjectExternal(m_pIDropTarget, FALSE, FALSE);
::CoLockObjectExternal(m_pIDropTarget, FALSE, FALSE);
wxLogApiError(wxT("RegisterDragDrop"), hr);
return FALSE;
}
wxLogApiError(wxT("RegisterDragDrop"), hr);
return FALSE;
}
wxLogApiError(wxT("RevokeDragDrop"), hr);
}
wxLogApiError(wxT("RevokeDragDrop"), hr);
}
+ // May exist in later WinCE versions
+#ifndef __WXWINCE__
::CoLockObjectExternal(m_pIDropTarget, FALSE, TRUE);
::CoLockObjectExternal(m_pIDropTarget, FALSE, TRUE);
m_pIDropTarget->SetHwnd(0);
}
m_pIDropTarget->SetHwnd(0);
}