I want to make a scrollbar on an ActiveX control
window. How to do it?
Could you give me some examples?
Thanks!!!
Printable View
I want to make a scrollbar on an ActiveX control
window. How to do it?
Could you give me some examples?
Thanks!!!
Heres a tip:
Look into Drawing Text onto a DC using a clipping
region...
CString Text;
GetWindowText(Text);
CRect tmprect = rcBounds;
TempDC.SetBkMode(TRANSPARENT);
tmprect.left += m_ScrollPosX;
tmprect.right += m_ScrollPosX;
tmprect.top += m_ScrollPosY;
tmprect.bottom += m_ScrollPosY;
TempDC.DrawText(Text,tmprect,0);
David Swigger
Please don't tell me it's impossible. That just means I have to proove it...
What I mean is I want to add a scrollbar onto an
ActiveX control window,that is ,how a scrollbar
can be display on an ActiveX control window?
Could you give me some examples about that?
Thank you very much.
You can use CFormView to contain the ActiveX control. If the ActiveX control displays content larger than the view area, the CFormView will automatically create scrollbar(s). But, you need to ceate message handlers for WM_HSCROLL, WM_VSCROLL, WM_SIZE and maybe WM_MOUSEWHELL to change the view position in the ACtiveX control.
Hope this will help. Good luck.
Allen