"kruger" <
[hidden email]> wrote in message
news:
[hidden email]...
> Hi,
> I'm trying to assign a color table from an instance of DIBSection to
> another but after assignment something goes wrong because no one of the
> images can be displayed on an ImagePresenter.
>...
I think this is probably due to bug #404, patch attached.
Basically the problem is that a number of operations on Bitmaps/DIBSections
in Dolphin cause the Bitmap to be selected into a memory DC by Dolphin. The
DC is cached for future use, but the standard Windows "Static" control will
not draw a Bitmap that is selected into a DC. As the default view for an
ImagePresenter is a StaticBitmap (the Dolphin class wrapping the "Static"
control in Bitmap mode), nothing is displayed.
Regards
Blair
---------------------------------
"#404: Default view of ImagePresenter (a StaticBitmap) will not display a
programmatically drawn or altered bitmap"!
!StaticBitmap methodsFor!
setImage: aBitmapOrNil
"Private - Sets aBitmapOrNil into the receiver. Make sure it is a shared
copy
and that it is not selected into its DC."
image := aBitmapOrNil notNil ifTrue: [aBitmapOrNil asSharedCopy freeDC;
yourself].
self sendMessage: STM_SETIMAGE wParam: IMAGE_BITMAP lParam: image
asParameter! !
!StaticBitmap categoriesFor: #setImage:!accessing!private! !