X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4ce81a75efb34de9f01fe3c7b9ffecb03293b1c3..0c77152e0de4e3851ee74e91e19c1394a28eb943:/src/msw/clipbrd.cpp diff --git a/src/msw/clipbrd.cpp b/src/msw/clipbrd.cpp index 5a38cb9f60..efca97a0bb 100644 --- a/src/msw/clipbrd.cpp +++ b/src/msw/clipbrd.cpp @@ -100,8 +100,8 @@ bool wxSetClipboardData(wxDataFormat dataFormat, wxObject *obj, int width, int h { wxBitmap *wxBM = (wxBitmap *)obj; - HDC hdcMem = CreateCompatibleDC(NULL); - HDC hdcSrc = CreateCompatibleDC(NULL); + HDC hdcMem = CreateCompatibleDC((HDC) NULL); + HDC hdcSrc = CreateCompatibleDC((HDC) NULL); HBITMAP old = (HBITMAP) ::SelectObject(hdcSrc, (HBITMAP) wxBM->GetHBITMAP()); HBITMAP hBitmap = CreateCompatibleBitmap(hdcSrc, wxBM->GetWidth(), wxBM->GetHeight()); @@ -133,7 +133,7 @@ bool wxSetClipboardData(wxDataFormat dataFormat, wxObject *obj, int width, int h { #if wxUSE_IMAGE_LOADING_IN_MSW HBITMAP hBitmap=(HBITMAP) ((wxBitmap *)obj)->GetHBITMAP(); - HANDLE hDIB=BitmapToDIB(hBitmap,NULL); // NULL==uses system palette + HANDLE hDIB=BitmapToDIB(hBitmap,(HPALETTE) NULL); // NULL==uses system palette bool success = (::SetClipboardData(CF_DIB,hDIB) != 0); #else bool success=FALSE; @@ -220,8 +220,8 @@ wxObject *wxGetClipboardData(wxDataFormat dataFormat, long *len) if (!hBitmap) return NULL; - HDC hdcMem = CreateCompatibleDC(NULL); - HDC hdcSrc = CreateCompatibleDC(NULL); + HDC hdcMem = CreateCompatibleDC((HDC) NULL); + HDC hdcSrc = CreateCompatibleDC((HDC) NULL); HBITMAP old = (HBITMAP) ::SelectObject(hdcSrc, hBitmap); GetObject(hBitmap, sizeof(BITMAP), (LPSTR)&bm); @@ -323,10 +323,6 @@ bool wxGetClipboardFormatName(wxDataFormat dataFormat, char *formatName, int max return (::GetClipboardFormatName((int) dataFormat, formatName, maxCount) > 0); } -/* - * wxClipboard - */ - //----------------------------------------------------------------------------- // wxClipboard //----------------------------------------------------------------------------- @@ -347,6 +343,7 @@ wxClipboard::~wxClipboard() void wxClipboard::Clear() { +#if wxUSE_DRAG_AND_DROP wxNode* node = m_data.First(); while (node) { @@ -355,6 +352,7 @@ void wxClipboard::Clear() node = node->Next(); } m_data.Clear(); +#endif } bool wxClipboard::Open()