Hi Peter,
From projects/GDIWindow/WaterFallJpg2.o2bas
extern library "gdiplus.dll"
'
long GdiplusStartup( dword *token, GdiplusStartupInput*input, GdiplusStartupOutput *output)
long GdiplusShutdown(dword*token)
long GdipLoadImageFromFile(wstring filename, sys*image)
long GdipCreateBitmapFromFile(wstring filename, sys*bitmap)
long GdipCreateHBITMAPFromBitmap(sys bitmap, sys*hbmReturn, dword backgroundColor)
long GdipDisposeImage(sys image)
'
long GdipCreateFromHDC( sys hdc, *pGraphics)
long GdipGraphicsClear(sys graphics,argb)
long GdipDeleteGraphics(sys graphics)
'
long GdipBitmapGetPixel (sys image,x,y,*argb)
long GdipBitmapSetPixel (sys image,x,y,argb)
long GdipDrawImageRectI(sys graphics,image,x,y,w,h)
long GdipCloneBitmapAreaI(sys x,y,width,height,PixelFormat,srcBitmap,dstBitmap)
'
long GdipCreateSolidFill(sys argb, *brush)
long GdipSetSolidFillColor(sys brush, argb)
long GdipGetSolidFillColor(sys brush, *argb)
long GdipDeleteBrush(delete brush)
long GdipCreatePen1(sys argb, single width, GpUnit unit, sys *pen)
long GdipCreatePen2(sys brush, single width, GpUnit unit,sys *pen)
long GdipGetPenWidth(sys pen, single width)
long GdipSetPenColor(sys pen,argb)
long GdipDeletePen(sys pen)
'
long GdipDrawLineI(sys graphics, pen,x1,y1,x2,y2)
long GdipDrawRectangleI(sys graphics, GpPen pen, x, y,width,height)
long GdipDrawEllipseI(sys graphics, pen,x,y,width,height)
long GdipFillRectangleI(sys graphics,brush,x,y,width,height)
long GdipFillEllipseI(sys graphics,brush,x,y,width,height)
'
long GdipNewInstalledFontCollection(sys * fontCollection);
long GdipCreateFontFamilyFromName(wstring name,sys fontCollection,*FontFamily)
long GdipDeleteFontFamily(sys FontFamily)
long GdipCreateFont(sys fontFamily,single emSize,GpFontStyle style,GpUnit unit,sys *font)
long GdipDeleteFont(sys font)[/b]
'
long GdipDrawString(sys graphics,wstring ws,sys length,font,RECTF *layoutRect,sys stringFormat,brush)
'
end extern
pointf is a floating point rect
all strings must be wide ie: wstring or wchar*
type RECTF single x,y,w,h
GdipDrawString pGraphics,wtxt,-1,font,pointf,0,FontBrush
Charles