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

Setting pixels

Scheduled Pinned Locked Moved C / C++ / MFC
graphicstutorialquestion
4 Posts 2 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.
  • C Offline
    C Offline
    chaitanya22
    wrote on last edited by
    #1

    How to set pixels in Bitmap? I created bitmap by using createbitmap(..), but i need to higlight the pixels at certain cordiantes like (20,20),(30,30).......How shooudl i proceed? -- modified at 6:42 Friday 24th March, 2006

    H 1 Reply Last reply
    0
    • C chaitanya22

      How to set pixels in Bitmap? I created bitmap by using createbitmap(..), but i need to higlight the pixels at certain cordiantes like (20,20),(30,30).......How shooudl i proceed? -- modified at 6:42 Friday 24th March, 2006

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

      CImage m; m.SetPixel();

      C 1 Reply Last reply
      0
      • H Hamid Taebi

        CImage m; m.SetPixel();

        C Offline
        C Offline
        chaitanya22
        wrote on last edited by
        #3

        thank u for your reply, how could i use it for C coding?

        H 1 Reply Last reply
        0
        • C chaitanya22

          thank u for your reply, how could i use it for C coding?

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

          //or you can use HDC hdc=CreateCompatibleDC(GetDC()->m_hDC); HBITMAP hBit=CreateCompatibleBitmap(GetDC()->m_hDC,X,Y); SelectObject(hdc,hBit); ... ... SetPixel(hdc,20,20,RGB(120,120,120));

          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