Greetings - my first question so please forgive any faux-pas I make..
My Win32 application loads a number of embedded Web browsers, each of which load and play a Flash movie.
I want to find a way to control the volume of each loaded Flash movie independently of each other. My target platform is Windows XP so I can't use the mixer APIs that I hear are available on Vista and 7.
Here is the code with error checking etc. removed (I'm using a very simple Flash API call to test)
I did and I get the same access violation error. Even if it worked though, wouldn't that just let me control an instance of Flash that I load versus an instance loaded by the browser (which is what I want)?
I think each browser instance must load it's own version of the plugin or controlling Flash parameters in one would control them all.
hFlashDLL and flash_stop_func appear to be valid but when I call the function itself I get an access violation.
My apologies, I missed this in your original post. Is there any more information from the access violation to give any indication of what it is complaining about? Also are you sure that native_ShockwaveFlash_StopPlay does not require any parameters?
>> Also are you sure that native_ShockwaveFlash_StopPlay does not require any parameters?
That was my thought too Richard - docs are a bit thin on the ground and that function name doesn't match any in the the other Flash API docs I've seen so I'm thinking those calls are wrapped somehow and that my part of the problem.
Nothing more useful in the error message as far as I can tell.
I just Googled native_ShockwaveFlash_StopPlay and found one hit; someone else complaining of the same issue. My only suggestion is to try and get some documentation on this library from someone else around the world.
HBITMAP m_Bitmap,m_OldBitmap,hMainBmp ;
//one intersting for you if you want to use of other resulition
//use of GetDC()->m_hDC and see result.
//one interesting for you if you want to use of other
m_Bitmap = CreateCompatibleBitmap(hdc,x,y);
m_OldBitmap=(HBITMAP) SelectObject(m_hdcMem, m_Bitmap);
BitBlt(m_hdcMem, 0,0,x,y, hdc,0,0,SRCCOPY);
hMainBmp =(HBITMAP) SelectObject(m_hdcMem, m_OldBitmap);
///////////Now you have a hbitmap of screen hMainBmp/////
m_Image.Save("C:\\image.bmp");//use of jpg instead bmp but if you can zip your file its good.
It's working for me.
Now i want to save file in format of .DAT.
Please help me
There's no such .DAT file. What you've got by capturing the screen is a bitmap, and you just save it to the disk by providing any extension you want to the filename. Or if by .DAT you want to have a file format that your app can only handle, encrypt (search the site) the bitmap and save it to ".DAT format".
Take a look at the example at the end of the documentation for CImage::Save()[^]. Because you said "image.dat", the call didn't know the format. You will need to explicitly specify it as bitmap format by doing it this way:
I have a dll that needs to share data among all instances. How can I accomplish this? I've tried a multitude of compiler-specific #pragma's (visual studio 2008 for anyone who's asking) and no matter what I do, I cannot share the variables across all instances.
MSDN says memory-mapped files are one of several solutions, so any info on that too would be welcome.
I remember reading somewhere (on MSDN) that the #pragma data_seg() directive should not be used with classes that require deep copy constructors. Unfortunately, the data I want to share is an std::list.
The page you linked me to goes on to say "Because of these restrictions, Microsoft does not recommend sharing C++ objects between processes."
They also don't recommend sharing pointers, so what alternative do I have?
Last Visit: 28-Mar-20 20:56 Last Update: 28-Mar-20 20:57