Subroutines > Detailed Descriptions > AUI > Control > AUI_Control Parameters
ctype2

This is an extension of the ctype parameter, and specifies any valid combination of options from the table below. The symbols come from ashell.def.

Symbol

Value

Description

MBF2_STICKY

&h0001

Causes control to "stick" to the edge of the container.

MBF2_DLGICON

&h0010

May be used with MBF_DIALOG to cause the dialog to display the application icon on its title bar. This is equivalent to MBF_DLGNOPARENT except without the other aspects of MBF_DLGNOPARENT (i.e. retains the parent child relationship).

MBF2_PIXCOORDS

&h0020

Allows the coordinates of a control to be specified in pixels rather than in row/col units.

MBF2_PIXSIZE

&h0080

Causes erow and ecol to be interpreted as the desired control height and width (respectively) in pixels. May be combined with MBF2_PIXCOORDS, in which case srow and scol are interpreted as coordinates while erow and ecol are interpreted as height and width. As of A-Shell build 5.1.1176, may also be used with dialogs. Previously was only supported for child controls. If used with MBF_DIALOG and MBF_ALTPOS, the dialog borders and caption dimensions will be added to erow and ecol so that the resulting dialog's client area will be of the requested size; otherwise the erow and ecol will determine the outer dimensions of the dialog.

 

Beginning in A-Shell 1176 of March 2010, MBF2_PIXSIZE works with dialogs. Note that in such a case, the MBF_ALTPOS flag causes the dialog client area to be sized to match the erow and ecol parameters in pixels. Otherwise, the erow and ecol values are used to determine the overall dialog size.

MBF2_NOTHEME

&h0100

Disables theme (visual style) for the control. In the case of MBF_GROUPBOX, this also causes the control to be manually drawn by A-Shell rather than by Windows, allowing the FGC and BGC values to be taken into account. (Otherwise, the themed version of a groupbox ignores the FGC value, and only applies the BGC value to the background of the text.) Note that for the new implementation, you must use an RGB value for FGC and/or BGC if you want custom colors. (For black, you should use &h00010101 rather than &h00000000 to avoid any confusion with palette color numbers, which range from 0-15.)

MBF2_CUSTDRAW

&h0200

Causes A-Shell to draw the control, rather than let Windows draw it. Generally this is a bad idea (a lot of work, guaranteed never to match the way Windows does it). But, sometimes it is useful, in order to implement a visual variation that Windows does not support. Currently there are only two control types this applies to: MBF_GROUPBOX (described under 1133.3) and MBF_STATIC. In the case of MBF_STATIC, the MBF2_CUSTDRAW flag allows us to create variations of the standard rectangular static control (rounded corner rectangles, ellipses, circles, and controls with a border matching the text color.) To get any of these effects, combine MBF2_CUSTDRAW with MBF2_ROUNDRECT or MBF2_ELLIPSE.

MBF2_ROUNDRECT

&h0400

Causes the corners of the static control be slightly rounded. This is only noticeable if the BGC parameter is set to an RGB value, or if the WS_BORDER flag is used.

MBF2_ELLIPSE

&h0800

Causes the control to have an elliptical rather than rectangular shape. As with MBF2_ROUNDRECT, the effect is invisible unless you define a non-standard BGC value or use the WS_BORDER flag.

If the display width and height of an ellipse are equal, you have a circle. Unfortunately, at present, there is no good way to calculate how many columns are needed to match a particular number of rows or millirows, so circles may end up as ellipses. (Actually, you could use the MBF2_PIXCOORD flag to specify the dimensions in pixels, and that would work, but leads to a different problem which is how to calculate the desired number of pixels. (We may need to add another flag to force the width of the ellipse to match the height so that you end up with a perfect circle, regardless of the window aspect ratio or resolution.)

MBF2_RESIZE

&h1000

May be used with an MBF_ALTPOS dialog to allow it to be resized with the mouse. The range of resizing is from 50% of the original dialog size to maximized.

MBF2_STATICWIN

&h4000

Creates a static child control window that looks something like a dialog box but can be used as a variation of a group box.

MBF2_NOMOVE

&h40000

Prevents a dialog from being moved. This does not interfere with the ability to minimize, maximize or resize the dialog, which are controlled by other options (MBF_MODELESS, MBF_MAXBUTTON, and MBF2_RESIZE, respectively).

MBF2_MINBUTTON

&h80000

Used with MBF_SYSMENU to add a minimize button to a modal dialog. A minimize button is not normally allowed in this case, because if the dialog is minimized, it may make the parent window appear to be unresponsive. But if you are sure that won't be a problem (perhaps you've made the dialog's parent invisible already), you can force the minimize button option with this flag (in the cflag2 parameter).

 

A test program, STATICX.BP[908,24] illustrates some of these variations.