|
Does anyone know how to get the first frame of an compressed AVI?
Using the AVI-APIs the AVIStreamGetFrameOpen is returning a NULL when the video stream is compressed. Works fine for non compressed videos.
I also tried the suggestion from Jung Jinhyuck ( http://www.codeproject.com/audio/avitowmv.asp ) which looked very promising.
Looks like the decompression is not done, but the same compressed AVI can be viewed with the Media player on the same machine. Thought the AVI-API could access the same decompressors.
(Using WinXP and VC .NET)
Thanks
Jürgen
|
|
|
|
|
Use DirectShow, which is probably total overkill for one frame.
You can make sure that the correct decompressors are in the graph using GraphEdit, I think an older version of DirectX (7 or 8?) may have even had a sample program for grabbing a single frame.
|
|
|
|
|
Thanks for your suggestion.
I just wanted to give the icons in my listview a small preview of the AVI files from my camera
Wouldn't introducing DirectShow to an app make a dependency on the DirectShow components installed on the system?
For example I use the latest version of DirectShow but the system has an older version installed?
Thanks
Jürgen
|
|
|
|
|
Dear Everybody,
I am facing problem putting a trasperent Bitmap(i. a logo) on running video screen. I am using Win 32 API.
I will put the problem in detail. The bitmap is a logo and has 2 colors white over black background. I need to show only the white part of the .bmp on the video widow and the black portion of the bitmap should show the background video.
Does anybody have a solution... Please reply soon.
Regards,
Abhi
|
|
|
|
|
I can only sujest you look at using regions: SetWindowRgn(). You might try seaching codeproject for the article on using regions with vector graphics: it shows how to place a region around a vector graphics image so that the image it self is the window.
Trust in the code Luke. Yea right!
|
|
|
|
|
i created a win32 api app (no MFC) and it has a dialog
how do i add an activex control on the dialog
(i tried adding it thru the dialog editor but the app didn't start up correctly, cuz i probably didn't do any code for the control)
someone please enlighten me
Roman Nurik
|
|
|
|
|
AX control hosting is quite complex. Your dialog isn't appearing because when you use the VC resource editor, it puts a placeholder into the dialog template, not the actual control. Both MFC and ATL recognize the placeholders and insert their own control hosting code to manage the control.
You app would have to do something similar. The easiest route would be to use ATL for that dialog and let it handle the hosting duties.
--Mike--
Latest blog entry: *drool* (Alyson) [May 10]
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"You have Erica on the brain" - Jon Sagara to me
|
|
|
|
|
oh... in that case:
1) how can i add ATL to my dialog, without really complicating a pretty small utility
2) can i play an MP3 using something other than Windows Media Player ActiveX (that is the control i need... to play an MP3)
Roman Nurik
|
|
|
|
|
In your stdafx.h (or whatever your main header file is) remove the include of windows.h, and instead put:
#include <atlbase.h>
extern CComModule _Module;
#include <atlwin.h> In the CPP file that has WinMain() , declare the global _Module . Change WinMain() thus:
int WinMain ( HINSTANCE hinst, ... )
{
_Module.Init ( NULL, hinst );
.....
_Module.Term(); return msg.wParam;
}
--Mike--
Latest blog entry: *drool* (Alyson) [May 10]
Ericahist | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"You have Erica on the brain" - Jon Sagara to me
|
|
|
|
|
is there any one who know how i can add DIALOGBAR in one application,because i want to add it in my application in the long of the right of window and i will add in it some control as slider buton ......
|
|
|
|
|
Is it posible to put buttons or other controls in the view in a View-Document app? and how can I do it?
tks in advance..
Daniel Cespedes Daza
"Santa Cruz de la Sierra Paraiso Terrenal!"
daniel.cespedes@ieee.org
|
|
|
|
|
Definitely. One solution is to add the button as a member variable and call Create().
Kuphryn
|
|
|
|
|
When you use AppWizard to create your application, you could try setting the view base class to CFormView (on the last but one page of the wizard IIRC). This allows you to define your view using a dialog template.
If you have a CView derived view, then you'll have to create them dynamically.
|
|
|
|
|
Is there a native way (not through redefinition with UNION) to pass a pointer of an array by address to a function, so that the function can change the pointer and pass back the changed value?
|
|
|
|
|
Yeah. Like this:
void DoSomething( int ** p_ppiArray )
{
*p_ppiArray = new int[10];
}
void SomeOtherFunction()
{
int * a_piArray = NULL;
DoSomething( &a_piArray );
delete [] a_piArray;
}
Chris Richardson Terrain Software
|
|
|
|
|
Thanks Chris; it's working already.
I tried it with "double-ptr" in the form **array[], but that did not work.
|
|
|
|
|
Hi,
I use the commande : pDoc->OpenDocumentFile(NULL); (where pDoc is a pointeur of CMUltiDocumentTemplate) to open a new document of type CFrameView.
I'm using a tabctrl class for swicthing between multiple document in a mdi (CMDITabs from Christian Rodemeyer) and i'd like to have a top CFrameView on top even if a new document is open.
Is there a way to do this ?? Thank you very much
|
|
|
|
|
in VC 6.0, i use CHtmlView, but it can not load java swing (jdk 1.2 and above) controls.
how to solve the problem?
thx
includeh10
|
|
|
|
|
I am trying to track reams of data and am getting exhausted of opening
multiple files. Anyone have a quick method for opening somewhere on the order
of 100 files?
I suppose I could generate filenames, but how do I open them all without coding 100 separate instances of:
ofstream DataFile1;
DataFile1.open("Data1.txt", ios::out | ios::trunc);
if ( DataFile.fail() )
throw "This disk is full.\n";
|
|
|
|
|
Could you try
ofstream* df[100];
for (int i=0;i<100;i++)
{
string filename("data");
filename.append(itoa(i));
filename.append(".txt")
df[i]->open(filename,ios...
...
Chris Meech
"what makes CP different is the people and sense of community, things people will only discover if they join up and join in." Christian Graus Nov 14, 2002.
"Microsoft hasn't ever enforced its patents. Apparently they keep them for defensive reasons only. Or, they could be waiting 'til they have a critical mass of patents, enforce them all at once and win the game of Risk that they're playing with the world." Chris Sells Feb 18, 2003.
|
|
|
|
|
Is there a way to use MFC support in Win32 application? (especially Property Sheet class).
|
|
|
|
|
You are asking without adding MFC support to the application? Any win32 or ATL application you can add MFC by selecting the compiler option, adding afx.h to stdafx.h and then properly initializing MFC. Create a console application with MFC support to see what is needed.
John
|
|
|
|
|
How I can color my MessageBox in red, and Button in blue.
Thus I want to create my own MessageBox with my parameters.
Thanks.
Kostya
|
|
|
|
|
|
Is there any alternative to using GetDIBits for filling the lpvBits parameter of the function. It works fine for me on Windows XP and 2000 but the function always returns 0 on Windows 98. Are there a group of function I can use in a for loop (or something like that) to get everything pixel by pixel and store it into into a buffer?
|
|
|
|