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. MFC Programming Problem.

MFC Programming Problem.

Scheduled Pinned Locked Moved C / C++ / MFC
helpc++comgraphicstutorial
9 Posts 4 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.
  • K Offline
    K Offline
    kaushal kishore sharma
    wrote on last edited by
    #1

    hello everyone. I am currently doing my B.tech in CSE ,4th yr. I have a question in MFC,hope anyone can solve it as soon as possible. my Question is : I am loading a bitmap image of different color and i want to know how to get the pixels coordinates of that image. I have try getpixel and setpixel but i am not able to use it properly, so someone can help where to use this and how to create my work. I will be very thankful to you. please either mail me or post it here. my email id -- kaushal.vickyin@gmail.com Your Sincerely kaushal kishore sharma

    M F 2 Replies Last reply
    0
    • K kaushal kishore sharma

      hello everyone. I am currently doing my B.tech in CSE ,4th yr. I have a question in MFC,hope anyone can solve it as soon as possible. my Question is : I am loading a bitmap image of different color and i want to know how to get the pixels coordinates of that image. I have try getpixel and setpixel but i am not able to use it properly, so someone can help where to use this and how to create my work. I will be very thankful to you. please either mail me or post it here. my email id -- kaushal.vickyin@gmail.com Your Sincerely kaushal kishore sharma

      M Offline
      M Offline
      Mark Salsbery
      wrote on last edited by
      #2

      kaushal kishore sharma wrote:

      i want to know how to get the pixels coordinates of that image

      Valid coordinates are 0 to width/height - 1 What are you trying to get from the bitmap? What have you tried that didn't work? Mark

      Mark Salsbery Microsoft MVP - Visual C++ :java:

      K 1 Reply Last reply
      0
      • M Mark Salsbery

        kaushal kishore sharma wrote:

        i want to know how to get the pixels coordinates of that image

        Valid coordinates are 0 to width/height - 1 What are you trying to get from the bitmap? What have you tried that didn't work? Mark

        Mark Salsbery Microsoft MVP - Visual C++ :java:

        K Offline
        K Offline
        kaushal kishore sharma
        wrote on last edited by
        #3

        thank you sir for the reply. Sir i am trying to take a bitmap image suppose A,B,C,D these are 4 alpha. used in image with different colors. Now my task is to whenever we put the mouse on the alpha. i would like to get the pixels coordinates. So can you help how should or what should be done in my project part. i can send you the detail if you want of the program. Your Sincerely Kaushal kishore Sharma

        M 1 Reply Last reply
        0
        • K kaushal kishore sharma

          thank you sir for the reply. Sir i am trying to take a bitmap image suppose A,B,C,D these are 4 alpha. used in image with different colors. Now my task is to whenever we put the mouse on the alpha. i would like to get the pixels coordinates. So can you help how should or what should be done in my project part. i can send you the detail if you want of the program. Your Sincerely Kaushal kishore Sharma

          M Offline
          M Offline
          Mark Salsbery
          wrote on last edited by
          #4

          Which part(s) of the task are giving you trouble? Can you post an example of code that's not working? Mark

          Mark Salsbery Microsoft MVP - Visual C++ :java:

          K 1 Reply Last reply
          0
          • M Mark Salsbery

            Which part(s) of the task are giving you trouble? Can you post an example of code that's not working? Mark

            Mark Salsbery Microsoft MVP - Visual C++ :java:

            K Offline
            K Offline
            kaushal kishore sharma
            wrote on last edited by
            #5

            thank you sir. I am searching for net for few days about this part when i create a CColorDlg class the VC++ gets hangs. Firstly sir i want to know that am i going in right direction for finding pixel coordinates aur not? then sir i tried out CColordlg for it it gets hangs. So sir i you have any code where i can include it in my project part i will be very thankful to you. Your Sincerely Kaushal Kishore Sharma

            M 1 Reply Last reply
            0
            • K kaushal kishore sharma

              thank you sir. I am searching for net for few days about this part when i create a CColorDlg class the VC++ gets hangs. Firstly sir i want to know that am i going in right direction for finding pixel coordinates aur not? then sir i tried out CColordlg for it it gets hangs. So sir i you have any code where i can include it in my project part i will be very thankful to you. Your Sincerely Kaushal Kishore Sharma

              M Offline
              M Offline
              Mark Salsbery
              wrote on last edited by
              #6

              kaushal kishore sharma wrote:

              i want to know that am i going in right direction for finding pixel coordinates aur not?

              I have no idea what you've done. No need to call me sir :) Mark

              Mark Salsbery Microsoft MVP - Visual C++ :java:

              K 1 Reply Last reply
              0
              • M Mark Salsbery

                kaushal kishore sharma wrote:

                i want to know that am i going in right direction for finding pixel coordinates aur not?

                I have no idea what you've done. No need to call me sir :) Mark

                Mark Salsbery Microsoft MVP - Visual C++ :java:

                K Offline
                K Offline
                kaushal kishore sharma
                wrote on last edited by
                #7

                thank you mark. can you send me your email id iacan send my code and then you might be able to understood my problem your sincerely kaushal kishore sharma

                D 1 Reply Last reply
                0
                • K kaushal kishore sharma

                  thank you mark. can you send me your email id iacan send my code and then you might be able to understood my problem your sincerely kaushal kishore sharma

                  D Offline
                  D Offline
                  David Crow
                  wrote on last edited by
                  #8

                  kaushal kishore sharma wrote:

                  can you send me your email id iacan send my code...

                  Narrow your code down to a handful of relevant statements. E-mailing someone in bulk is just asking to be ignored.

                  "Love people and use things, not love things and use people." - Unknown

                  "The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch

                  1 Reply Last reply
                  0
                  • K kaushal kishore sharma

                    hello everyone. I am currently doing my B.tech in CSE ,4th yr. I have a question in MFC,hope anyone can solve it as soon as possible. my Question is : I am loading a bitmap image of different color and i want to know how to get the pixels coordinates of that image. I have try getpixel and setpixel but i am not able to use it properly, so someone can help where to use this and how to create my work. I will be very thankful to you. please either mail me or post it here. my email id -- kaushal.vickyin@gmail.com Your Sincerely kaushal kishore sharma

                    F Offline
                    F Offline
                    followait
                    wrote on last edited by
                    #9

                    Take care of the stride? For example, the bimap is 8 bit per pixel, and 10*10 in size. It is not neccesarry that every line contains 8*10 bits. You might use stride to locate the pixel in the bitmap data. MSDN: GDI+ BitmapData Stride INT Offset, in bytes, between consecutive scan lines of the bitmap. If the stride is positive, the bitmap is top-down. If the stride is negative, the bitmap is bottom-up.

                    system

                    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