April 26, 2024, 06:00:40 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


GDI+ info

Started by talun, April 13, 2011, 11:43:31 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

talun

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

ckoehn

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

LarryMc

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


LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

talun

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