CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 1999
    Posts
    3

    How to make a scrollbar on an ActiveX Control window?

    I want to make a scrollbar on an ActiveX control
    window. How to do it?
    Could you give me some examples?
    Thanks!!!


  2. #2
    Join Date
    Apr 1999
    Posts
    10

    Re: How to make a scrollbar on an ActiveX Control window?

    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...

  3. #3
    Join Date
    Apr 1999
    Posts
    3

    Re: How to make a scrollbar on an ActiveX Control window?

    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.


  4. #4
    Join Date
    Apr 1999
    Posts
    11

    Re: How to make a scrollbar on an ActiveX Control window?

    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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured