|
If you've never developed a DirectShow filter, then I highly recommend using the handy base
classes provided in the SDK. Actually, I can't imagine how much code it takes to write one
without using these classes.
The process is detailed here: Writing Transform Filters[^]
In step 1, you'll probably want CTransInPlaceFilter or CVideoTransformFilter derived code
in your filter.
The "Grabber Filter Sample" sample application in the SDK is a good reference (and possibly a
starting point) if you need hints on accessing the video frames as they go by in the graph.
The overlay part is the "easy" part. If you have a video frame, you can use GDI/GDI+ to
draw the overlay on the video frame.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
i have to create msi files in visualstudio 2005. how to avoid the minimize button in the setup
|
|
|
|
|
Trying to change a field from a TextBox to a DropDown Combo Box. I've entered the strings for my Items list. I think I should be storing a short in my data file as the index which points to the corresponding string in the list. Is this right approach? Also how do I display the correct string from the retrieved record? I'm new to C++.
Thanking you in advance for your help and time.
|
|
|
|
|
Jerry Burns wrote: I'm new to C++.
Which version?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
I'm beginning to learn the Professional version of Visual Studio .NET 2003.
Thanking you in advance for your help and time.
|
|
|
|
|
Ok, so what is it about a combobox that is troubling you?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
In my form I have a ComboBox named Title. Apparently I have it set up ok in the form becaue I can see and change the values which I have entered in the Items list.
I haven't entered any values for properties Data Source, Display Member or Value Member. Do any of these properties need a value. If so can you explain?
When I created my data file I set the index for the title field to -1 for all records. I believe this initializes the field to empty. My understanding is that index values of 0 to n map to the strings in my items list. Is that correct?
In the Random Access Record I have set up a field name "title" as a short to hold the index value.
I have button to advance through the file. The only thing that displays ind the title Combo Box is -1. I can't figure out what to do to display the associated string and not the index value itself.
Also if I make a change to another item in the list and then save the reocrd the string is replaced with a 5 digit number.
Can you help me out?
Thanking you in advance for your help and time.
|
|
|
|
|
Jerry Burns wrote: Can you help me out?
Sadly, I cannot. My compiler of choice is VS6.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi,
I have a list of UI threads that need to be close and clean up properly when user click "Exit" in the main GUI. How to do it?
Here's what i've tried:
CFrameWnd::OnClose()
{
for (i=0;i < my_number_of_thread; i++)
{
pThead[i]->EndThreadSafely();
}
ClearThreadList();
}
But my application crash in the end, debugging show an error at the AfxEndThread() that I call at the end of CMyThread::EndThreadSafely()
|
|
|
|
|
You end UI-threads by posting a WM_QUIT message to the thread.
After you've posted the message you may wait for the thread to terminate by waiting on thread handle with e.g. ::WaitForSingleObject() in your main thread.
Avoid AfxEndThread() , simply let the thread exit from it's controlling function which is the message pump in the UI-thread case.
For more info read here[^] and here[^].
"It's supposed to be hard, otherwise anybody could do it!" - selfquote "High speed never compensates for wrong direction!" - unknown
|
|
|
|
|
set CWinThread::m_bAutoDelete member to true!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
how i can provide keyboard shortcuts for emoticons in a chat program
|
|
|
|
|
Can you explain your requirement providing some more details?
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
I would use a user-configurable toolbar that displayed the emoticon image (with text in a tooltip). You could associate a shortcut to each button, just like other toolbars, and hide/show the toolbar.
Best wishes,
Hans
|
|
|
|
|
hai,
i am using a menu to display emoticons & i want to assign shortcut keys justlike this
%;for each face
Thanks in Advance
Jannath
|
|
|
|
|
Use accelerator table - same as for menu and toolbar.
Best wishes,
Hans
|
|
|
|
|
Dear All,
I'm designing a tool which can open a document and print out that document to default printer.
My tool can only print out text file, I want it can be integrate other document files.
Can you tell me how to do so, and where can I refer to?
I'm using Visual Studio V6.0 and Program language C/C++, MFC
|
|
|
|
|
KienNT78 wrote: I'm designing a tool which can open a document
Are you talking about a Word document? If so, this is a proprietary format, and the only way to print it is by using Word automation.
If the choice of document format is up to you, then you could use rich-text format (RTF) documents, and use the CRichEditCtrl control.
Best wishes,
Hans
|
|
|
|
|
|
Why the operator overloading function is normally a non-member with friend access?
Why its not a member fuction itself?
KIRAN PINJARLA
|
|
|
|
|
Overloading an operator as a nonmember gives you automatic type conversion on all arguments.
But when you overload a binary operator as a member, the two arguments are no longer symmetric - automatic type conversion applies to the second arg only.
The drawback to using nonmember overloading is that it may be less efficient - member overloading allows you to bypass get/set functions and directly access class data members.
Most texts will have examples.
Best wishes,
Hans
|
|
|
|
|
Thank you so much for your reply.
Hans Dietrich wrote: the two arguments are no longer symmetric - automatic type conversion applies to the second arg only.
I request you to explain what exactly these lines mean? If possible with code.
Thank you.
KIRAN PINJARLA
|
|
|
|
|
Consider a class for Complex numbers, which has an addition operator defined as a member:
class Complex
{
public:
Complex(double re, double im = 0);
Complex operator+(const Complex& rhs);
private:
double re, im;
};
We would like to be able to write code like this:
Complex c1(1,1);
Complex c2 = c1 + 4.5;
Complex c3 = 10 + c1;
The first statement simply constructs the complex number c1 = 1 + 1i. The complex number c2 is obtained by adding 4.5 to c1. Writing the assignment in functional form yields:
c2.operator= ( c1.operator+ ( 4.5 ) ); The addition operator takes a Complex argument. So how does this work when a real number, 4.5, is passed as the argument to operator+? It turns out that the compiler uses the constructor to implicitly convert 4.5 into a Complex by creating a temporary variable in order to perform the addition:
Complex c1 (1,1);
{
Complex t1 (4.5);
Complex c2 = c1 + t1;
}
The braces are used to show the scope of the temporary t1 which only exists for the duration of the addition. In functional form this can be written:
c2.operator= ( c1.operator+ ( t1 ) );
Next consider the assignment of c3. In functional form, the statement is written:
c3.operator= ((10.0).operator+ ( c1 ));
In order for this to work, 10.0 must be converted to a Complex. However, the compiler will not implicitly convert the left operand to call a member function on it.
If the addition operator is implemented as a non-member:
Complex operator+ (const Complex& a,
const Complex& b);
the compiler will implicitly convert both arguments as needed so that the assignment of c3 will compile. The operator may or may not be a friend depending on how it is implemented.
Implicit conversions are also used for conversion of initializers, function arguments, function return values, expression operands, expressions controlling iteration and selection statements, and explicit type conversions.
Implicit conversions (for left operands) will be performed implicitly by the compiler when the operator is a non-member. If type conversions are undesirable, the operator should be implemented as a member function. Most binary operators, such as addition, should be implemented as non-members since implicit type conversions are desired.
For more details, please consult C++ reference book.
Best wishes,
Hans
|
|
|
|
|
I am very very thankful to you.
Wish you all the best.
KIRAN PINJARLA
|
|
|
|
|
Hi!
I need a Dissasembler source code, example or article
please help me
Zo.Naderi-Iran
|
|
|
|