Please enable JavaScript to view this site.

A-Shell Development History

New variations of MBF_STATIC support rounded rectangles and ellipses, via new CTYPE2 flags:

! *** [170] Additional styles (ctype2)

    define MBF2_NOTHEME     = &h00000100     ! [186] disable themes for this control

    define MBF2_CUSTDRAW    = &h00000200     ! [186] custom draw the control

    define MBF2_ROUNDRECT   = &h00000400     ! [186] (STATIC) rounded corners

    define MBF2_ELLIPSE     = &h00000800     ! [186] (STATIC) ellipse/circle

 

MBF2_NOTHEME disables the theme (aka "visual style") for the control. Note that it no longer has the other effects described under 1133.3 - for those, you must set MBF2_CUSTDRAW.

MBF2_CUSTDRAW 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 one of the following:

MBF2_ROUNDRECT 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 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.)

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