Click here to Skip to main content
12,943,742 members (58,911 online)
Rate this:
Please Sign up or sign in to vote.
See more: , +
hi every one i made an app that creates a steam using directshow & c++ using win32 components .
i'm able to stop this stream and take picture at any moment it's fine .
the thing is that i need in some way to place a rectangle inside the window render and be able to move this rectangle & resize it
i'm avoiding to develop a filter because it won't give me this functionality
any idea
could directDraw help me in this task !!
Posted 28-Aug-12 6:27am
Joan Murt 28-Aug-12 15:18pm
It's a pity Jack, not to be able to vote comments. I would vote this one a double 5.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You keep rephrasing the question and getting valid answers.

This question is likely to get you similar answers.

What you're asking for is an advanced topic. There are no simple or easy answers.

If you don't want to use filters, you'll have to draw the rectangle on the surface after your other functions draw on the surface. How you do that is going to be dependent on the technologies you use and the way you structure your drawing code.

You're going to have to learn more about graphics programming to proceed further.

It's not a topic we can spoon feed you on.

Look for examples on the web that do similar things. Study the code. Look up documentation on any calls you don't understand. Read tutorials on those topics.

As you learn more, please come back with more specific technical questions.
merousoft 29-Aug-12 4:16am
oh thx for this info i just wanted some helping idea but ur answer were clear
Rate this: bad
Please Sign up or sign in to vote.

Solution 2


Drawing rectangle on a video can be done via few ways:
1. Implementing your own allocator presenter and do render video with your own drawing (Direct3D presenting EVR or VMR).
2. In application create callback via ISampleGrabber and draw image on incoming samples (mostly used GDI or GDI+)
3. Implementing own filter and perform drawing in there. Can be used any mechanism here but mostly will be fine with GDI+.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 4,643
CHill60 2,970
Maciej Los 2,348
Jochen Arndt 1,900
ppolymorphe 1,765

Advertise | Privacy | Mobile
Web02 | 2.8.170518.1 | Last Updated 19 Oct 2012
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100