Page 1 of 1

Horizontal, Vertical inconsistency

Posted: Sun Jun 19, 2016 2:59 am
by DGDanforth
Folks,
I am getting inconsistent results on BB1.7 Build 560 for using Window=>Horizontal and Window=>Vertical.
If one has 3 or fewer windows open then it works as advertised. But if there are 4 or more windows
then a tiled format is selected for both Horizontal and Vertical.

Is this a feature or a bug?

-Doug

Re: Horizontal, Vertical inconsistency

Posted: Sun Jun 19, 2016 5:00 am
by DGDanforth
Looking deeper I see this is implemented in HostMenus with a direct call to a WinApi function

Code: Select all

	PROCEDURE TileHorizontal*;
		VAR res: INTEGER;
	BEGIN
		res := WinApi.SendMessageW(HostWindows.client, WinApi.WM_MDITILE, 3, 0)
	END TileHorizontal;
	
	PROCEDURE TileVertical*;
		VAR res: INTEGER;
	BEGIN
		res := WinApi.SendMessageW(HostWindows.client, WinApi.WM_MDITILE, 2, 0)
	END TileVertical;
	
The Microsoft documentation says
The tiling option. This parameter can be one of the following values, optionally combined with MDITILE_SKIPDISABLED to prevent disabled MDI child windows from being tiled.

MDITILE_SKIPDISABLED = 2;

Value Meaning
MDITILE_HORIZONTAL 0x0001 Tiles windows horizontally.
MDITILE_VERTICAL 0x0000 Tiles windows vertically.
So it appears that the values passed "1" (horizontal) and "0" (vertical) have indeed been combined with "2" to give nontiled windows but that is NOT what I am seeing.

Comments?

Re: Horizontal, Vertical inconsistency

Posted: Sun Jun 19, 2016 10:08 am
by Josef Templ
This is the same behavior as in BB 1.6.

As you observed, it is part of the Windows MDI (multiple document interface).
Having a large number of windows tiled vertically or horizontally leads to
strange window layouts and therefore there is this 'optimization'.

- Josef

Re: Horizontal, Vertical inconsistency

Posted: Mon Jun 20, 2016 8:02 am
by DGDanforth
OK,
We can remove this "bug" from discussions.
I brought it up because, when I was attempting to show a user of Oberon on the net how easy it was to arrange windows with BB, i was caught off guard when "vertical" suddenly became "tiled" when I added a window.
-Doug