How can I create a bitmap and assign to picture ?

Started by Roy Chan, November 19, 2011, 08:16:48 AM

Previous topic - Next topic

Roy Chan

Dear Sir,

I want to create a bitmap and then draw a box in the bitmap. After that I want to resize the bitmap and assign it to a picture.
I use the following the code. But nothing appear in the picture.


Local QrImg As Dword
Local w as long

w=21

Control Add Graphic,  HWND_FRMMAIN_PICTURE1, qrimg, "", 0, 0, w, w
Graphic Bitmap New w,w To QrImg
Graphic Box (0,0)-(w,w),0,%Black,%Black
Graphic Attach HWND_FRMMAIN_PICTURE1, qrimg, ReDraw 
Graphic Set Size 200,200      'I want to resize the whole bitmap to bigger size
Graphic ReDraw

SendMessage (HWND_FRMMAIN_PICTURE1, %STM_SETIMAGE, %IMAGE_BITMAP, QrImg)

iniSoft System Technology Limited
Lenovo ThinkPad SL410 4GB Ram,
Windows XP SP3 / PBWin 10 & FireFly 3.51