very nice job!
ReplyI wish to use a small avi with transparent background in a status bar pane. Is it possible with this code?
ReplyOriginally posted by: Chris Brown
How would you convert such a program to non-MFC code? would it be quite the project?
ReplyOriginally posted by: BennyK
lpBi = (LPBITMAPINFOHEADER)AVIStreamGetFrame(m_pGF, (LONG)m_nCurrentFrame);
I discovered that the Seek function is setting the m_nCurrentFrame to one beyond the last frame in the video. If I replace this:
m_nCurrentFrame = __max(nTo, (UINT)m_lFrames);
with this:
m_nCurrentFrame = __min(nTo, (UINT)(m_lFrames - 1));
then it works.
I built a dialog app similar to the sample app. Everything was working great except for the Seek function, which I need. When I seek to a specific frame, it crashes in CAVICtrl::DrawCurrentFrame at:
_ASSERTE(lpBi);
Originally posted by: Marc
If I load an AVI inside a thread function AVIStreamOpenFromFile() fails... what should I do?
ReplyOriginally posted by: Marc
I am loading a 24 bits avi and no transparency... where should I modify it???
ReplyOriginally posted by: Steve
Can a true transparent animation control be written in assembly such as MASM32. I'm not familiar with C++ etc.
Thanks in advance.
Congratulations to the person who wrote that transparent animation. I know it's not easy.
ReplyOriginally posted by: ran
How to enlarge the AVI movie or how to full-screen it???
ReplyOriginally posted by: BlueDragon
void CAVCDemoDlg::OnSize(UINT nType, int cx, int cy)
Second change CAVICtrl::InitBackground() code
// calculate position of control in parent
// border moves window later, so we move it here too
rcParent = rcAVIWnd;
GetClientRect(rcParent);
First, don't call ReinitBackground from CAVCDemoDlg::OnWindowPosChanging (so we can delete this methode), but from an OnSize handler
{
m_AviCtrl.ReinitBackground();
CBitmapDialog::OnSize(nType, cx, cy);
}
from :
------
GetWindowRect(&rcAVIWnd);
if (GetExStyle() & (WS_EX_CLIENTEDGE|WS_EX_DLGMODALFRAME))
{
rcAVIWnd.OffsetRect(GetSystemMetrics(SM_CXEDGE),GetSystemMetrics(SM_CYEDGE));
}
else if(GetStyle() & WS_BORDER)
{
rcAVIWnd.OffsetRect(GetSystemMetrics(SM_CXBORDER), GetSystemMetrics(SM_CYBORDER));
}
pParentWnd->ScreenToClient(&rcParent);
to :
----
ClientToScreen(rcParent);
pParentWnd->ScreenToClient(&rcParent);
Enjoy :O)
Originally posted by: Binh Nguyen
I'd like to introduce a solution for this minor problem.
Add one line of code to
void CAVICtrl::InitBackground()
// get parents dc
// cleanup old dc & bmp if exist
// get parent image from behind control
It's not really fix the problem but improve it much.
Enjoy!
Very nice work!
{
............... Many lines of code
CClientDC dcParent(pParentWnd);
if (m_pbmpBkgOld)
{
m_dcBkg.SelectObject(m_pbmpBkgOld);
m_dcBkg.DeleteDC();
m_bmpBkg.DeleteObject();
pParentWnd->InvalidateRect(rcAVIWnd); //Add this
}
.........etc...
}
Nguyen Binh