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

    Scrolling Scaled Bitmaps

    How can you implement scrolling using the CScrollView class as a parent when displaying a bitmap using CStretchDIBits? Everything I try just displays the stretched bitmap with the scroll bars, and when you try scrolling the bitmap just judders. I was able to implement scrollbars with a bitmap displayed using SetDIBitsToDevice by just using the device coordinates as the target rectangle origin, but this did not work for CStretchDIBits.


  2. #2
    Guest

    Re: Scrolling Scaled Bitmaps

    Can you tell me how you did that ?
    (Adding scroll bar to a bitmap displayed using setdibitstodevice? )
    thankx
    <br

  3. #3
    Join Date
    Aug 1999
    Posts
    8

    Re: Scrolling Scaled Bitmaps

    the following code under the OnDraw function draws a bitmap (un-scaled) with working scrollbars:

    <pr

  4. #4
    Guest

    Re: Scrolling Scaled Bitmaps

    Hi
    Thankx for your explanations. I still have some problems.May be once I explain it, things wld be clearer. I have a bitmap on a dlg box, which am using SetDIBitstoDevice to display. From the resource I have place a horizontal and vertical scroll bars. My plan is to trap these scrll bar images to make the image scroll.
    But I am struck up there. How do I "connect" the bitmap to the scroll bars ?
    Can you please expalin me how you did that in you app ?
    Is the way am doing is right ? Or is there any better way of doing it ?
    Thankx in advance



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