Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CSOAnimacjaCtrl::CSOAnimacjaCtrl()
- {
- InitializeIIDs(&IID_DSOAnimacja, &IID_DSOAnimacjaEvents);
- m_fileName="C:\\Documents and Settings\\stud\\Pulpit\\cos\\so_5\\Avi\\kula.avi";
- m_pMyAnimateCtrl = NULL;
- }
- /////////////////////////////////////////////////////////////////
- int CSOAnimacjaCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct)
- {
- if (COleControl::OnCreate(lpCreateStruct) == -1)
- return -1;
- m_pMyAnimateCtrl = new CAnimateCtrl;
- CRect wndSize;
- this->GetClientRect(&wndSize);
- #define ID_SOANIMCTRL 1001
- UINT styles = WS_CHILD | ACS_TRANSPARENT | ACS_AUTOPLAY | ACS_CENTER;
- m_pMyAnimateCtrl->Create(styles, wndSize, this,ID_SOANIMCTRL);
- m_pMyAnimateCtrl->ShowWindow(SW_SHOW);
- m_pMyAnimateCtrl->Open("C:\\Documents and Settings\\stud\\Pulpit\\cos\\so_5\\Avi\\kula.avi");
- return 0;
- }
- //////////////////////////////////////////////////////////////
- BSTR CSOAnimacjaCtrl::GetFileName(void)
- {
- AFX_MANAGE_STATE(AfxGetStaticModuleState());
- CString strResult;
- m_fileName=strResult;
- return strResult.AllocSysString();
- }
- ////////////////////////////////////////////////////////////////////
- void CSOAnimacjaCtrl::SetFileName(LPCTSTR newVal)
- {
- AFX_MANAGE_STATE(AfxGetStaticModuleState());
- m_fileName=newVal;
- m_pMyAnimateCtrl->Open(m_fileName);
- SetModifiedFlag();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement