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. writing a device context from one application to another

writing a device context from one application to another

Scheduled Pinned Locked Moved C / C++ / MFC
8 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.
  • L Offline
    L Offline
    Llasus
    wrote on last edited by
    #1

    Hello and good day. I have an application which writes writes an image in a picture box and does processing in it about every 200ms. Now, I need to show the image being written into another application's picture box. I'm currently looking for ways to do this and currently I'm thinking of using clipboard. I want to know if there are better ways of doing this. Looking for any suggestions/solutions regarding this. Thank you in advance. :)

    S 1 Reply Last reply
    0
    • L Llasus

      Hello and good day. I have an application which writes writes an image in a picture box and does processing in it about every 200ms. Now, I need to show the image being written into another application's picture box. I'm currently looking for ways to do this and currently I'm thinking of using clipboard. I want to know if there are better ways of doing this. Looking for any suggestions/solutions regarding this. Thank you in advance. :)

      S Offline
      S Offline
      SandipG
      wrote on last edited by
      #2

      How you planning to synchronize two applications??

      L 1 Reply Last reply
      0
      • S SandipG

        How you planning to synchronize two applications??

        L Offline
        L Offline
        Llasus
        wrote on last edited by
        #3

        i was just thinking of using mutex if I am going to implement the clipboard solution.

        S 1 Reply Last reply
        0
        • L Llasus

          i was just thinking of using mutex if I am going to implement the clipboard solution.

          S Offline
          S Offline
          SandipG
          wrote on last edited by
          #4

          I feel clipboard would be used by many applications so avoid it. You can use memory mapped files instead. It all depends on your requirements but it just a suggestion.

          L 1 Reply Last reply
          0
          • S SandipG

            I feel clipboard would be used by many applications so avoid it. You can use memory mapped files instead. It all depends on your requirements but it just a suggestion.

            L Offline
            L Offline
            Llasus
            wrote on last edited by
            #5

            SandipG wrote:

            I feel clipboard would be used by many applications so avoid it.

            yes, that might cause problems later on.

            SandipG wrote:

            You can use memory mapped files instead. It all depends on your requirements but it just a suggestion.

            thank you for the suggestion. I'll check this one out. though from what I've read, this might be slower than a standard file I/O. The image in the application is refreshed per 200ms. But I'll try to make some dummy application and check if it works. Again, thanks a lot. :)

            S 1 Reply Last reply
            0
            • L Llasus

              SandipG wrote:

              I feel clipboard would be used by many applications so avoid it.

              yes, that might cause problems later on.

              SandipG wrote:

              You can use memory mapped files instead. It all depends on your requirements but it just a suggestion.

              thank you for the suggestion. I'll check this one out. though from what I've read, this might be slower than a standard file I/O. The image in the application is refreshed per 200ms. But I'll try to make some dummy application and check if it works. Again, thanks a lot. :)

              S Offline
              S Offline
              SandipG
              wrote on last edited by
              #6

              one more suggestion. You can have a common DLL and have one static variable of (HBITMAP/CBitmap/Image/Bitmap) may be you have to use pixel data in the form of byte array or someting similar and use the dll in both the applications. I hope it makes sense.

              modified on Monday, June 23, 2008 2:46 AM

              L 1 Reply Last reply
              0
              • S SandipG

                one more suggestion. You can have a common DLL and have one static variable of (HBITMAP/CBitmap/Image/Bitmap) may be you have to use pixel data in the form of byte array or someting similar and use the dll in both the applications. I hope it makes sense.

                modified on Monday, June 23, 2008 2:46 AM

                L Offline
                L Offline
                Llasus
                wrote on last edited by
                #7

                yes, I somehow get the point. But does that work? I mean if I apply the DLL in those two applications, although they use the same DLL, will the static variable that both the applications pointing to will be the same? If you can give me some sort of reference on this implementation it will be a great help. Thank you very much. already found some good samples here. No need to answer the questions. Thanks again :)

                modified on Friday, May 30, 2008 2:29 AM

                M 1 Reply Last reply
                0
                • L Llasus

                  yes, I somehow get the point. But does that work? I mean if I apply the DLL in those two applications, although they use the same DLL, will the static variable that both the applications pointing to will be the same? If you can give me some sort of reference on this implementation it will be a great help. Thank you very much. already found some good samples here. No need to answer the questions. Thanks again :)

                  modified on Friday, May 30, 2008 2:29 AM

                  M Offline
                  M Offline
                  MANISH RASTOGI
                  wrote on last edited by
                  #8

                  You can also use shared data segment in dll.

                  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