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 :
m_hWnd = CreateWindowEx(0, "VIDEO_WND", "Vidéo", WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
NULL, NULL, m_hInst, this);
while the layered window is created this way :
(m_hWnd is the main video window)
RECT rPos;
GetWindowRect(m_hWnd,&rPos);
int nLX = rPos.right-rPos.left;
int nLY = rPos.bottom-rPos.top;
m_hwndLayer = CreateWindowEx(WS_EX_LAYERED | WS_EX_TRANSPARENT, "LAYER", "LayerHabillage", WS_OVERLAPPED | WS_VISIBLE, rPos.left, rPos.top, nLX, nLY, m_hWnd, 0, m_hInst, 0);
Any idea would be very appreciated.
Thanks in advance.