mfc picture控件播发视频时切换其他实用程序后不能正确显示

mfc picture控件播放视频时切换其他实用程序后不能正确显示
CStatic *pStatic=(CStatic*)GetDlgItem(IDC_VIDEO);
CRect rect;
pStatic->GetWindowRect(&rect);
int xPos=rect.left;
int yPos=rect.top;
width=rect.Width();
heigth=rect.Height();
h=pStatic->GetSafeHwnd();
CString m_strEdivo1,m_strEdivo2;
// char buf[256];
m_strEdivo1.Format("open ""c:\\mpeg\\bbopening15.wmv"" Alias movie parent %u Style %u notify", h,WS_CHILD);
mciSendString(m_strEdivo1,buf,sizeof(buf),NULL);
m_strEdivo2.Format("put movie window at 0 0 %d %d",width,heigth);
mciSendString(m_strEdivo2,buf,sizeof(buf),NULL);

//播放多媒体文件
mciSendString("play movie repeat",buf,sizeof(buf),NULL);

以上代码正确,请各位大指点一下!谢谢!

------解决方案--------------------
好象是PICTURE控件没被刷新一样,不过感觉不应该这样.只看到这个控件的窗口句柄在m_strEdivo1这个变量里用过,也就是说通过m_strEdivo1这个变量把控件的作为播放窗口.你在WM_ACTIVITE和WM_SETFOCUS及WM_LEAVEFOCUS这几个消息函数里加上pStatic->Invalidate();试试,消息名称可能不准,但就是这几个消息。