Function CreateHBitmapFromGpBitmap(ByVal GpBitmap As Any Ptr,ByVal BackColor As Integer=&hf0f0f0) As HBITMAP
Создает обычный bitmap из (GDI+ bitmap Windows , pixbuf Linux). Прозрачность теряется
GpBitmap - хендл (в Windows GDI+ bitmap , в Linux PixBuf bitmap)
BackColor - Цвет фона,на котором отрисуется Bitmap при преобразовании
Windows , Linux
#Include "window9.bi"
OpenWindow("",100,100,300,320)
ImageGadget(1,0,0,300,300)
Var GpBitmap=Create_ImageA(300,300)'создаем битмап GDI+
ImageStartDrawA(GpBitmap) 'начинаем рисование
TextDrawA(!"FreeBasic \r\n The Best",30,50,,&hF50fFf0f,,3)
StopDrawA ' заканчиваем рисование
Var hbmp=CreateHBitmapFromGpBitmap(GpBitmap)
SetImageGadget(1,hbmp)
Do : Loop until WaitEvent=EventClose
FreeGpBitmap(GpBitmap):Free_Image(hbmp)
Created with the Personal Edition of HelpNDoc: Easy EBook and documentation generator