|
U can use the Media Player ActiveX to play the MPEG.
For the AVI only u can refer the example in MSDN named "cmnctrl1"
For Gif there is a small example in CodeProject
There might be FlashPlayer ActiveX but i am not sure
thank you
Vikas Amin
Embin Technology
Bombay
vikas.amin@embin.com
|
|
|
|
|
hello Vikas,
Thank u very much for ur reply. yes for flash i got the activex (Shockwave player) and for Mpeg i used media player. but the problem is it should play the mpeg as a part of our application.
but in this case we are getting the controls like play, pause and others. i want them to use internally in my application.
could plz check this once. however thank u for ur reply.
Basheer.
|
|
|
|
|
use appropriate activex controls.
1.right click on the Dialog, then select "insert activex control"
(assume that u've selected Windows Media Player control)
2.Add a control variable to your control. (ie.IDC_MEDIAPLAYER1)
A dialog apprears asking wether to create a class for your activex control, clik yes.
3.now use that variable to access its methods,props etc,
m_Mplayer.play()
m_Mplayer.stop()
void CVideo::OnPlay()
{
m_MPlayer.SetFileName("c:\\basheer.wmv");
m_MPlayer.Play();
}
this'l play your video.
similarly for flash select shockwave flash Object.
He is like a one-legged man in a bum kicking competition. -Novjot Sidhu
--[v]--
|
|
|
|
|
hello Vivek,
Thank u very much for ur reply. yes for flash i got the activex (Shockwave player) and for Mpeg i used media player. but the problem is it should play the mpeg as a part of our application.
but in this case we are getting the controls like play, pause and others. i want them to use internally in my application.
could plz check this once. however thank u for ur reply.
Basheer.
|
|
|
|
|
No problem, just right click on the Media player ax control, then select properties,
Now select "all" tab.
in that scroll down to see
"Show Control"
"Show Statusbar"..etc.. set these properties to "FALSE". Now you wont see anything except the movie window.
He is like a one-legged man in a bum kicking competition. -Novjot Sidhu
--[v]--
|
|
|
|
|
my os is: window xp sp2
if I run the exe which I develop in vc,
the firewire show the dialog to protect the os .
the dialog message is:
Unblock the program
Keep blocking this program
Keep blocking this program, but ask me again later
how to hide the dialog in vc?
how to select the first one in code not myself?
thanks
|
|
|
|
|
This is not something you should do, and I would be very surprised if it was actually possible. The whole point of a firewall is that the user must make a choice. If any program could hide the dialog and select a choice then it can easily bypass the firewall entirely, and so spawn a new generation of virii/trojans. Don't do it!
|
|
|
|
|
Yes there is a way to do this. Its a registry issue.
For the best interest of consumers I probably shouldnt post the code to do it. But it does have something to do with the registry.
If people want the code, and it wont cause flack, I'll post it.
Steve Welborn
"Science can purify religion from error and superstition.
Religion can purify science from idolatry and false absolutes"
- 1987 John Paul the Great
|
|
|
|
|
thanks Swelborn!
Can you email the code to me?
or any message about the fireware registry issue!
or tell me how to do that!
it is my mail:cococut@msn.com
|
|
|
|
|
I emailed it to you.
Steve Welborn
"Science can purify religion from error and superstition.
Religion can purify science from idolatry and false absolutes"
- 1987 John Paul the Great
|
|
|
|
|
i have a problem~!
i want use CDC pointer in project,but my project base on dailog!
how can i do~~
thanks in advance~~;););)
nothing
|
|
|
|
|
ebinaini wrote: i have a problem~!
And what is your problem ? You have compilation errors, you don't know how to do something, .... I mean this can be so much different things it is impossible to give you an answer.
Be more precise in your question !
|
|
|
|
|
CDC dc;<br />
dc.CreateCompatibleDC(NULL);
this is this.
|
|
|
|
|
You could use a CClientDC object.
Anyway, being more specific might help the answer you expect.
SkyWalker
|
|
|
|
|
Hi all,
I want to use windows media player activex in my mfc app.
but I need some files and classes:
wmpsettings.h
wmpcontrols.h
and CWMPPlayer4
and if there is others ways please help me,
THANKS.
G.K.Z
Every new thing you learn,Gives you a new personality.
|
|
|
|
|
dSolariuM wrote: I want to use windows media player activex in my mfc app.
Just drag and drop the Media player on your dialog.... these classes will get added automatically
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hi guys,
i have a dialog with a listbox. the styles for the listbox are 'Border, Multicolumn, Vertrical scroll'.
But the listbox never shows the vertical scrollbar.
anyone can help?
P.
|
|
|
|
|
The multicolumn style makes it add strings in new columns, not in the same column. so it does not need a vertical scrollbar. Therefore, it seems that you need to include the 'Horizontal scrollbar' style, or exclude the 'Multi column' style.
this is this.
|
|
|
|
|
I use the MDI Frame-View Framework,when popup a new window,I want to set the size of window with the size of associated document, I should use SetWindowPos function, but I do not know when to use it and how to set the parameters ?
Thanks!
|
|
|
|
|
I have trouble in writing a CRC CCITT program.
My program is :
#define CRC_CCITT 0x011021
#define INIT_CRC16 0x01ffff
int nn=0, n=0, nbytes=CRCArray.GetSize();
crc = INIT_CRC16;
while(nbytes-- > 0)
{
nn=CRCArray.GetAt(n);
for (i=0x80; i >=0x01; i>>=1)
{
crc <<= 1;
if (nn&i)
crc = crc^0x000001;
else
crc = crc&0xFFFFFE;
if (crc & 0x010000)
crc ^= CRC_CCITT;
}
n++;
}
I get a correct answer as this website
http://zorc.breitbandkatze.de/crc.html
But I got a wrong answer with my tester.
I know that the crc program of my tester is using "fast crc"(fcstab).
// Initialize the Init Flag
*theCrc = theInitFlag;
int length = theBuffer.length();
// Create the crc using fcstab
for (int i = 0; i < length; i++)
{
(*theCrc) = (unsigned short)(((*theCrc) >> 8) ^ fcstab[((*theCrc) ^ theBuffer[i]) & 0xff]);
}
Is there any one try this before?
Please help!
|
|
|
|
|
I had a similar problem once (written by someone else, of course ).
The couse of the problem was the usage of signed datatypes (int, long).
When I made sure that all variables and calculations were using on unsigned datatypes, then i got the correct result at all times.
Previously, "my" results was right at some calculations and wrong at other times.
Maybe that's your problem too?
|
|
|
|
|
I think they are unsigned databytes.
I get single "A" with CRC 0x9479, "123456789" with CRC 0xE5CC.
They are correct to a lot of website in "good crc".
But I would like to know is it the same result with "fast crc"?
(using fcs table lookup)
I tried this input
0513C1302602010004065075626C6963A0190201000201000201003003300C06082B060102010105000500
CRC=0872
Could you tell me what you get in your crc checking?
Please help!
|
|
|
|
|
I had to rewrite your code sligtly, since my "dummy-project" isn't MFC.
This is what I get (F1CE hex). I don't know if it's right or wrong.
void calc()
{
#define CRC_CCITT 0x011021
#define INIT_CRC16 0x01ffff
unsigned char * CRCArray = (unsigned char *) "0513C1302602010004065075626C6963A0190201000201000201003003300C06082B060102010105000500";
int nn=0, n=0, nbytes=strlen((char *) CRCArray);
unsigned int crc = INIT_CRC16;
int i;
while(nbytes-- > 0) {
// nn=CRCArray.GetAt(n);
nn=*(CRCArray + n);
for (i=0x80; i >=0x01; i>>=1) {
crc <<= 1;
if (nn&i)
crc = crc^0x000001;
else
crc = crc&0xFFFFFE;
if (crc & 0x010000)
crc ^= CRC_CCITT;
}
n++;
}
// crc becomes F1CE
}
|
|
|
|
|
Sorry!
I mean the correct CRC of this "0513C1302602010004065075626C6963A0190201000201000201003003300C06082B060102010105000500" is 0872. I get the other answers.
Please help!
|
|
|
|
|
Alex Hon wrote: I mean the correct CRC of this "0513C1302602010004065075626C6963A0190201000201000201003003300C06082B060102010105000500" is 0872.
Actually, according to the website you gave the correct CRC is 0x1872 when using the nondirect option.
|
|
|
|