Re: Questions about IDE and perhaps Win32Lib
- Posted by Pete Lomax <petelomax at blueyonder.co.uk> Jun 24, 2003
- 434 views
On Tue, 24 Jun 2003 19:52:16 +1200, Ray Tomes <rtomes at ihug.co.nz> wrote: >My problem is that I am designing for a 1024x768 screen size but want to= =20 >be able to have it work on any screen size and for everything to scale=20 >correctly. I don't mind calculating the correct font sizes etc myself. > >How do other people deal with this? I see some windows that when resized= a=20 >big gray area appears which is pretty useless. I did a little of this in MEditor, mainly because it had been developed on different monitor & font size settings. It took a fair amount of fiddling, even though as you might imagine, a text editor has only a few pop-up windows and most are relatively trivial. As with performance optimisation, it is not a bad idea to get the whole thing working first, on your basic settings. Maybe later in the project, spend a week developing in each of the other resolutions you need to support. Some code for font size detection, if you don't know: integer lf -- use large fonts object hdc, iDPI lf =3D 0 hdc =3D getDC(Screen) iDPI =3D w32Func( xGetDeviceCaps, {hdc, LOGPIXELSX} ) releaseDC(hdc) --DEV should just be >96? if iDPI =3D 120 then lf=3D1 end if Yes, that little reminder has been in the code now for about 18 months The windows eventually ended up something like: constant COLOUROPTIONS =3D create( Window, "Colour Options", MAIN, 120, 70, 450+lf*50, 400+lf*100,WStyle), COLOURGROUP =3D create( Group, "Colour", COLOUROPTIONS, 5, 5, 255+lf*25, 170, 0 ), EUPHORIAWORDS =3D create( List, "Elements", COLOURGROUP, 10, 15+lf*5, 85+lf*25, 150, 0 ), FONTGROUP =3D create( Group, "Fontsize", COLOUROPTIONS, 270+lf*25, 5, 65+lf*6, 95, 0 ), etc.. Messy, is it not? And not IDE friendly. Well, anyway, that's what I did. Let me know if you have any better ideas. Pete