Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Repeated Question- How to upload a Large Bitmap (1600*1600 Pixel)

Repeated Question- How to upload a Large Bitmap (1600*1600 Pixel)

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestiongraphics
5 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Madhu_Rani
    wrote on last edited by
    #1

    Hi, I have an SDI based application. The view class has a base class CScrollView to accomodate large data. Horizontal and Verticals scrolls can be used for navigation. Now I want to upload a bitmap having larger dimension but I am unable to do it. The client view accomodate only normal size of bitmap say (700*1100)... so what shold I do... Also One have to write code in OnDraw() as when he navigates, so that bitmap upload again and the stuff is full of flickers. even then I could not view the EXTREME BOTTOM and EXTREME RIGHT of the image. Please guide?

    C 1 Reply Last reply
    0
    • M Madhu_Rani

      Hi, I have an SDI based application. The view class has a base class CScrollView to accomodate large data. Horizontal and Verticals scrolls can be used for navigation. Now I want to upload a bitmap having larger dimension but I am unable to do it. The client view accomodate only normal size of bitmap say (700*1100)... so what shold I do... Also One have to write code in OnDraw() as when he navigates, so that bitmap upload again and the stuff is full of flickers. even then I could not view the EXTREME BOTTOM and EXTREME RIGHT of the image. Please guide?

      C Offline
      C Offline
      Cedric Moonen
      wrote on last edited by
      #2

      Did you look at CScrollView::SetScrollSizes[^] ?

      Cédric Moonen Software developer
      Charting control [v2.0] OpenGL game tutorial in C++

      M 1 Reply Last reply
      0
      • C Cedric Moonen

        Did you look at CScrollView::SetScrollSizes[^] ?

        Cédric Moonen Software developer
        Charting control [v2.0] OpenGL game tutorial in C++

        M Offline
        M Offline
        Madhu_Rani
        wrote on last edited by
        #3

        YES. I already set them to 1600. void CTRYView::OnInitialUpdate() { CScrollView::OnInitialUpdate(); CSize sizeTotal; // TODO: calculate the total size of this view sizeTotal.cx = sizeTotal.cy = 1600; SetScrollSizes(MM_TEXT, sizeTotal); } BUT no benefit?

        P 1 Reply Last reply
        0
        • M Madhu_Rani

          YES. I already set them to 1600. void CTRYView::OnInitialUpdate() { CScrollView::OnInitialUpdate(); CSize sizeTotal; // TODO: calculate the total size of this view sizeTotal.cx = sizeTotal.cy = 1600; SetScrollSizes(MM_TEXT, sizeTotal); } BUT no benefit?

          P Offline
          P Offline
          Prasann Mayekar
          wrote on last edited by
          #4

          use the setscrollsizes() function just before u try to load the image on the screen. there is no need to handle drawing on scroll, onDraw automatically is called. to avoid the flickering problem, u can try using memory DC by using the CreateCompatibleDC() and CreateCompatibleBitmap() functions. once the drawing is done, use the BitBlt() or stretchBlt to draw this to ur main Device context. Pras who else

          M 1 Reply Last reply
          0
          • P Prasann Mayekar

            use the setscrollsizes() function just before u try to load the image on the screen. there is no need to handle drawing on scroll, onDraw automatically is called. to avoid the flickering problem, u can try using memory DC by using the CreateCompatibleDC() and CreateCompatibleBitmap() functions. once the drawing is done, use the BitBlt() or stretchBlt to draw this to ur main Device context. Pras who else

            M Offline
            M Offline
            Madhu_Rani
            wrote on last edited by
            #5

            use the setscrollsizes() function just before u try to load the image on the screen. YES u are right . I called setscrollsizes() in OnInitialUpdate() whereas I load the bitmap against a menu click but still it is not working. :((

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups