|
You can't just copy the CRT DLLs over to a new machine anymore, that's why you're getting the "config is incorrect" error (which is a pretty crappy message, to be honest).
You'll need to run vcredist_86.exe on the other machine. This file is in %MSDEVDIR%\SDK\v2.0\BootStrapper\Packages\vcredist_x86\
|
|
|
|
|
hey it works, thanks mike
cheers
|
|
|
|
|
hi everyone,
I used the MCI controls to play the video files... I can able to play *.vob *.dat *.mpg files but the problem i was facing is that I am NOT able to play mpeg 2 files with m2p extensions .... Can anyone tell me whether MCI supports m2p format files?
Thanks in advance
With regards
Raja Bose
|
|
|
|
|
If you set lpstrDeviceType to
<br />
MCI_DGV_OPEN_PARMS mciOpen;<br />
mciOpen.lpstrDeviceType ="MPEGVIDEO2";
what happens?
|
|
|
|
|
First of all I like to thank you for replying for my message . I dont know where to use your code
MCI_DGV_OPEN_PARMS mciOpen;
mciOpen.lpstrDeviceType ="MPEGVIDEO2";
Can you help me with this...
I traced the application and found out that i am getting the error while calling this function MCIWndCreate(.....)
Code Sample ::::::::::::::::::::
HWND CSampleMCI::Initialize()
{
if((c_Player=MCIWndCreate(hwndParent,AfxGetInstanceHandle(),
WS_CHILD | WS_VISIBLE | MCIWNDF_NOTIFYALL | MCIWNDF_NOAUTOSIZEWINDOW
|MCIWNDF_NOAUTOSIZEMOVIE|MCIWNDF_NOTIFYERROR|MCIWNDF_SHOWALL
, m_sPath))==0)
MessageBox("Error in initialise");
MCIWndSetTimeFormat(c_Player,"ms");
MCIWndSetActiveTimer(c_Player,100);
lVolume=GetVolume();
return c_Player;
}
Thank you very much
Awaiting for your reply...
With regards
Raja Bose
|
|
|
|
|
Is this helpfuls
MCI_DGV_OPEN_PARMS mciOpen;<br />
mciOpen.dwCallback = 0L;<br />
mciOpen.wDeviceID = 0;<br />
mciOpen.dwStyle = WS_CHILD;<br />
mciOpen.hWndParent = m_hWnd;<br />
mciOpen.lpstrElementName = yourfile;<br />
mciOpen.lpstrDeviceType ="MPEGVIDEO2";<br />
mciOpen.lpstrAlias ="MPEGVIDEO2";<br />
<br />
mciSendCommand(0, MCI_OPEN,(DWORD)(MCI_OPEN_ELEMENT|MCI_OPEN_TYPE<br />
|MCI_DGV_OPEN_PARENT|MCI_DGV_OPEN_WS);<br />
...<br />
...<br />
|
|
|
|
|
Thank you one again for replying
hmmm Its giving the same error message (The error message is "The Specified file cannot be played in the specified MCI device. The file may be corrupt, not in correct format or no file name")... I found out one thing that your code had suceeded without error by checking the return value(as given below) ... and also I created a registry value( in regedit) for MPEGVIDEO2 in MCI32 key folder and set the value as MCIQTZ32.DLL is that OK??? .... for MPEGVIDEO I have the key already(so mpeg 1 is playing fine with MCIFMP32.DLL in registry) but for the MPEGVIDEO2 I created new one .... If I didnt create this key, your code returns some error message as their is no DLL linked with MPEGVIDEO2 Devicetype
I had included your code in my btnPlay() function in the main dialog is that OK ???
The code snippet for the button play is as follows
void CSeamlessPlayerDlg::OnBtnPlay()
{
if(index == m_PlyLst.GetItemCount())
index=0;
char lpszErr[256];
CString SPath=m_PlyLst.GetItemText(index,2);
char lpPath[256];
strcpy(lpPath, SPath);
///////////////////////////////////////////////////////////////////////////////////
MCI_DGV_OPEN_PARMS mciOpen;
mciOpen.dwCallback = 0L;
mciOpen.wDeviceID = 0;
mciOpen.dwStyle = WS_CHILD;
mciOpen.hWndParent = m_hWnd;
mciOpen.lpstrElementName = lpPath ;
mciOpen.lpstrDeviceType ="MPEGVIDEO2";
mciOpen.lpstrAlias ="MPEGVIDEO2";
MCIERROR err = mciSendCommand( 0,MCI_OPEN, (DWORD)(MCI_OPEN_ELEMENT|MCI_OPEN_TYPE
|MCI_DGV_OPEN_PARENT|MCI_DGV_OPEN_WS),(DWORD)(LPVOID)&mciOpen);
if(err != 0)
{
mciGetErrorString(err, lpszErr,256);
MessageBox(lpszErr); // display error if failed
}
////////////////////////////////////////////////////////////////////////////////////
if(m_PlyLst.GetItemCount() != 0)
{
// mci.Stop();
mci.SetPath(SPath);
mci.SetParent(m_video.GetSafeHwnd());
mci.Initialize();
// mci.SetParent(m_video.GetSafeHwnd());
// if(i==m_PlyLst.GetItemCount())
// mci.Initialize();
::ShowWindow(mci.GetWindowHandle(),SW_MAXIMIZE);
mci.Play();
SetTimer(1,1000,NULL);
}
else
{
MessageBox("Check your Play List");
}
}
Thank you,
Awaiting for your reply
With regards
Raja Bose
|
|
|
|
|
I think you are new on MCI for example if you need to a HWND handle you can see MCI_DGV_STATUS_HWND (MCI_STATUS )
if I guess is true see examples on codeprojext about MCI but for play you can use of
<br />
MCI_DGV_PLAY_PARMS mciPlay;<br />
mciPlay.dwFrom = mciPlay.dwTo = 0;<br />
mciPlay.dwCallback = MAKELONG(hWnd,0);<br />
mciSendCommand(DeviceID, MCI_PLAY,MCI_NOTIFY,(DWORD)&mciPlay);<br />
|
|
|
|
|
Thank you once again for replying
I had refered a sample "EY player" from code project and I developed my own application using MCI ... and also i am new to MCI.... Actual problem I am getting is that I am not able to play MPEG 2 files alone(with extension m2p and mp2)... It is working fine with mpeg 1, vob, avi and dat files.... hmmmm ok as you had said I will see some more samples from code project and if I have anymore doubt i will contact you...
Thank you
With Regards
Raja Bose
|
|
|
|
|
I hope you find your answer early
|
|
|
|
|
Sir,
I want to get to know about th followinf cod
|
|
|
|
|
I cant understand what you said?
|
|
|
|
|
amaneet wrote: I want to get to know about th followinf cod
1) speak proper english so that everybody can understand you
2) post the code (into <pre></pre> html tags)
3) ask a specific question
|
|
|
|
|
Hi.
I need to add number of jpg images in the list box control added on the Dialog box.
How I can do this?
Thanks
-- modified at 4:14 Saturday 11th November, 2006
Rakesh Thakur
|
|
|
|
|
I think if you using of CListCtrl is better than CListBox
|
|
|
|
|
Hi.
Yes I tried using CListCtrl but it is not showing an image in the List Control.
Here is the sequence how I proceed.
1. Add List Control on the Dialog box.
2. CMyDlg:: OnInitDialog()
{
Get List Control pointer in pListCtrl by using GetDlgItem(ID_OF_LIST_CTRL)
if( NULL == pListCtrl->GetSafeHwnd() )
return;
CImageList *pImgList = new CImageList;
pImgList->Create(IDB_IMAGE1,50,0,RGB(255,0,255));
pListCtrl->SetImageList(pImgList,LVSIL_NORMAL);
LVITEM lItem;
lItem.mask = LVIF_IMAGE;
lItem.iItem = 0;
lItem.pszText = "HI";
lItem.iImage = 0;
pListCtrl->InsertItem(&lItem);
}
Still I could not see an Image in the List control.
Am I missing something here?
Help Please.
Thanks
Rakesh Thakur
|
|
|
|
|
I don't see anything having to do with jpg images in your code
|
|
|
|
|
I think you forgot this line m_pImageList->Add(Bmp,RGB(100,105,0));
CBitmap *Bmp;
m_pImageList->Add(Bmp,RGB(100,105,0));
m_List1.SetImageList(m_pImageList, LVSIL_NORMAL);
|
|
|
|
|
Sir,
int a = 1;
for(int i = 0; i <=10 ; i++)
a = a + a++;
There is no problem in understanding the above written loop
I have some problem in the following code.Please explain it.
for(int i = 0 ; i <= 10 ; i++)
a = a + ++a;
Please explain the working .I mean how it works.
Thanks
|
|
|
|
|
lets take it step by step, let a=1 initially:
1. i=0
2. a=a+ ++a;
Because the ++ is a prefix, the increment is done before evaluating the expression
here: a = 1 + ++a
=1 + (a=a+1);
=1+ (a=1+1);
=1+ (1+1);
=3
etc.
hope this helps.
And ever has it been that love knows not its own depth until the hour of separation
|
|
|
|
|
Mohammad A Gdeisat wrote: lets take it step by step, let a=1 initially:
1. i=0
2. a=a+ ++a;
Because the ++ is a prefix, the increment is done before evaluating the expression
here: a = 1 + ++a
=1 + (a=a+1);
=1+ (a=1+1);
=1+ (1+1);
=3
That is not correct, since the prefix operator
changes the value of a before the expression being evaluated,
hence (with a=1 initially) you will have
a = 2 + 2;
=4
at first iteration. I tested it.
|
|
|
|
|
|
postfix incrementation (i++) :
increments the variable, but returns the value of the variable, before the incrementation.
prefix incrementation (++i) :
increments the variable and returns the new value.
void f() {
int i = 0;
int j = i++;
ASSERT(j == 0);
}
void g() {
int i = 0;
int j = ++i;
ASSERT(j == 1);
}
|
|
|
|
|
After function receive() is called, FD_READ will be fired again, thing will start over, it never reach the next line (a=a+1 and b=b+1)
Is there any way to pause winsock from sending message for a while until I finish my job?
LRESULT CClient::OnWinsock(WPARAM wParam, LPARAM lParam)
{
switch(lParam)
{
case FD_READ:
{
switch (streamToken)
{
case ST_HEADER:
recv(sc, (char*)&bi, sizeof(BITMAPINFO), 0);
a = a+1;
b = b+1;
streamToken = ST_BUFSIZE;
break;
case ST_BUFSIZE:
recv(sc, (char*)&bufSize, sizeof(int), 0);
streamToken = ST_BUFFER;
break;
case ST_BUFFER:
recv(sc, (char*)cscrbuf, bufSize, 0);
DrawScreen();
streamToken = ST_BUFSIZE;
break;
}
}
break;
return 0;
}
|
|
|
|
|
How is this OnWinsock() called?
It sounds like recv() is blocking...
|
|
|
|