Click here to Skip to main content
15,913,854 members
Home / Discussions / COM
   

COM

 
AnswerI think you should learn COM first. Pin
TomPeakz18-Apr-02 17:07
TomPeakz18-Apr-02 17:07 
GeneralRe: I think you should learn COM first. Pin
bryce21-Apr-02 14:54
bryce21-Apr-02 14:54 
AnswerRe: atl book? Pin
Paul M Watt18-Apr-02 17:39
mentorPaul M Watt18-Apr-02 17:39 
QuestionHow to add a new service to Outlook (2k/XP) just like Exchange ? Pin
TomPeakz16-Apr-02 20:34
TomPeakz16-Apr-02 20:34 
QuestionHow to use mspaint.exe as OLE server Pin
Rover16-Apr-02 15:34
Rover16-Apr-02 15:34 
QuestionIs there a way to have an ActiveX control (windowless) repaint itself within IE? Pin
Bart-Man16-Apr-02 10:51
Bart-Man16-Apr-02 10:51 
AnswerSolution to my problem Pin
Bart-Man17-Apr-02 9:49
Bart-Man17-Apr-02 9:49 
GeneralProblem: Not able to run ActiveMovie3 OCX in worker thread. Pin
15-Apr-02 23:02
suss15-Apr-02 23:02 
Problem: Not able to run ActiveMovie3 OCX in worker thread.

My code is As follows:

1) I have declared pointer variable for ActiveMovie3 as class level
2) I have created Activemovie3 instance in OnInitdialog()

Code:
OnInitDialog()
{
CWnd *desk=GetDesktopWindow();
CRect rect;
desk->GetWindowRect(&rect);
m_Mplayer=new CActiveMovie3;
m_Mplayer->Create("Mediaplayer",WS_CHILD,rect,this,2222);

CwinThread *movieThread=AfxBeginThread(Mediathread,m_MPlayer);

Return TRUE;

}

UINT Mediathread(LPVOID pvoid)
{
CActiveMovie3 *m_MPlayer1=(CActiveMovie3*)pvoid;
int i=0;
while(true)
{
if(i++%2==0)
{
m_MPlayer1->SetAutoStart(TRUE);
m_MPlayer1->SetFileName("E:\\Boys.avi");
}
else
{
m_MPlayer1->SetFileName("E:\\Boys.avi");
}

Sleep(120000);

if(i>5)
break;
}
return 0;
}

Same code is working fine with the timer.

My timer code is as follows:
OnTimer(UINT nIDEvent)
{
static int i=0;
if(i++%2==0)
{
m_MPlayer->SetAutoStart(TRUE);
m_MPlayer->SetFileName("E:\\Aa.mpa");
}
else
{
m_MPlayer->SetFileName("E:\\Boys.avi");
}

CDialog::OnTimer(nIDEvent);
}


GeneralRe: Problem: Not able to run ActiveMovie3 OCX in worker thread. Pin
Shurik200116-Apr-02 10:20
Shurik200116-Apr-02 10:20 
GeneralStatic Methods in COM?!?!??!?! Pin
15-Apr-02 4:43
suss15-Apr-02 4:43 
GeneralRe: Static Methods in COM?!?!??!?! Pin
Paul M Watt15-Apr-02 8:02
mentorPaul M Watt15-Apr-02 8:02 
GeneralRe: Static Methods in COM?!?!??!?! Pin
15-Apr-02 21:53
suss15-Apr-02 21:53 
GeneralExtracting a gif from Excel file Pin
Lilian Chan-Grant15-Apr-02 3:10
Lilian Chan-Grant15-Apr-02 3:10 
GeneralNew Subject Pin
14-Apr-02 21:51
suss14-Apr-02 21:51 
GeneralRe: New Subject Pin
Paul M Watt15-Apr-02 8:06
mentorPaul M Watt15-Apr-02 8:06 
GeneralRe: New Subject Pin
bryce21-Apr-02 14:56
bryce21-Apr-02 14:56 
GeneralNew Subject Pin
14-Apr-02 21:48
suss14-Apr-02 21:48 
GeneralNew Subject Pin
14-Apr-02 21:43
suss14-Apr-02 21:43 
GeneralRe: New Subject Pin
Amit Dey15-Apr-02 6:34
Amit Dey15-Apr-02 6:34 
GeneralNew Subject Pin
14-Apr-02 21:41
suss14-Apr-02 21:41 
GeneralRe: New Subject Pin
Mazdak14-Apr-02 22:31
Mazdak14-Apr-02 22:31 
GeneralRe: New Subject Pin
bryce21-Apr-02 14:59
bryce21-Apr-02 14:59 
GeneralTest Pin
14-Apr-02 21:36
suss14-Apr-02 21:36 
GeneralRe: Test Pin
bryce21-Apr-02 15:00
bryce21-Apr-02 15:00 
GeneralloadXML does not load PLEASE HELP! Pin
j_mehdi13-Apr-02 5:09
j_mehdi13-Apr-02 5:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.