davel@booboo.SanDiego.NCR.COM (David Lord) (04/16/91)
When I size my child window (using MoveWindow) I want to allow for the client area and for a scroll bar (if needed). Unfortunately I don't see anything that gives the width of a scroll bar. Are they always the same size? Right now I'm using the value 20 which works on my display but I don't know if the size would vary on say an EGA display. Oh, and to all those people sending me mail about my previous posting "re: Using Borland C++," Standard mode, not Real mode; Yes I've got that now. At the time I posted that the only distinctions I had in my mind were "The mode I use (386 enhanced)" and "Everything else". Kind of like my counting system: one, two, three, many. Dave.Lord@SanDiego.NCR.Com
hmolotsi@pollux.svale.hp.com (Hugh Molotsi) (04/18/91)
GetSystemMetrics(SM_CXHTHUMB) will give you the scroll bar width and GetSystemMetrics(SM_CYVTHUMB) will give you the scroll bar height. ----------------------------------------------------------------------------- How you gonna do it? You gonna OS/2 it!!
bonneau@hyper.hyper.com (Paul Bonneau) (04/18/91)
In article <1991Apr15.185247.17784@SanDiego.NCR.COM> davel@booboo.SanDiego.NCR.COM (David Lord) writes: >When I size my child window (using MoveWindow) I want to allow for >the client area and for a scroll bar (if needed). Unfortunately I >don't see anything that gives the width of a scroll bar. Are they >always the same size? Right now I'm using the value 20 which works >on my display but I don't know if the size would vary on say an EGA >display. > You can use AdjustWindowRect(). Give it the size of the client area, and use the appropriate scroll flags (WS_HSCROLL or WS_VSCROLL). It will come back with the total size of the window to accomodate both. cheers - Paul Bonneau.
kensy@microsoft.UUCP (Ken SYKES) (04/29/91)
GetSystemMetrics. All kinds of size information gathered from this function. Ken Sykes Disclaimer: The above opinions are solely my own.