flickering display on zooming
hi
i have developed a directshow based ocx control to play mpg files. the click event of the ocx will zoom the video on the window. But now i am experiencing one problem. In some machines, while i am performing the zooming operation, there is a white horizontal bar displayed on the video window for a while. could anybody suggest a solution for avoiding this.
thanks
shemna
# 1 Re: flickering display on zooming
Your control might be doing background painting hence you see the flickering. Customize your control and do not do any background painting in the background painting handler. Mind you that the default handler of the background painting paints the background.
The message is WM_ERASEBACKGROUND.
If you are using MFC, then override the OnBkgroundErase method. Do nothing in it and return TRUE;
This might work but I am not sure.
You can also reduce flickering by using Memory DC's. But I am not sure if it applies to your case or not.
# 2 Re: flickering display on zooming
Your control might be doing background painting hence you see the flickering. Customize your control and do not do any background painting in the background painting handler. Mind you that the default handler of the background painting paints the background.
The message is WM_ERASEBACKGROUND.
If you are using MFC, then override the OnBkgroundErase method. Do nothing in it and return TRUE;
This might work but I am not sure.
You can also reduce flickering by using Memory DC's. But I am not sure if it applies to your case or not.
Thanks for ur reply.
but i tried that method. i ddin't get solved my problem.
any other method is there?
# 3 Re: flickering display on zooming
hi
i have developed a directshow based ocx control to play mpg files. the click event of the ocx will zoom the video on the window. But now i am experiencing one problem. In some machines, while i am performing the zooming operation, there is a white horizontal bar displayed on the video window for a while. could anybody suggest a solution for avoiding this.
thanks
shemna
I got the above problem when i developed the code under vc8 and platform SDK. when i used VC7 and directx SDK , i didn't get the problem. Anybody can help me now?
thanks
shemna
# 4 Re: flickering display on zooming
How about calling InvalidateRect() ? and its works well when it is smaller rectangle .. !!
WM_ERASEBKGND should work , and it should return TRUE,
or u can give InvalidateRect(), and give FALSE as the second parameter.
# 5 Re: flickering display on zooming
How about calling InvalidateRect() ? and its works well when it is smaller rectangle .. !!
WM_ERASEBKGND should work , and it should return TRUE,
or u can give InvalidateRect(), and give FALSE as the second parameter.
i don't think it as the problem from my code. i tried the ERASEBKGND. but no change was there.
it may be due to not adding some lib related to vc8. otherwise i may not be able to produce the problem under vc8.
i tried the code unde under vc7+directxSDK, then no probs
i tried under VC8+ platformSDK, then there is problem
also i tried under VC8+ Directx SDK, then also there is problem.
so i concluded that it is related with some lib.
# 6 Re: flickering display on zooming
i don't think it as the problem from my code. i tried the ERASEBKGND. but no change was there.it may be due to not adding some lib related to vc8. otherwise i may not be able to produce the problem under vc8.i tried the code unde under vc7+directx SDK, then no probs
i tried under VC8+ platformSDK, then there is problem also i tried under VC8+ Directx SDK, then also there is problem. so i concluded that it is related with some lib.
:confused: Oops .. may be . :rolleyes: .. no idea :confused:
# 7 Re: flickering display on zooming
hi friends,
the problem didn't get solved till now. I have already said that the problem is shown by some machines. now i got one more thing. all machines, having video memory other than 64Mb, shows this problem. Could anybody help me now!!!!!!!!
thanks
shemna