15 мая 2023 года "Исходники.РУ" отмечают своё 23-летие!
Поздравляем всех причастных и неравнодушных с этим событием!
И огромное спасибо всем, кто был и остаётся с нами все эти годы!

Главная Форум Журнал Wiki DRKB Discuz!ML Помощь проекту


Splitter Resizing

Eric Marc Loebenberg -- loebenbe@qc.bell.ca
Friday, December 06, 1996

Environment: VC++ 4.2b, Win 95

Reply to: loebenbe@qc.bell.ca

Hi,
I have a splitter window with 2 views, one on top, one on bottom.  When
the frame is resized, I want the split to be done in the same proportion
as it was before.  In other words, if the top view took 2/3 of the frame
and the bottom frame the other 1/3, I would like that to remain the same
when the main application window is resized.

What is the correct procedure?  (When and where do I set the sizes?) 
Thanks much.

***************************************************************
  Eric Marc Loebenberg                  loebenbe@qc.bell.ca
  Bell Sygma Inc.                    
  700 de la Gauchetiere West       Tel: 514-870-0465
  Room 14W1                        Fax: 514-870-7583
  Montreal, Quebec, Canada
  H3B 4L1



Mao Zhihong -- maozhihong@hotmail.com
Tuesday, December 10, 1996

[Mini-digest: 2 responses]

Hi,=20
  Overide  your frame window's OnSize(), and resize each part there.
  hope this will helpfull.
					Yours
						Mao
>Hi,
>     I have a splitter window with 2 views, one on top, one on bottom.  =
When
>     the frame is resized, I want the split to be done in the same propo=
rtion
>     as it was before.  In other words, if the top view took 2/3 of the =
frame
>     and the bottom frame the other 1/3, I would like that to remain the=
 same
>     when the main application window is resized.

--=20
 "M!cr@$@ft'$ D@vbl $p cE is tHe s=E0fteSt h=E0Rd di k c mPre so@#!"
 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D=
-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D
      Mao Zhihong ( Robert Mao )  DreamyRainbow Software Studio

      Voc/Fax : 86-25-5408086
      E-Mail  : maozhihong@hotmail.com  mao@seu.edu.cn
      URL     : http://seic3.seu.edu.cn/~mao
 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D=
-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D
-----From: Mario Contestabile

>I have a splitter window with 2 views, one on top, one on bottom.  When
>the frame is resized, I want the split to be done in the same proportion
>as it was before.  In other words, if the top view took 2/3 of the frame
>and the bottom frame the other 1/3, I would like that to remain the same
>when the main application window is resized.

Instead of having a CSplitterWnd member in your CMDIChildWnd derived clas=
s,
derive your own class from CSlitterWnd and use GetColumnInfo()/SetColumnI=
nfo()

mcontest@universal.com





| Вернуться в корень Архива |