writing a device context from one application to another
-
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. :)
-
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. :)
-
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.
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. :)
-
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. :)
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
-
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
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
-
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
You can also use shared data segment in dll.