wilcox@wucs1.wustl.edu (Don Wilcox) (04/01/91)
Recently I posted asked for help in controlling the sizing of windows when the user mouses down in the frame of a window. I received 2 answers to my question (from Tom Yosick and Christine Roine), both of which pointed me to the WM_GETMINMAXINFO message. I added the case to my window procedure, changed the appropriate fields, and presto!, the user cannot make the window any bigger or smaller than I wish. My thanks to the responders. BTW, one of my benefactors pointed out that he had found the on-line reference much easier to use than the printed manuals. I would have to agree. Now for another question, anyone know how to find out if the SB_HORZ and SB_VERT scroll bars are currently visible? Can't seem to find anything which will tell me, short of getting both the client and window rects for the window and comparing their sizes. Too much work. Thanks again. Don sig files are too expensive for a grad student's budget.
johnm@spudge.UUCP (John Munsch) (04/03/91)
In article <1991Apr1.143705.10097@cec1.wustl.edu> wilcox@wucs1.wustl.edu (Don Wilcox) writes: >Now for another question, anyone know how to find out if the SB_HORZ and >SB_VERT scroll bars are currently visible? I don't know that this is the official way to do it but I did it and it _seemed_ to work... dwStyle = GetWindowLong(hWnd, GWL_STYLE); if (dwStyle & WS_HSCROLL) { // Do whatever... } if (dwStyle & WS_VSCROLL) { // Do whatever... } I hope it works for you. John Munsch "It's amazing that Microsoft was able to come up with OLE after only one reading through the HP NewWave manuals."