|
rajas wrote: but I get an E_INVALIDARG when I pass the new rate.
What rate do you pass (i.e. Could you please post the code?)?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi,
Can anyone tell how to write a program to combine both win32 and MFC for creating a window and exchange messages from each other in a project.
nss
|
|
|
|
|
Since MFC is a class library written on the top of Win32 API (it is -or was- actually a thin wrapper), then in every MFC project you are free to mix the two.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hello! You can look through articles here on CodeProject or go to:
http://www.functionx.com/visualc/[^]
Tutorials will help you get an understanding how to use Visual Studio and MFC to create dialog box applications. Good luck!
|
|
|
|
|
Thank you.
Anyway, I suppose the OP would be more interested...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi,
Would like to write a program using MFC to display png format of symbols on the display. Can anyone provide me details,from where I can get the details to start with?.Thanks in advance.
nss
|
|
|
|
|
there are dozens of PNG-related articles on CodeProject.
try the Search box.
|
|
|
|
|
MFC/ATL class CImage [^] supports the png format. You may also use directly GDI+ classes.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
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)
HMODULE hFlashDLL = GetModuleHandle( "NPSWF32.dll" );
typedef void (__stdcall *flash_func)();
flash_func flash_stop_func = (flash_func)GetProcAddress( hFlashDLL, "native_ShockwaveFlash_StopPlay" );
flash_stop_func();
hFlashDLL and flash_stop_func appear to be valid but when I call the function itself I get an access violation.
Should this work and I'm missing something obvious in my code or is this sort of thing just disallowed in Win32?
Any pointers appreciated.
|
|
|
|
|
opensoar wrote: HMODULE hFlashDLL = GetModuleHandle( "NPSWF32.dll" );
Did you try this:
HINSTANCE hLib = LoadLibrary(_T("NPSWF32.dll"));
|
|
|
|
|
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.
|
|
|
|
|
opensoar wrote: HMODULE hFlashDLL = GetModuleHandle( "NPSWF32.dll" );
Are you sure that this dll is loaded into memory at this point? You don't error check the returned value hFlashDLL .
MVP 2010 - are they mad?
|
|
|
|
|
Yep - it's loaded. Like I said in my original message, I listed the code with error checking etc. removed and the values I get back seem ok.
|
|
|
|
|
opensoar wrote: 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?
MVP 2010 - are they mad?
|
|
|
|
|
>> 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.
MVP 2010 - are they mad?
|
|
|
|
|
Hi Members
How i get Screen capture?I am using dialog based application i want to get Screen capture and save into .dat format.
Please help me
|
|
|
|
|
See Barry's Screen Capture[^]
I used the CodeProject "search" feature to arrive on that result.
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Member 6864839 wrote:
How i get Screen capture?
See here for an idea.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
thanks both of you for reply.I use this code
HDC m_hdcMem,hdc;
HBITMAP m_Bitmap,m_OldBitmap,hMainBmp ;
int x=800;
int y=600;
hdc=GetDesktopWindow()->GetDC()->m_hDC;
m_hdcMem= CreateCompatibleDC(hdc);
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);
CImage m_Image;
m_Image.Attach(hMainBmp);
m_Image.Save("C:\\image.bmp");
m_Image.Detach();
DeleteDC(m_hdcMem);
DeleteObject(hMainBmp );
DeleteObject(m_OldBitmap);
It's working for me.
Now i want to save file in format of .DAT.
Please help me
|
|
|
|
|
Member 6864839 wrote: Now i want to save file in format of .DAT.
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".
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
ok i use this code but file not save in my disk.
m_Image.Save("C:\\image.dat");
|
|
|
|
|
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:
m_Image.Save("c:\\image.dat",ImageFormatBMP);
“Follow your bliss.” – Joseph Campbell
|
|
|
|
|
Thanks it's working.
Thanks once again...........
|
|
|
|