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. clear image on screen vc++6.0 ?????

clear image on screen vc++6.0 ?????

Scheduled Pinned Locked Moved C / C++ / MFC
c++graphicshelptutorialquestion
4 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.
  • A Offline
    A Offline
    aa_zz
    wrote on last edited by
    #1

    hi everybody. I draw on screen image BITMAP by load form file image Bitmap with size 10x10 inch. after, i want clear it to show image with size 1x1 inch, but invisible doing it. can you guide clear image on screen?. wish you help. thanks very much. regards, phan

    nothing

    L V 2 Replies Last reply
    0
    • A aa_zz

      hi everybody. I draw on screen image BITMAP by load form file image Bitmap with size 10x10 inch. after, i want clear it to show image with size 1x1 inch, but invisible doing it. can you guide clear image on screen?. wish you help. thanks very much. regards, phan

      nothing

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      You should load your bitmap into a compatible device context and then use the BitBlt() function to copy to the screen. Here[^] is a useful tutorial on using bitmaps, and here[^] is a link to the MSDN documentation.

      1 Reply Last reply
      0
      • A aa_zz

        hi everybody. I draw on screen image BITMAP by load form file image Bitmap with size 10x10 inch. after, i want clear it to show image with size 1x1 inch, but invisible doing it. can you guide clear image on screen?. wish you help. thanks very much. regards, phan

        nothing

        V Offline
        V Offline
        vasu_sri
        wrote on last edited by
        #3

        This function will do StretchBlt[^]

        Regards, Srinivas

        A 1 Reply Last reply
        0
        • V vasu_sri

          This function will do StretchBlt[^]

          Regards, Srinivas

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

          hi you. thanks for your help.this is functions i used: sOldBltMode = SetStretchBltMode( hDC, STRETCH_DELETESCANS ); // Create the palette. hPal = CreateDibPalette(); if ( hPal ) { hOldPal = SelectPalette( hDC, hPal, FALSE ); if ( hOldPal ) RealizePalette(hDC); } StretchDibBlt( hDC, r.left, r.top, r.Width(), r.Height(), hMem, Source.left, Source.top, Source.Width(), Source.Height(), SRCCOPY ); if ( hPal && hOldPal ) SelectPalette( hDC, hOldPal, FALSE ); if ( hPal ) DeleteObject( hPal ); // Reset the stretch mode. SetStretchBltMode( hDC, sOldBltMode ); ===> first.I show image 10x10inch from file image bitmap. after,i double lick into it, and i will show properties. i choice size 1x1inch. size 10x10inch not yet clear. have i must clear image 10x10inch ? wish your help

          nothing

          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