Groupboxes are generally a problem in windows. It is difficult to give a general rule for all possible cases to deal with groubboxes.
The problem is, that a groupbox is a great button which is lying over your controls and the background and the transparent style effects only to the caption of the groupbox control.
In practice you have to experiment with the following:
1.) The control style WS_CLIPSIBLINGS
(Clips child windows relative to each other;
that is, when a particular child window receives a WM_PAINT message,
the WS_CLIPSIBLINGS style clips all other overlapping child windows
out of the region of the child window to be updated.
If WS_CLIPSIBLINGS is not specified and child windows overlap,
it is possible, when drawing within the client area of a child window,
to draw within the client area of a neighboring child window.)
2.) The control order of the groupbox control
3.) The position of control with has the WS_GROUP style, if needed.
In most cases the following rules works for me.
1.) You have a Groupbox with Transparent = false.
Groupbox should be the first control in the zorder before the first control placed on the groupbox.
The Clipsiblings style must be false for the groupbox and for all controls placed on the groupbox.
2.) You have a Groupbox with Transparent = true.
Groupbox should be the last control in the zorder after
the last control placed on the groupbox.
The Clipsiblings style must be true for the groupbox and for the controls placed on the groupbox it can be true too, but this is not a must.
If the WS_GROUP style is important for you, set WS_GROUP of the groupbox to false and set WS_GROUP of the first control inside the groupbox to true.
Now you can ask, why earlier versions of VO had no problems with this?
The reason is, that VO 2.7 has changed the autorefresh class styles of all window classes to avoid annoying flicker of VO apps during resizing or moving windows.
As a result of this you have to deal with some window styles like WS_CLIPSIBLING, WS_CLIPCHILDREN or with the z-Order in some cases.
But it is normal Windows GUI developing using these styles.
If you don't know how to change the z-order (control order) in your program use the following simple function.
FUNCTION SetZOrder(oControl AS Control, oControlInsertAfter AS Control) AS VOID PASCAL
SetWindowPos(oControl:handle(), oControlInsertAfter:handle(), 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE)
RETURN
But may be, flicker is no problem for you or others. In this case you could simply add the following method to your window
METHOD Resize(oResizeEvent) CLASS YourWindow
SUPER:Resize(oResizeEvent)
//Put your changes here
SELF:Repaint()
RETURN NIL
and it works like in the past.
From the VO-Newsgroup, contributed by Sven Ebert