Click here to Skip to main content
15,900,906 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Registering ActiveX programmatically Pin
«_Superman_»1-Feb-09 0:49
professional«_Superman_»1-Feb-09 0:49 
AnswerRe: Registering ActiveX programmatically Pin
CPallini1-Feb-09 1:14
mveCPallini1-Feb-09 1:14 
AnswerRe: Registering ActiveX programmatically Pin
Stephen Hewitt1-Feb-09 2:10
Stephen Hewitt1-Feb-09 2:10 
QuestionDynamic Text on Bitmap Button Pin
Super Hornet31-Jan-09 16:09
Super Hornet31-Jan-09 16:09 
AnswerRe: Dynamic Text on Bitmap Button Pin
Code-o-mat1-Feb-09 0:07
Code-o-mat1-Feb-09 0:07 
GeneralRe: Dynamic Text on Bitmap Button Pin
Super Hornet1-Feb-09 3:53
Super Hornet1-Feb-09 3:53 
QuestionEditWordBreakProc questions Pin
ForNow31-Jan-09 13:50
ForNow31-Jan-09 13:50 
QuestionC++ Play avi file using mciSendString Pin
czk10131-Jan-09 12:12
czk10131-Jan-09 12:12 
Hi all,

I'm trying to write a c++ program that opens and plays a .avi file. I've managed to open it and play it, but I cant get the video to display - I know it's playing as I can hear the sound.

What do I need to do get the video to display? If I need to create my own window can you please post some code to help me with this, as I've been trying to do this but havent managed with success yet. If not, is there a way i can get it to open in windows media player or something?

Below is my code - thanks in advance

czk

#include <iostream>
#include <windows.h>
#include <mmsystem.h>	// Include Media Control Interface library
#include <conio.h>
#pragma comment(lib, "winmm.lib") // Link winmm.lib into the program

using namespace std;

int main()
{
	MCIERROR err;

	cout <<"Open video"<<endl;
	err = mciSendString(L"Open C:\\video.avi type AVIVideo Alias Video", NULL,0,NULL);
		if(err !=0 )
	{
		cout <<"Error";
	}

	cout <<"Play"<<endl;
	err = mciSendString(L"Play C:\\video.avi wait",NULL,0,NULL); 
	if(err !=0 )
	{
		cout <<"Error";
	}
	
	cout <<"Close"<<endl;
	mciSendString(L"Close C:\\video.avi",NULL,0,0);

	return 0;
}</conio.h></mmsystem.h></windows.h></iostream>

AnswerRe: C++ Play avi file using mciSendString Pin
aks.1-Feb-09 20:47
aks.1-Feb-09 20:47 
GeneralRe: C++ Play avi file using mciSendString Pin
czk1019-Feb-09 1:28
czk1019-Feb-09 1:28 
QuestionHow to include a software into hardware Pin
Horizzzon31-Jan-09 10:20
Horizzzon31-Jan-09 10:20 
QuestionHow to set the scroll posistion to bottom or middle etc. Pin
simon alec smith31-Jan-09 10:02
simon alec smith31-Jan-09 10:02 
AnswerRe: How to set the scroll posistion to bottom or middle etc. Pin
«_Superman_»31-Jan-09 14:50
professional«_Superman_»31-Jan-09 14:50 
GeneralRe: How to set the scroll posistion to bottom or middle etc. Pin
simon alec smith1-Feb-09 1:41
simon alec smith1-Feb-09 1:41 
Questionpdf maker coding in c++ for ebook device Pin
Horizzzon31-Jan-09 9:16
Horizzzon31-Jan-09 9:16 
AnswerRe: pdf maker coding in c++ for ebook device Pin
Code-o-mat31-Jan-09 9:57
Code-o-mat31-Jan-09 9:57 
AnswerRe: pdf maker coding in c++ for ebook device Pin
Rajesh R Subramanian31-Jan-09 17:51
professionalRajesh R Subramanian31-Jan-09 17:51 
Questionhow to manage multi data input. Pin
Max++31-Jan-09 6:04
Max++31-Jan-09 6:04 
AnswerRe: how to manage multi data input. Pin
«_Superman_»31-Jan-09 14:54
professional«_Superman_»31-Jan-09 14:54 
GeneralRe: how to manage multi data input. Pin
Max++31-Jan-09 15:24
Max++31-Jan-09 15:24 
GeneralRe: how to manage multi data input. Pin
«_Superman_»31-Jan-09 15:26
professional«_Superman_»31-Jan-09 15:26 
GeneralRe: how to manage multi data input. Pin
Max++31-Jan-09 15:48
Max++31-Jan-09 15:48 
Questionprint preview problem Pin
Rajesh Katalkar31-Jan-09 5:23
Rajesh Katalkar31-Jan-09 5:23 
QuestionHow to Set the environment using CreateProcess Pin
vipin_nvk31-Jan-09 5:02
vipin_nvk31-Jan-09 5:02 
AnswerRe: How to Set the environment using CreateProcess Pin
«_Superman_»31-Jan-09 15:04
professional«_Superman_»31-Jan-09 15:04 

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.