Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Backround bitmap in graph

Hi volks,

for a appl. i need to hae variable access to the backround
image of the 2D-graph. Unfort. help comes for Visual Basic.
As far I code in Visual C++ 5.X the examples make no sense
to me.
Any idea ?
More info ?

thx miniwi


Sent via Deja.com http://www.deja.com/
Before you buy.
0 Kudos
Message 1 of 2
(4,851 Views)
To access bitmaps programmatically and assign them to the graph
background, you can use the following steps:

Insert a bitmap resource into your Visual C++ project. Import an
existing bitmap or create a new one. This example will assume the
default resource ID for the bitmap is IDB_BITMAP1.

The CWGraph Object has three Images, indexed as follows: 1)Caption 2)
Graph Frame 3)Plot Area. This example uses index 3 since we want to
assign a new bitmap to the plot area of the graph.

In a simple example, you can add the following code to the event
handler for a button on the dialog. The SetPicture property takes an
IPictureDispatch. Use a CPictureHolder instance to create and return a
reference to the bitmap, then assign this to the Plot Area Imag
e:

CPictureHolder cph;
cph.CreateFromBitmap(IDB_BITMAP1);
m_graph.Images(COleVariant(3.0)).SetPicture(cph.GetPictureDispatch());

This will load the bitmap into the plot area of the graph.

Regards,
Denise Riedlinger
ComponentWorks

In article <7spolf$kcl$1@nnrp1.deja.com>,
miniwi@my-deja.com wrote:
> Hi volks,
>
> for a appl. i need to hae variable access to the backround
> image of the 2D-graph. Unfort. help comes for Visual Basic.
> As far I code in Visual C++ 5.X the examples make no sense
> to me.
> Any idea ?
> More info ?
>
> thx miniwi
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>


Sent via Deja.com http://www.deja.com/
Before you buy.
Message 2 of 2
(4,851 Views)