CStatic scroll bar
-
Is it possible to add a scroll bar to a CStatic control? I've derived a new base class from CStatic for graph/chart purposes, and I'd like to be able to allow the graph to scroll if it is too big for the available viewing area. I've found many graphing projects on the net, but none seem to have this feature which is of particular importance to me since I have long series of data. I've tried adding the WS_HSCROLL and WS_VSCROLL styles, I've called EnableScrollBarCtrl(), and I've called ShowScrollBar() but none of these methods have any effect. Anyone know something I don't? A second question: I've also added the SS_NOTIFY style, but my (base) class isn't receiving the notification. Do I have to override the message notification in every other class I derive from the base class to process the notification? Thanks for the help, --Dean
-
Is it possible to add a scroll bar to a CStatic control? I've derived a new base class from CStatic for graph/chart purposes, and I'd like to be able to allow the graph to scroll if it is too big for the available viewing area. I've found many graphing projects on the net, but none seem to have this feature which is of particular importance to me since I have long series of data. I've tried adding the WS_HSCROLL and WS_VSCROLL styles, I've called EnableScrollBarCtrl(), and I've called ShowScrollBar() but none of these methods have any effect. Anyone know something I don't? A second question: I've also added the SS_NOTIFY style, but my (base) class isn't receiving the notification. Do I have to override the message notification in every other class I derive from the base class to process the notification? Thanks for the help, --Dean
FWIW, I would have derived the control from CWnd, not CStatic. CStatic has too many restrictions such as the ones you described.
CPUA 0x5041 Sonork 100.11743 Chicken Little "So it can now be written in stone as a testament to humanities achievments "PJ did Pi at CP"." Colin Davies Within you lies the power for good - Use it!