IonicWind Software

IWBasic => Games and Graphics => Topic started by: talun on April 13, 2011, 11:43:31 AM

Title: GDI+ info
Post by: talun on April 13, 2011, 11:43:31 AM
Hi,
I'm just starting to learn GDI+ and if possible I would like to know how to pass the name of a bitmap file to the functions GdipLoadImageFromFile() and GdipDrawImageRectI()
(I do not understand how to use the variable of type pointer for the file name  ???)

thanks

Sergio
Title: Re: GDI+ info
Post by: ckoehn on April 13, 2011, 07:15:25 PM
Sergio,

If I understand things right,  any STRING or ISTRING is a pointer.

So...

STRING Filename

Filename="myfile.bmp"

func(Filename)  'will pass the pointer to "myfile.bmp"


Clint
Title: Re: GDI+ info
Post by: LarryMc on April 13, 2011, 07:51:19 PM
STRINGS/ISTRINGS/UDT's are all passed by reference
The rest are passed by value unless the BYREF keyword is used.

STRINGS/ISTRINGS/UDT's can be passed by value if the BYVAL keyword is used.

A POINTER contains the memory address of a variable, regardless of the type.

LarryMc


Title: Re: GDI+ info
Post by: talun on April 14, 2011, 03:05:56 AM
Ok, problem solved.
It was an issue with using the name of the file, which must be passed in Unicode format.
Now all works fine  :)

Cheers

Sergio