|
Hi, i can capture frames with directshow but just with ICaptureGraphBuilder2 Interface so i capture an avi file,
i want to capture frames in my file (not avi), help please
thanks
Thanks
|
|
|
|
|
Use the SampleGrabber filter. I prefer the one that comes with the SDK since the source code is provided.
|
|
|
|
|
I split the window into 3 view.
some buttons in first view by clicking these buttons second view changed.
In the second view some buttons there by clciking these third view is changing
i attached the pictures to these button. in OnIntialUpdate() funtion . if i replace SOme X view with Y View, and again i repalcing Y with X view. the pictures are not showing..........
how i always get pictures to these buttons?
delete
|
|
|
|
|
kiranin wrote: if i replace SOme X view with Y View, and again i repalcing Y with X view. the pictures are not showing..........
Do you mean switch between views, is it?
Can you show some code?
|
|
|
|
|
Hi out there,
I use ShellExecute() to open a file with the default extension. Works well for Word-Documents, Excel, Powerpoint, PDF, JPG and so on.
My program calls ShellExecute() so that the user can read the or work on the file. When finished, the file should be closed or minimized again and my program is visible again. Works well.
Now I created a MessageBox() right after ShellExecute() whee I want the user to click Yes or No (I want to know if the file was of any Help for my user). Now something strange happens:
I call ShellExecute(), a PDF is started, my Messagebox appears and the PDF is displayed. I close my PDF and see my messagebox. Works well
On the other hand:
I call ShellExecute(), a Word-document is started, my messagebox appears, the word-document is brought in the background an my application with the messagebox is displayed as top-window. So my user is asked, if the document was of any help, but the document is in the background, behind my application. The user has to bring it in the foreground. The same happens for Excel-documents.
Is there any way to tell either Office to stay in the foreground or to tell my programm to remain behind the currently started shell-object?
thanks in advance
Juergen
|
|
|
|
|
I think that the "pdf" behaviour is sort of on exception and the "office" behaviour is the rule.
What you can do is rearrange the windows in the Z-Order and make your application second from the top before firing the message box (however, this seems to be what you already do).
Another solution would be to make a non modal message box, in which case it must be possible to activate it without having your application directly in the background.
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
Hm, I also thought of a nonmodal dialog.
But I have to wait in my application for the end of a nonmodal dialog.
So, I have to do the following:
ShellExecute()
Create Dialog
Show Dialog without activating it (how can I do this??)
Wait for End of Dialog (how can I do this?)
Continue with my program based on the results of my nonmodal dialog
I haven't done a lot with nonmodal dialogs, but I will learn...
Juergen
|
|
|
|
|
e-DJ wrote: ShellExecute()
Create Dialog
Show Dialog without activating it (how can I do this??)
Wait for End of Dialog (how can I do this?)
Create Dialog:
CMyDialog md;
Show Dialog without activating it : there is an option in the resource editor to start a dialog unvisible.
Wait for End of Dialog : Post a custom message when the dialog is destroyed to your main application. In the main application, simply wait for the message.
PS: David's remark is good, but I think this is what you already started to do.
PS2: Ein Juergen in USA ? Bist du wirklich ein Ami ?
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
I managed to display my dialog as modeless. But How can I wat in my Application for a posted message?
Background:
I have a listctrl. This list displays a lot of filenames. The user makes a dblclick and the file is opened. I then add an entry in my database, that the user has started this file and ask, if it was useful for him. Then I add another entry in my database.
Right now, my algorithm looks like this:
OnDblClick:
Get klicked filename
ShellExecute
Display MessageBox
When it was of use, add entry in database
increment hitcounter in database
It is my own ListCtrl derived from CListCtrl. I was not able to call a dialogbox of my application from inside my ListCtrl (which makes sense, because my ListCtrl does not know about my application). So I initialised my modeless dialog in my application and pass a pointer to this dialog to my ListCtrl. However, my ListCtrl only accepts CDialog as pointer, therefore I can not access members of my modeless dialog.
So after doing a ShellExecute, I just show my previously created modeless dialog and have to wait in my DblClick-handler for the end of my modeless dialog. Sound difficult. Otherwise I have to completely reconstruct my ListCtrl.
Juergen
PS. Ich bin nicht aus Amerika, sondern lebe in Deutschland. Wie kommst Du darauf, ich wär Ami?
|
|
|
|
|
Don't display the message box until after the program that ShellExecuteEx() spawned has finished. It makes no sense to ask if the file was of any help if the message box comes up first.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I want to write a program in Visual C++ to transfer data between a computers and microcontroller via 10/100 Ethernet RJ-45.
What i need (libraries, or is there any help in MSDN.)
What i figured out is that i need "winsock" for programming.(TCP client and TCP Server)
Where should I start.
thanks
|
|
|
|
|
|
How about here[^] and related articles.
By the way, posting to multiple forums isn't necessarily a good idea...
Steve S
Developer for hire
|
|
|
|
|
In my application I hook Windows registry query's and read direct them to a file. I use the following code:
<br />
LONG __stdcall Mine_RegQueryValueExA(<br />
HKEY hKey,<br />
LPCTSTR lpValueName,<br />
LPDWORD lpReserved,<br />
LPDWORD lpType,<br />
LPBYTE lpData,<br />
LPDWORD lpcbData<br />
)<br />
<br />
{<br />
char * filename = "\\testapp.ini"; <br />
char buffer[_MAX_PATH];<br />
_getcwd(buffer, _MAX_PATH); <br />
strcat(buffer, filename);<br />
LPTSTR lpReturnedString = "";<br />
unsigned int nSize = MAX_PATH;<br />
GetPrivateProfileStringA("Section" , lpValueName, "\255", lpReturnedString, nSize, buffer);<br />
lpData = reinterpret_cast <LPBYTE> (lpReturnedString);<br />
LONG rv = ERROR_SUCCESS;<br />
return rv;<br />
<br />
<br />
__try {<br />
rv = Real_RegQueryValueExA (hKey,lpValueName,lpReserved,lpType,lpData,lpcbData);<br />
} __finally {};<br />
<br />
return rv<br />
}<br />
Now in a number of cases I get an error the the GetPrivateProfileString line along he lines of 'The memory could not be "written"'. Can anyone see what is causing this error as I really have no idea.
Thanks
|
|
|
|
|
nSize is set to MAX_PATH whereas buffer is of size _MAXPATH. Do these match ?
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
stevelam wrote: LPTSTR lpReturnedString = "";
unsigned int nSize = MAX_PATH;
GetPrivateProfileStringA("Section" , lpValueName, "\255", lpReturnedString, nSize, buffer);
watch fourth parameter, it should be like this
char ReturnedString [ MAX_PATH + 1 ] ;
unsigned int nSize = MAX_PATH+1;
GetPrivateProfileStringA("Section" , lpValueName, "\255", ReturnedString , nSize, buffer);
|
|
|
|
|
|
stevelam wrote: LPTSTR lpReturnedString = "";
unsigned int nSize = MAX_PATH;
GetPrivateProfileStringA("Section" , lpValueName, "\255", lpReturnedString, nSize, buffer);
lpReturnedString is a static string of size 1 (end of string character only). If you try to copy something in it, you will write outside the boundary of the allocated memory and thus overwriting memory you cannot write to.
Use a fixed size array instead ans pass its maximum capacity in the nSize paramter of the function.
|
|
|
|
|
I was given an application that calls a driver which also calls interrupts at H/W level in order to update that BIOS of a ceratin laptop. However, I was asked to develop the application in such a way that I won't have to install the driver any more just to activate the interrupts for the BIOS update. Is it possible to do so and if yes, how can I proceed. The application by the way was made in Visual C++ ver. 6.0 so I assume that this is the right section for my query. Thanks a lot.
|
|
|
|
|
User mode code cannot directly control the hardware. You need the device driver to be able to do this.
|
|
|
|
|
Thank you for the reply. However, I think I was not able to clarify my question. What I meant with the skipping of the device driver is the avoidance of installing the driver manually. As such, I was thinking
of dynamic loading of drivers but I have no idea about this and if this is applicable for all types of drivers. Thanks again.
|
|
|
|
|
Hi all,
I would like to know, if someone knows how to get the physical address of an IP address for example(This is just an example):
192.168.0.100 -> www.sitename.com
I would like to resolve to IP address.
Many Thanx
Regards
Programm3r
|
|
|
|
|
Programm3r wrote: resolve to IP address
gethostbyname()
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Thanx....
Regards
Programm3r
|
|
|
|
|
hello,friends.can you give some codes about content-based audio retrieval or ActiveX control modules,thank you a lot.
|
|
|
|