resizing bitmap to fill main dialog window

This forum is for eXpress++ general support.
Post Reply
Message
Author
gnewcomb
Posts: 17
Joined: Thu Jan 28, 2010 7:06 pm
Location: Colorado Springs, Colorado USA

resizing bitmap to fill main dialog window

#1 Post 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.

User avatar
rdonnay
Site Admin
Posts: 4813
Joined: Wed Jan 27, 2010 6:58 pm
Location: Boise, Idaho USA
Contact:

Re: resizing bitmap to fill main dialog window

#2 Post 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.
The eXpress train is coming - and it has more cars.

Victorio
Posts: 633
Joined: Sun Jan 18, 2015 11:43 am
Location: Slovakia

Re: resizing bitmap to fill main dialog window

#3 Post 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.

Post Reply