SHARE
TWEET

Untitled

pabloducato Jan 9th, 2018 67 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. CSOAnimacjaCtrl::CSOAnimacjaCtrl()
  2. {
  3.     InitializeIIDs(&IID_DSOAnimacja, &IID_DSOAnimacjaEvents);
  4.     m_fileName="C:\\Documents and Settings\\stud\\Pulpit\\cos\\so_5\\Avi\\kula.avi";
  5.     m_pMyAnimateCtrl = NULL;
  6. }
  7.  
  8.  
  9. /////////////////////////////////////////////////////////////////
  10.  
  11.  
  12. int CSOAnimacjaCtrl::OnCreate(LPCREATESTRUCT lpCreateStruct)
  13. {
  14.     if (COleControl::OnCreate(lpCreateStruct) == -1)
  15.         return -1;
  16.  
  17.     m_pMyAnimateCtrl = new CAnimateCtrl;
  18.     CRect wndSize;
  19.     this->GetClientRect(&wndSize);
  20.     #define ID_SOANIMCTRL 1001
  21.     UINT styles = WS_CHILD | ACS_TRANSPARENT | ACS_AUTOPLAY | ACS_CENTER;
  22.     m_pMyAnimateCtrl->Create(styles, wndSize, this,ID_SOANIMCTRL);
  23.     m_pMyAnimateCtrl->ShowWindow(SW_SHOW);
  24.     m_pMyAnimateCtrl->Open("C:\\Documents and Settings\\stud\\Pulpit\\cos\\so_5\\Avi\\kula.avi");
  25.  
  26.     return 0;
  27. }
  28.  
  29. //////////////////////////////////////////////////////////////
  30.  
  31.  
  32. BSTR CSOAnimacjaCtrl::GetFileName(void)
  33. {
  34.     AFX_MANAGE_STATE(AfxGetStaticModuleState());
  35.  
  36.     CString strResult;
  37.     m_fileName=strResult;
  38.  
  39.     return strResult.AllocSysString();
  40. }
  41. ////////////////////////////////////////////////////////////////////
  42.  
  43. void CSOAnimacjaCtrl::SetFileName(LPCTSTR newVal)
  44. {
  45.     AFX_MANAGE_STATE(AfxGetStaticModuleState());
  46.  
  47.     m_fileName=newVal;
  48.     m_pMyAnimateCtrl->Open(m_fileName);
  49.  
  50.     SetModifiedFlag();
  51. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top