Click here to Skip to main content
12,951,034 members (50,825 online)
Rate this:
Please Sign up or sign in to vote.
Hi all,
I developped an application that is supposed to play a video in a dedicated window by using DirectShow, while a layered window allows for displaying of a png bitmap over the video, using GDI+.
All this works fine and smoothly with windows 7, but under XP I get flickering of the layered bitmap and video is choppy.

I am considering 4 possible issues :
- The CPU, which is an i7 1,7Ghz for the Windows 7 machine but a 2Ghz Dual Core for the XP machine
- Areo stuff that would manage layered windows smootly in Windows 7
- The graphic device that would need some specific hardware capabilities (both machines are using the embedded chipset)
- Something in my code that is not fully compliant with XP but would work with 7 for some reason.

Note that the main video window is created as following :

NULL, NULL, m_hInst, this);

while the layered window is created this way :
(m_hWnd is the main video window)

RECT rPos;
int nLX = rPos.right-rPos.left;
int nLY =;
m_hwndLayer = CreateWindowEx(WS_EX_LAYERED | WS_EX_TRANSPARENT, "LAYER", "LayerHabillage", WS_OVERLAPPED | WS_VISIBLE, rPos.left,, nLX, nLY, m_hWnd, 0, m_hInst, 0);

Any idea would be very appreciated.
Thanks in advance.
Posted 16-Feb-12 6:38am
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

You could use DirectShow Video Mixing Renderer (VMR9) for overlay.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Thanks for the advice.
Actually, that was the solution I tried first (and it actually works), but as I also deal with still images, and as VMR9 brings other issues with still images, I did not want to manage both cases and have a unique solution.
At the end, maybe I'll have to manage both.

In fact, did someone already succeed in overlaying a bitmap with layered windows over DShow video with XP ?
doscho 6-Mar-13 23:08pm
whether solved and how to solve.
There is a discription above the question in msdn of ms.
mOOmOOn_ 7-Mar-13 3:39am
Thanks for the info.
In MSDN, I could find some info related to hardware acceleration with XP, but no real solution. Did you actually find a link where the solution is described ?

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 6,084
CHill60 3,480
Maciej Los 3,083
Jochen Arndt 1,975
ppolymorphe 1,830

Advertise | Privacy | Mobile
Web02 | 2.8.170525.1 | Last Updated 16 Feb 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