Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to implement Scroll bars?

Status
Not open for further replies.

nhungr

Programmer
Jan 31, 2005
26
CA
Hello.

In Visual C++, Is there a simple way of implementing scrollbars into a CWnd class (in an SDI application) without using CScrollView?

My program prints a whole column of data on a blank window, and I need to be able to scroll down to the bottom of the list.

Thanks for any tips,

Nikolai.
 
Have you tried CScrollBar? If it is tons of data then you will have to implement some form of manual scrolling where you populate the visible section when the user clicks in the scroll bar.
 
Ok, so I've tried using CSrollBar and it's quite easy. I have it appearing on the window, but it doesn't react to any mouse clicks. How do I link it to what's printed on the window so that I can scroll down the length of the data list?

I have constructed the CScrollBar member in the CWnd class, I've called CScrollBar::Create, and I've initialized all the ScrollInfo.

Thanks again!

Nikolai.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top