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

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


Changing the size and position of the scrollbars of CScrollV

Danny Lauwers -- dlauwers@innet.be
Saturday, April 20, 1996

Hello,

I would like to change the size and position in my Childwindow so that there
is some open space on the left side of the scrollbar to put in some control
icons. 
I derived my child class of my MDI application from CSrollView. Because
CScrollView doesn't return a CSrollBar when I call GetScrollBarCtrl probably
means that I have to add some CSrollbars myself. Do I still have the same
functionality of scrolling if I somehow add my own scrollbars to the derived
CSrollView class ??? Or is there a smarter way of changing the size and
position before the window is create ?? (In the OnCreate() maybe ?)

I am using NT351 and VC++4.0 and MFC4.0.

Thanks 
Danny Lauwers

==========================================================
Ing. Danny Lauwers (dlauwers@innet.be)
Intersoft Electronics
Lammerdries 27
2250 Olen Belgium Europe
Tel: +32 14 231811
Fax: +32 14 231944
----------------------------------------------------------
 Radar verification Hard- & software
 Fotofinish and timing of sportevents
 Footscan applications
 and more ...
==========================================================




Dan Kirby -- dkirby@accessone.com
Tuesday, April 23, 1996

>>>> I would like to change the size and position in my Childwindow so that 
thereis some open space on the left side of the scrollbar to put in some 
control icons. <<<<

There are a  number of approaches.  The auto-sizing of the CSrollView to 
the client area of the CMDIChildWnd is done in the OnSize() function of the 
CMDIChildWnd.  This handler calls RecalcLayout which sizes the view.

You can override the OnSize handler and RecalcLayout or you can override 
the OnSize handler for the CScrollView and adjust the size of the view 
based the cx and cy which are passed into the handler. The cx and cy 
contain the new width and height for the view and you can shrink that if 
you want.

Just some quick thoughts,
--dan


----------
From: 	Danny Lauwers[SMTP:dlauwers@innet.be]
Sent: 	Saturday, April 20, 1996 3:50 PM
To: 	mfc-l@netcom.com
Subject: 	Changing the size and position of the scrollbars of CScrollView

Hello,

I would like to change the size and position in my Childwindow so that 
there
is some open space on the left side of the scrollbar to put in some control
icons.
I derived my child class of my MDI application from CSrollView. Because
CScrollView doesn't return a CSrollBar when I call GetScrollBarCtrl 
probably
means that I have to add some CSrollbars myself. Do I still have the same
functionality of scrolling if I somehow add my own scrollbars to the 
derived
CSrollView class ??? Or is there a smarter way of changing the size and
position before the window is create ?? (In the OnCreate() maybe ?)

I am using NT351 and VC++4.0 and MFC4.0.

Thanks
Danny Lauwers

==========================================================
Ing. Danny Lauwers (dlauwers@innet.be)
Intersoft Electronics
Lammerdries 27
2250 Olen Belgium Europe
Tel: +32 14 231811
Fax: +32 14 231944
----------------------------------------------------------
 Radar verification Hard- & software
 Fotofinish and timing of sportevents
 Footscan applications
 and more ...
==========================================================





begin 600 WINMAIL.DAT
M>)\^(B ``0:0" `$```````!``$``0>0!@`(````Y 0```````#H``$(@ <`
M& ```$E032Y-:6-R;W-O9G0@36%I;"Y.;W1E`#$(`0V ! `"`````@`"``$$
MD 8`: (```(````,`````P``, ,````+``\.``````(!_P\!````/P``````
M``"!*Q^DOJ,0&9UN`-T!#U0"`````&UF8RUL0&YE=&-O;2YC;VT`4TU44 !M
M9F,M;$!N971C;VTN8V]M```>``(P`0````4```!33510`````!X``S !````
M$0```&UF8RUL0&YE=&-O;2YC;VT``````P`5# $````#`/X/!@```!X``3 !
M````$P```"=M9F,M;$!N971C;VTN8V]M)P```@$+, $````6````4TU44#I-
M1D,M3$!.151#3TTN0T]-`````P``.0`````+`$ Z`0````(!]@\!````! ``
M``````,-`````P``, 0````+``\.`0````(!_P\!````00````````"!*Q^D
MOJ,0&9UN`-T!#U0"```!`&1L875W97)S0&EN;F5T+F)E`%--5% `9&QA=7=E
M``,P`0```!(`
M``!D;&%U=V5R``$P`0``
M`!0````G9&QA=7=E]=G4QNP$>`' ``0```$0```!213H@0VAA;F=I;F<@=&AE('-I>F4@86YD
M('!OD6OP=N=*1'/DBA$15-4`````!X`'@P!````!0``
M`%--5% `````'@`?# $````5````9&MISJ1_\`"@$/`A4"I /D!>L"@P!0$P-4
M`@!C: K @! `B@0> (&_N< GP($ *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<@5 >V3_^W7[AO68H'\$9 "L%#$0:0Q86&2 L1
M+2 F(H$!@/]1('R'6\ >0']0"X $`$V4W7I@;3-U?> 7065#$ (P_Z9&O/$>
M0 3P`Y&%2;\W>>+[!& PH2["(*;/PU_$;ZG_7U3_= \;GRV=%L$`RO #`! 0
M! ````,`$1 `````0 `',&"^/D]T,;L!0 `(,&"^/D]T,;L!'@`]``$````%
5````4D4Z( `````#``TT_3<``*!=
`
end




Ray Kaminski -- rayk@bi-tech.com
Thursday, April 25, 1996

Look at m_rectBorder in CFrameWnd.  Set the right to something and you will 
have a gap next to the scroll bar.  This way MFC still handles the 
placement of your view.

----------
From: 	Dan Kirby
Sent: 	Tuesday, April 23, 1996 5:32 PM
To: 	'mfc-l@netcom.com'; 'dlauwers@innet.be'
Subject: 	RE: Changing the size and position of the scrollbars of 
CScrollView

>>>> I would like to change the size and position in my Childwindow so that 
thereis some open space on the left side of the scrollbar to put in some 
control icons. <<<<

There are a  number of approaches.  The auto-sizing of the CSrollView to 
the client area of the CMDIChildWnd is done in the OnSize() function of the 
CMDIChildWnd.  This handler calls RecalcLayout which sizes the view.

You can override the OnSize handler and RecalcLayout or you can override 
the OnSize handler for the CScrollView and adjust the size of the view 
based the cx and cy which are passed into the handler. The cx and cy 
contain the new width and height for the view and you can shrink that if 
you want.

Just some quick thoughts,
--dan


----------
From: 	Danny Lauwers[SMTP:dlauwers@innet.be]
Sent: 	Saturday, April 20, 1996 3:50 PM
To: 	mfc-l@netcom.com
Subject: 	Changing the size and position of the scrollbars of CScrollView

Hello,

I would like to change the size and position in my Childwindow so that 
there
is some open space on the left side of the scrollbar to put in some control
icons.
I derived my child class of my MDI application from CSrollView. Because
CScrollView doesn't return a CSrollBar when I call GetScrollBarCtrl 
probably
means that I have to add some CSrollbars myself. Do I still have the same
functionality of scrolling if I somehow add my own scrollbars to the 
derived
CSrollView class ??? Or is there a smarter way of changing the size and
position before the window is create ?? (In the OnCreate() maybe ?)

I am using NT351 and VC++4.0 and MFC4.0.

Thanks
Danny Lauwers

==========================================================
Ing. Danny Lauwers (dlauwers@innet.be)
Intersoft Electronics
Lammerdries 27
2250 Olen Belgium Europe
Tel: +32 14 231811
Fax: +32 14 231944
----------------------------------------------------------
 Radar verification Hard- & software
 Fotofinish and timing of sportevents
 Footscan applications
 and more ...
==========================================================





begin 600 WINMAIL.DAT
M>)\^(B 4`0:0" `$```````!``$``0>0!@`(````Y 0```````#H``$(@ <`
M& ```$E032Y-:6-R;W-O9G0@36%I;"Y.;W1E`#$(`0V ! `"`````@`"``$$
MD 8`# $```$````,`````P``, (````+``\.``````(!_P\!````/P``````
M``"!*Q^DOJ,0&9UN`-T!#U0"`````&UF8RUL0&YE=&-O;2YC;VT`4TU44 !M
M9F,M;$!N971C;VTN8V]M```>``(P`0````4```!33510`````!X``S !````
M$0```&UF8RUL0&YE=&-O;2YC;VT``````P`5# $````#`/X/!@```!X``3 !
M````$P```"=M9F,M;$!N971C;VTN8V]M)P```@$+, $````6````4TU44#I-
M1D,M3$!.151#3TTN0T]-`````P``.0`````+`$ Z`0````(!]@\!````! ``
M``````(]+ $$@ $`1 ```%)%.B!#:&%N9VEN9R!T:&4@`' ``0```$0```!213H@0VAA;F=I;F<@
M=&AE('-I>F4@86YD('!OD6OP=N=*1'/DBA$15-4````
M6VT0(0`>`!X,`0````4```!33510`````!X`'PP!````$0```')A>6M 8FDM
M=&5C:"YC;VT``````P`&$"_;B9L#``<0DP<``!X`"! !````90```$Q/3TM!
M5$U214-40D]21$5224Y#1E)!34573D1315142$5224=(5%1/4T]-151(24Y'
M04Y$64]55TE,3$A!5D5!1T%03D585%1/5$A%4T-23TQ,0D%25$A)4U=!64U&
M0U-424P``````@$)$ $```"F!@``H@8``.\.``!,6D9U3J];)_\`"@$/`A4"
MI /D!>L"@P!0$P-4`@!C: K #(U-0* "H$-L0M@
M;O!G,3 S%* +"A72# $"8P! ($QO;VL@$F$%0&U?&K!C=$(;!; $@2 +@!DP
M1G)AP0> 5VYD+B &405 D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^0R- I
MIXXA0"!V\&$C0DY4,S46X"."5N!#*RLT+I:@(X(G(>_342GM)I `<&L$( J%
MCGO]I"P]U[_8S]G?VD2G]AVP_\"1CHK/((^OT-;/0,I!(N"]KU%%* `@4 -@
M`P!CUL8];,!M!X +( B!!" R-^T*A3(./*.8>@A(?_YL_GW^COB@H'\'; 
M"L%SD8L&D+8&2 L1+2 F(M'_`8 FX*T',(")4"D@"X $`+M^%"=P;6/UKF :
M464D^W]R."!&!A(2[RH-=/\]_T[__:?X5_A:]>
M3Q>A7/\%P!G1`@#[X ```P`0$ `````#`!$0`````$ `!S# \+HJXS*[`4 `
H"## \+HJXS*[`1X`/0`!````!0```%)%.B ``````P`--/TW``!,WC*[
`
end





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