int ViewAdd(int cn, int im, int x, int y);

 

Add a View and attach the Image im (the handle returned by ImageAdd()) to the View.

 

Return Value

 

Returns an int handle to the view.

 

Parameters

 

cn

Container where the view will be added.

 

im

Image handle returned from ImageAdd().

 

x

X coordinate.

 

y

Y coordinate.

 

Remarks

 

The ViewAdd() function makes an image visible. Use ImageAdd() to load an image.

 

Availability

 

Available in DragonFireSDK 2.0 and later.

 

Example

 

This example adds a container to the screen and subsequently adds a view with an image of a card into that container.

 

#include "DragonFireSDK.h"

 

int cn;

int im;

 

void AppMain()

{

       cn=ContainerAdd(0,10,10);

       im=ImageAdd("Cards/Card01.png");

       ViewAdd(cn,im,0,0);

}

 

void AppExit()

{

 

}

 

void OnTimer()

{

 

}