int ViewAdd(char *filename, int x, int y);


Add a View with and attach an image to it by specifying the image filename.


Return Value


Returns an int handle to the view.





The file must be located in the folder where the exe is running. This is typically inside your Visual C++ project in your /Debug folder. A filename "Ball.png" will be loaded from Debug/Ball.png. If the filename specified is "Images/Ball.png" the file will be loaded from Debug/Images/Ball.png. If a path is included in the filename, it is a relative path from the Debug folder (where the exe is running from). Use forward slashes / as needed (not backslash) and never start a filename path with a slash.


The path to the file named in this parameter must be in the Assets folder where your application resides.  (Typically, your project's Debug or Release folder.  For example, if your project is in C:\DragonFireSDK\, your Assets folder will be C:\DragonFireSDK\Debug\Assets or C:\DragonFireSDK\Release\Assets.)


NOTE: The file system used by iOS is case sensitive, so be sure to match the case of the file name in your code to that of the file on your computer.



X coordinate.



Y coordinate.




The ViewAdd() function makes an image visible. This function internally calls ImageAdd() for you and assigns the image specified by the filename to the view.




Available in DragonFireSDK 1.0 and later.




This example adds a view with an image of a card to the screen.


#include "DragonFireSDK.h"


void AppMain()





void AppExit()





void OnTimer()