Page 1 of 1

newbie problem

PostPosted: Mar 1, 2007 @ 10:19pm
by capikirk
Hi all , i'm a rookie pocket pc programmer , an i need some guidance.

i'm working with the gledplay templates , but there's a simple action that i'm unable to do.

i want to create a surface from an image file ( fondo.png) , so i put the next code to create the surface.

surface.create(TEXT("fondo.png"));

the code seems to be ok , since i don't receive any error message in the compilation process, but the image doesn't appear on the emulator screen.

y put the file fondo.png into the Debug folder , where the exe is created , and in the parent folder , but it never appears on the emulator screen.

Where should i put my resource image files?

thanks in advance for your answers , and pardon for my bad use of the english language.

PostPosted: Mar 2, 2007 @ 8:58am
by summer_goth
Hey there capikirk.

It works alright if you put your images in the debug folder. I just want to make sure, are you using the Single State example?

There is currently a bug in the example which is very easy to fix. In the OnInit function there has to be another another parameter which is not included in the function.

To see where it has to be added go to this post :

This should fix your problem. If you already did it, or it doesn't solve the problem just let us know on the forum and we'll see if we can find another solution.

Have a wonderful time.

still not work

PostPosted: Mar 2, 2007 @ 9:04pm
by capikirk
i'm using the multi-state template.

If i compile the exe and then i copy the exe and the png files i'm using to a real pocket the program works and load the graphic , but if i try to execute pressing F5 in visual studio 2005 , and with the same graphic files into the debug carpet , the program doesn't loads the images.

I really don't know why could this happen.

PostPosted: Mar 5, 2007 @ 8:54am
by summer_goth
I'm sorry capikirk, don't really know how to help you. I have not purchased Visual Studio 2005 yet. Plus I have never had a problem like that.

Hope you get it fixed.

PostPosted: Mar 5, 2007 @ 12:59pm
by Nomad
Hello capikirk

By default Visual Studio 2005, when you press F5, deploys (copys) exe file from debug or release folder to pocket pc's (or emulator's) \Program files\%APPNAME% folder and you must say Visual Studio to copy your image file to that folder too or do it by yourself with the help of explorer.

To point Visual studio to your file look in project's options "Deployment" section.