# Static Image Control > [HTML Version](staticimagecontrol.htm) Static image controls are created with XCALL AUI\_CONTROL, with _ctype_ set to MBF\_STATIC + MBF\_BITMAP (plus optional flags such as MBF\_NODISTORT, MBF\_CENTER, MBF\_KBD, etc.) For example: xcall AUI, AUI\_CONTROL, CTLOP\_ADD, NUL\_CTLID, imgfile\$, MBST\_ENABLE, ctype, NUL\_CMD\$, NUL\_FUNC\$, NUL\_CSTATUS, srow, scol, erow, ecol, NUL\_FGC, NUL\_BGC, NUL\_FONTATTR, NUL\_FONTSCALE, NUL\_FONTFACE\$, NUL\_TOOLTIP\$, parentid\$, NUL\_WINCLASS\$, winstyle Here are a few examples, using the above code with different values for ctype, winstyle, and the coordinates. In each case, we draw a groupbox just outside the image control so that you can easily see the true size of the control (which doesn't always match the size of the image). **Stretched to fit, no border** ctype = MBF\_STATIC + MBF\_BITMAP winstyle = 0 (./images/ashref_img152.png) **No distortion, thick frame border** ctype = MBF\_STATIC + MBF\_BITMAP + MBF\_NODISTORT winstyle = WS\_THICKFRAME \! \&h0004000 (border) (./images/ashref_img153.png) The WS\_THICKFRAME flag puts a border around the static control, making it look more like a button. (You can make it act like a button, in the sense of giving it a click event, by adding the MBF\_KBD flag and specifying a click string in the _cmd_ parameter.) When the MBF\_NODISTORT flag is used, the image is scaled only as much as it can be without changing the aspect ratio. So if the original static control shape is relatively taller or wider than the image shape, you end up with extra vertical or horizontal space within the control. The question then becomes how to position the image within the space provided, the default being as shown above, in the upper left. You can use the MBF\_HCENTER, MBF\_VCENTER or MBF\_CENTER flags to force horizontal and/or vertical alignment, as in the example below: ctype = MBF\_STATIC + MBF\_BITMAP + MBF\_NODISTORT + MBF\_CENTER \! H+V centering winstyle = WS\_THICKFRAME \! \&h0004000 (border) (./images/ashref_img154.png) By default, after computing the maximum image size and position of the scaled image, the static control is then shrunk to fit. This probably makes no difference unless the border option is used, but to see the effect of not shrinking the control to fit the image, add the SS\_CENTERIMAGE flag, as shown below: ctype = MBF\_STATIC + MBF\_BITMAP + MBF\_NODISTORT + MBF\_CENTER winstyle = WS\_THICKFRAME + SS\_CENTERIMAGE \! \&h0004000 + \&h00000200 (./images/ashref_img155.png) See the program [STIMGT in EXLIB:\[908,32\]](https://bitbucket.org/microsabio/exlib/src/master/908032/stimgt.bp) for illustrations of many of these static image alignment options.