RE: displaying different bmp files
- Posted by "Derek Parnell" <ddparnell at bigpond.com> Jan 05, 2004
- 335 views
> -----Original Message----- > From: sixs [mailto:sixs at ida.net] > Subject: displaying different bmp files > > > > Hello. > I am getting different pictures from the internet. They are of various > sizes. I display one, then anoher and I may want to redisplay > one I had > previously displayed. Code is : > hBitmap = loadBitmapFromFile(hSle9), > then in onPaint I am performing this code > > if db_table_size() > 0 then > if atom(hBitmap) then > deleteObject ( Bitmap54) > extent = getExtent(MyWin) > i = 241 > j = 42 > drawBitmap( MyWin, hBitmap, i, j) > end if > end if > The pictures are not of the same size and so some of the previous > picture is left on the screen. How do I remove the previous picture > without forcing each picture to be the same size, or must I edit each > picture in a photo program???? > Thanks for any help Does this help? ... if db_table_size() > 0 then if atom(hBitmap) then deleteObject ( Bitmap54) extent = getCtlSize(MyWin) bmsize = getCtlSize(hBitmap) i = bmsize[1] j = bmsize[2] drawBitmap( MyWin, hBitmap, i, j) end if end if -- Derek