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

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


How to attach a HORIZONTAL SCROLBAR to a combo box

Ramesh -- ramesh@tenetsoft.com
Monday, May 20, 1996

>Hi!		

	Environment: VC++ 4.0 / Win NT(3.51)
	
	In a dialog box I would like to attach horizontal scroll bar to the
listbox of a COMBO BOX  dynamically when the contents do not fit in. 
	
	Documentation for CComboBox says SetHorizontalExtent() is to be used to
attach a horizontal scroll bar, for that combo box should be created
with horizontal scrollbar style (WS_HSCROLL) style. 

	There is no option in the App Studio  to specify horizontal scroll bar
style to the COMBO BOX, but for vertical scroll bar there is an option.
So I edited the .rc file as a text file and added the WS_HSCROLL style
to the COMBO BOX.
	
  	There are not any errors while compiling and running, not even
warnings, but Horizontalscroll bar is not coming.

	For a LIST BOX I could attach horizontal scroll bar dynamically by
calling SetHorizontalExtent().

	 Even the LISTBOX has to be created with horizontal scroll bar sytle
and the App Studio has got (Horizontal Scroll bar style) checkbox for
LISTBOX (unlike COMBO BOX).

	  I absolutely had no problems in getting a horizontal scroll bar for
list box. I did the same way for COMBOBOX but of no use. 

Can anyone help me out ???

Thank You
Ramesh





Dicky Singh -- Dicky@landmark.com
Thursday, May 23, 1996

Won't it be a better idea to implement something similar to List tips / 
tree tips, for your dropped down listbox items?

The new version of ComCtl32.dll (ver 4.7.1053) supports Tree Tips.   A 
newer version would probably support List tips in List control.  Maybe 
Microsoft should implement something like combo-tips also.

----------
From: 	Ramesh[SMTP:ramesh@tenetsoft.com]
Sent: 	Monday, May 20, 1996 2:23 p
To: 	'mfc-l@netcom.com'
Subject: 	How to attach a HORIZONTAL SCROLBAR to a combo box

>Hi!		

	Environment: VC++ 4.0 / Win NT(3.51)
	
	In a dialog box I would like to attach horizontal scroll bar to the
listbox of a COMBO BOX  dynamically when the contents do not fit in.
	
	Documentation for CComboBox says SetHorizontalExtent() is to be used to
attach a horizontal scroll bar, for that combo box should be created
with horizontal scrollbar style (WS_HSCROLL) style.

	There is no option in the App Studio  to specify horizontal scroll bar
style to the COMBO BOX, but for vertical scroll bar there is an option.
So I edited the .rc file as a text file and added the WS_HSCROLL style
to the COMBO BOX.
	
  	There are not any errors while compiling and running, not even
warnings, but Horizontalscroll bar is not coming.

	For a LIST BOX I could attach horizontal scroll bar dynamically by
calling SetHorizontalExtent().

	 Even the LISTBOX has to be created with horizontal scroll bar sytle
and the App Studio has got (Horizontal Scroll bar style) checkbox for
LISTBOX (unlike COMBO BOX).

	  I absolutely had no problems in getting a horizontal scroll bar for
list box. I did the same way for COMBOBOX but of no use.

Can anyone help me out ???

Thank You
Ramesh






-----------------------------
-Dicky
Dicky@Landmark.COM
Dragon Team

begin 600 WINMAIL.DAT
M>)\^(A<-`0:0" `$```````!``$``0>0!@`(````Y 0```````#H``$-@ 0`
M`@````(``@`!!) &``P!```!````# ````,``# #````"P`/#@`````"`?\/
M`0```#\`````````@2L?I+ZC$!F=;@#=`0]4`@````!M9F,M;$!N971C;VTN
M8V]M`%--5% `;69C+6Q ;F5T8V]M+F-O;0``'@`", $````%````4TU44 ``
M```>``,P`0```!$```!M9F,M;$!N971C;VTN8V]M``````,`%0P!`````P#^
M#P8````>``$P`0```!,````G;69C+6Q ;F5T8V]M+F-O;2<```(!"S !````
M%@```%--5% Z349#+4Q 3D540T]-+D-/30````,``#D`````"P! .@$````"
M`?8/`0````0````````#/RP!"( '`!@```!)4$TN36EC #W$ $%@ ,`#@```,P'!0`7``D`
M'@`5``0`+P$!(( #``X```#,!P4`%P`)`!@`#@`$`"(!`0F `0`A````1#5#
M.45"-4,W04(T0T8Q,4(Y-T(P,# P.#-",#$R03 `,@
M`' ``0```#<```!213H@2&]W('1O(&%T=&%C:"!A($A/4DE:3TY404P@4T-2
M3TQ"05(@=&\@82!C;VUB;R!B;W@```(!<0`!````%@````&[2*O]QESKR=:T
M>A'/N7L``(.P$J ``!X`'@P!````!0```%--5% `````'@`?# $````&````
M1&EC:WD````#``80Z%)M40,`!Q!O!0``'@`($ $```!E````5T].5$E40D5!
M0D545$52241%051/24U03$5-14Y44T]-151(24Y'4TE-24Q!4E1/3$E35%1)
M4%,O5%)%151)4%,L1D]264]54D123U!0141$3U=.3$E35$)/6$E414U3/U1(
M10`````"`0D0`0```) %``",!0``@ H``$Q:1G4>1>RN_P`*`0\"%0*H!>L"
M@P!0`O()`@!C: K H VP'Q!T;QZ@
MWFT+4!/@"? %0',#H1/@,',_(" *
MA J%5&AU'O!N!]%V!) `D (@( AO9B (4&U#=&R@,S(N9&P#("@G,2 @-"XW
M+AR0-3.Z*2"P=21 &1$$(%0BXOL'8"* +B7 %+ FXA]Q)S::=PA@;"1P$U!O
M8@&@_&QY*98B"0N (@0%H (P10-@;"K!36%Y'N%-NFD%`&\@P & (+!H+!-W
M("\A,23@:Q[P!: &T2UW(F,'0"# +B7J"O0DX#'D-#0"T6DM-',,T#1SN0M9
M,38*H -@$]!C!4"^+3<7,Y8URPPP-I9&`V&^.@KA-<\VT0R"!_!A!X$`:%M3
M3510.G*].\- $] F\"H`+_$N,C%^73>_.,P&8 (P.>\Z^DW=`B!D+T C8"\Q
M( '0(V 0,3DY-D)P.C(S9RQ0/<\XS%1O/_\Z^2?B;1%@+6Q /0$R,3URQB=#
M?S[==6)J-M%%CVTZ^D@DH!_B80) `-!H`1\!2$]225I/3@A404P&`$-23TSX
M0D%23,,R)![0)3 S/X<=+S61-J0^2&DA#(2'`:!/NSMR16YV:0-@AFX@Q@1\00T]-0D\@76#B
M6"7 9'EN.\ OH = _2S!=R; `Z!;P2Z#(($$(/\DD";@-K C%]B*.\I@ 0`
M'^(>X741L"1P'_#_"H5-!UH_6T(C9"$`30!/&-\P)A[A!0`?P!/09 J%`_#;
M(0!G;VQ;4A/ >3#0**#05U-?2$Y#3"F!;4+_8)93B2:Q&7!E8E_P)Z %,#05K;;_;_`Y%PI#,E!@`@`%C "8 E86-F,2;!+G)C8"%M86%[
M,L$?X&5D\'K%0> ?`&3_#;!Z-&VH;20*A74>,R52Z/\JT6^9"L FT6 !`' L
MT 20WP-@$:!>D7KB,C%P`Q A(O%\$G)U;@,`'' C8%_R^F4G,&YK)@K @_(C
M478R?V1(6NEP0VE3(2$S+#MR1L,%L1\03$E35%V#6,"?!: L(EG/6MI=ZF)Y
M"H6_7D(A(F0?92*(3R7 182A_U[CB<)=DA& 989JM6N/6NE\-=-X^_D,%8
ML0&@(, *0/\3T"S!$8 D<'!Q+&(PT2WS_F\"; ;'&@
M=Z,Q"& %0#^GH"7M`'!K_"!9"& *A3NT)>JJ;U!O_U%])>H+-Q;R`= W"; O
M-Q#)"J,M1"^@:WD*H['#C$!,?!$`P')K+ETQK[(4/'"7``.@5!_ ;28$`GVT
M\ ,`$! ``````P`1$ ````! ```#T`
2`0````4```!213H@`````().
`
end




Sunitha Kumar -- sunithak@m-net.arbornet.org
Thursday, May 30, 1996

Dear Ramesh,
In combobox, the styles have autohscroll. You could check this.So, when =
ever the contents exceed the horizontal extent, you get an automatic =
hscroll for Your listbox of combobox.
Else, if you are creating dynamically, use CBS_AUTOHSCROLL style in =
create.
Hope this helps.						Sunitha Kumar




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