diff --git a/docs/latex/wx/bitmap.tex b/docs/latex/wx/bitmap.tex index fa15dd36d3..3947adf6f3 100644 --- a/docs/latex/wx/bitmap.tex +++ b/docs/latex/wx/bitmap.tex @@ -505,20 +505,14 @@ Sets the validity member (does not affect the bitmap data). \membersection{wxBitmap::SetPalette}\label{wxbitmapsetpalette} -\func{void}{SetPalette}{\param{wxPalette* }{palette}} +\func{void}{SetPalette}{\param{const wxPalette\& }{palette}} -Sets the associated palette: it will be deleted in the wxBitmap -destructor, so if you do not wish it to be deleted automatically, -reset the palette to NULL before the bitmap is deleted. +Sets the associated palette. \wxheading{Parameters} \docparam{palette}{The palette to set.} -\wxheading{Remarks} - -The bitmap object owns the palette once this has been called. - \wxheading{See also} \helpref{wxPalette}{wxpalette} diff --git a/docs/latex/wx/dragimag.tex b/docs/latex/wx/dragimag.tex index f4ca1ea38e..171de387a4 100644 --- a/docs/latex/wx/dragimag.tex +++ b/docs/latex/wx/dragimag.tex @@ -195,3 +195,21 @@ will be smoother if you move the image when it is shown. Shows the image. Call this at least once when dragging. +\membersection{wxDragImage::UpdateBackingFromWindow}\label{wxdragimageupdatebackingfromwindow} + +\constfunc{bool}{UpdateBackingFromWindow}{\param{wxDC\&}{ windowDC}, \param{wxMemoryDC\&}{ destDC}, + \param{const wxRect\&}{ sourceRect}, \param{const wxRect\&}{ destRect}} + +Override this if you wish to draw the window contents to the backing bitmap +yourself. This can be desirable if you wish to avoid flicker by not having to +redraw the updated window itself just before dragging, which can cause a flicker just +as the drag starts. Instead, paint the drag image's backing bitmap to show the appropriate +graphic {\it minus the objects to be dragged}, and leave the window itself to be updated +by the drag image. This can provide eerily smooth, flicker-free drag behaviour. + +The default implementation copies the window contents to the backing bitmap. A new +implementation will normally copy information from another source, such as from its +own backing bitmap if it has one, or directly from internal data structures. + +This function is available in wxGenericDragImage only. + diff --git a/src/msw/dialog.cpp b/src/msw/dialog.cpp index 5556d4e24e..23ea6b6d81 100644 --- a/src/msw/dialog.cpp +++ b/src/msw/dialog.cpp @@ -346,7 +346,8 @@ void wxDialog::DoShowModal() if ( !oldFocus ) { oldFocus = parent; - hwndOldFocus = (HWND) parent->GetHWND(); + if (parent) + hwndOldFocus = (HWND) parent->GetHWND(); } // enter the modal loop