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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. how to display a 24 bit bitmap on a SDI View

how to display a 24 bit bitmap on a SDI View

Scheduled Pinned Locked Moved C / C++ / MFC
graphicstutorial
11 Posts 5 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.
  • A ashwath2005

    Hi all, I have a 24 bit bitmap image file. It needs to be displayed on a SDI View screen. Can anyone please tell me how i can do it.

    R Offline
    R Offline
    RockyJames
    wrote on last edited by
    #2

    use LoadImage function instead of LoadBitmap..LoadBitmap support 32X32..

    1 Reply Last reply
    0
    • A ashwath2005

      Hi all, I have a 24 bit bitmap image file. It needs to be displayed on a SDI View screen. Can anyone please tell me how i can do it.

      H Offline
      H Offline
      Hamid Taebi
      wrote on last edited by
      #3

      You can use LoadImageor cimage for load picture and use from WM_PAINT for show_**


      **_

      whitesky


      A 1 Reply Last reply
      0
      • H Hamid Taebi

        You can use LoadImageor cimage for load picture and use from WM_PAINT for show_**


        **_

        whitesky


        A Offline
        A Offline
        ashwath2005
        wrote on last edited by
        #4

        hi, I have a CDC* pDC in the OnDraw() function.How do i go about from here.

        H 1 Reply Last reply
        0
        • A ashwath2005

          hi, I have a CDC* pDC in the OnDraw() function.How do i go about from here.

          H Offline
          H Offline
          Hamid Taebi
          wrote on last edited by
          #5

          not problem you need to a dc you can use pDC->BitBlt or StretchBlt_**


          **_

          whitesky


          A 1 Reply Last reply
          0
          • H Hamid Taebi

            not problem you need to a dc you can use pDC->BitBlt or StretchBlt_**


            **_

            whitesky


            A Offline
            A Offline
            ashwath2005
            wrote on last edited by
            #6

            Can u give me the code.

            H 1 Reply Last reply
            0
            • A ashwath2005

              Hi all, I have a 24 bit bitmap image file. It needs to be displayed on a SDI View screen. Can anyone please tell me how i can do it.

              C Offline
              C Offline
              Code_Zombie
              wrote on last edited by
              #7

              Hi, You can use Bitblt, CBitmap* pOldBitmap =pDC->SelectObject(&m_hBit); pDC->BitBlt(//...); pDC->SelectObject(pOldBitmap); Thanks

              A 1 Reply Last reply
              0
              • C Code_Zombie

                Hi, You can use Bitblt, CBitmap* pOldBitmap =pDC->SelectObject(&m_hBit); pDC->BitBlt(//...); pDC->SelectObject(pOldBitmap); Thanks

                A Offline
                A Offline
                ashwath2005
                wrote on last edited by
                #8

                What is m_hBit.

                H P 2 Replies Last reply
                0
                • A ashwath2005

                  Can u give me the code.

                  H Offline
                  H Offline
                  Hamid Taebi
                  wrote on last edited by
                  #9

                  with this code you can show your picture CImage m_Image; m_Image.Load(Filename); m_Image.BitBlt(....);_**


                  **_

                  whitesky


                  1 Reply Last reply
                  0
                  • A ashwath2005

                    What is m_hBit.

                    H Offline
                    H Offline
                    Hamid Taebi
                    wrote on last edited by
                    #10

                    I think a handle bitmap_**


                    **_

                    whitesky


                    1 Reply Last reply
                    0
                    • A ashwath2005

                      What is m_hBit.

                      P Offline
                      P Offline
                      Parthi_Appu
                      wrote on last edited by
                      #11

                      'm_hBit' is an object to CBitmap Class. CDC::SelectObject() accepts pointer to CBitmap. You can have an CBItmap object in two steps, CBitmap m_hBit; m_hBit.LoadBitmap(...); //you can use other initializtion methods too After these two steps, you can use m_hBit object in CDC::SelectObject()

                      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