Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Passing handle to a bitmap to an ActiveX in windows CE!

1 view
Skip to first unread message

vki...@hotmail.com

unread,
Jan 29, 2006, 11:05:55 PM1/29/06
to
Hi All,

I am creating an ActiveX control in Visual C++ for Windows CE that
works as a button but displays different images in different states
(up, down, focus, disabled). We should be able to enter the images
through the controls' properties. Unfortunately, windows CE does not
support the CPictureHolder class. Hence, I need a way to pass it a
handle to a bitmap from my container application. Wherever I place this
ActiveX, I should be able to type the resource ID of the bitmap
(hopefully as a string so I can enter the bitmap's name) into a
property for the ActiveX and the ActiveX should display that image.

One possible way I thought was to create a compabitble DC from our main
ActiveX DC and then somehow make it availabe to the container. Then I
could load an image on to this duplicate DC and redraw the control. In
my OnDraw method, I could call the BitBlt method and use this
duplicateDC as the source DC. My question is: How can I make this
duplicate DC available to the outside applications?

Any suggestions/ideas would be much appreciated. Again, I had to use
the CPictureHolder class on the desktop version so it was fairly
straight forward, however, I am running out of ideas to be able to do
it without the CPictureHolder.

Thanks,
Vivek Kinra

0 new messages