I'm making an MFC dialog-based application in Visual C++ 2005. I added a scroll bar to an edit box. How do I program the scroll bar to make it work?
A:
http://www.functionx.com/visualc/controls/scrollbar.htm
has code you can use to control the scroll bar.
Maggie
2009-05-31 00:51:22
A:
The windows styles wS_VSCROLL and WS_HSCROLL control if there is a scroll bar present or not. Normally you just setup these styles as part of the resource dialog template.
With MFC you use the "CWnd::ShowScrollBar" method to turn the scroll bar on/off.
When scrollbars are turned on, then they should work automatically for edit controls. You don't need to do anything.
Shane Powell
2009-05-31 06:17:14