I have several applications that work pretty much in the same way: a standard Windows window with menus and a toolbar, then the rest of the client area is filled with a %gr area. Usually, the %gr has a callback and a handle and takes a pivot, and so is %pv%`^gr[rgb_colours,user_resize,white] (the rgb_colours being a hangover from when that wasn’t the default). Yesterday I upgraded from a single 1280x1024 display to dual 1920x1080 displays driven by a new nVidia GTX 950 video card. These applications all start in the LH monitor, and GetSystemMetrics returns the dimensions of this. Windows 7 64 bit is in use. In Application A the dimensions of the %gr are set to
IXRES = GetSystemMetrics(SM_CXSCREEN)*0.95
IYRES = GetSystemMetrics(SM_CYSCREEN)*0.85
… and the %gr area fills the client area. The toolbar in this application is made with %bb buttons. In Application B there is a test on the aspect ratio of the screen, and in the case of a widescreen the toolbar is put on the left of the screen (using %ib) with the dimensions of the %gr area sized more or less as above, but with a fixed number of pixels subtracted from the GetSystemMetrics result. Once again, the %gr area is appropriately sized. In this case there is a thin grey surround to the %gr area because it is 3D recessed. Application C is now troubling me. The %gr area is sized as in Application B, and no border is selected. In this case, the white %gr area is requested at (say) 1910x960, and although I get the correct height, I get a %gr area that is only 1690 wide, and to the right of that a grey background infill for the rest, up to the 1910 requested (i.e. another 220 pixels). This application has the option to use %tb or %ib for its toolbars. I have tried both to the same effect. I have tried (fruitlessly) to scale the %gr area myself, including removing the toolbars completely. I had previously tried the application (and the others) on screens of 1280x1024 (XP, 7), 1680x1080 (XP), 1440x768 (XP), 1366x768 (7, 8.1, 10) – all single monitor setups. I have tried using the routine SET_MAXIMUM_DIALOG_SIZE@. I have tried taking out the resize mechanism, and the graphics handle (although they work with Applications A and B). I have checked that GetSystemMetrics returns the right values. Finally, I tried turning off the righthand monitor. In this case, the grey area is only 20 pixels wide, and the %gr has grown to 1890! In the dual monitor case, the eventual result is stretchable across both monitors, but always with that 220 pixel righthand band – the user_resize mechanism in my graphics callback routine picks up the stretched size and shape of the %gr area I have got.. I would very much like to get rid of that band, which in any case is not present in Applications A and B. I have a number of questions:
- Why doesn’t Clearwin+ give me the %gr size I explicitly requested, and
- Why has Clearwin+ added the extra grey – and can I command it not to?
-
Why do applications A and B work? (The only difference I can find is that they have LH toolbars - I'm going to try that.
Eddie