Page 1 of 1
resizing bitmap to fill main dialog window
Posted: Thu Apr 27, 2017 7:20 am
by gnewcomb
Could someone post a short example of how to use a bitmap for the background of the main dialog window and have the bitmap resized to fill ( not tiled ) the dimensions of the dialog window? The main dialog window will be different sizes depending on the users monitor resolution. I am wanting to create a user id/password sign on window with a company logo as the background.
Re: resizing bitmap to fill main dialog window
Posted: Thu Apr 27, 2017 11:08 am
by rdonnay
The problem with this is that you would lose your aspect ratio if you want it to always fill the background. Your logo may not look right all the time. It may be better to just center your logo on the background.
Re: resizing bitmap to fill main dialog window
Posted: Thu Apr 27, 2017 11:19 am
by Victorio
I use this :
oBitmap:=DC_GetBitmap("Raukn3.jpg",,,,{aSize[1]*0.99,aSize[2]*0.89})
DCGETOPTIONS ;
WINDOWWIDTH aSize[1] ;
WINDOWHEIGHT aSize[2] ;
WINDOWCOL aPos[1] ;
WINDOWROW aPos[2] ;
BITMAP oBitmap ;
ICON ICON_EXPRESS ;
NOBUSY ;
FONT fontnt ;
EVAL { || SetAppWindow(oMenuBarh)
but as Rogen says , when user maximize main window or x or y dimension, there bitmap not zoom to window frame.
but center logo is good idea.