Solved

Interesting question on VC++ 5.0

Posted on 1998-10-08
3
183 Views
Last Modified: 2010-04-01
We have a dialog, which has a list box.
We would want to provide Horizontal scroll bars to the list box. We have already tried checking the horizontal control option, but that didnt work out. It works well for Vertical scroll bar. Kindly get back asap
0
Comment
Question by:pbhugra
  • 2
3 Comments
 
LVL 8

Expert Comment

by:Answers2000
ID: 1174658
The standard list box control can do horizontal or vertical scroll bars but not both.

Your options for a work round:
1. use List View control in details mode.    MFC has the handy CListCtrl class to process this.  These can handle both scroll bars
or
2. Add your own horizontal scroll bar external to the list, and scroll the content of the list box yourself (typically by using OwnerDraw and painting with an appropriate horizontal offset).  If you use message reflection you can handle the scroll bars in a class derived from CListBox and get a reusable list box with both horizontal and vertical scrollbars.

0
 
LVL 22

Expert Comment

by:nietod
ID: 1174659
Note to experts, I think answers2000 meant to answer with that.  It seems to be a good answer.
0
 
LVL 8

Accepted Solution

by:
Answers2000 earned 100 total points
ID: 1174660
Hmmm, well I kind of considered answering, and your 2nd opinion suggests I should...so I will now

pbhugra - see my 5:50 comment,
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Grammars for C C++ and java 1 139
C++ question 3 74
Installshield for Embarcadero EX 10.1 Berlin 4 74
find Speed using GPS latitude & longitude 4 95
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question