|
I really thought it was a simple question, but ok ... I just wanted to know if VS 2005 had a Media Player form component that can be added to the form, thats all.
Thanx again,
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
|
Programm3r wrote: I really thought it was a simple question, but ok ...
Not seen much of forms. Obviously, looked in to MFC context.
|
|
|
|
|
My bad ...
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
In Visual Studio, open the Toolbox.
If Windows Media Player does not appear on the Components tab of the Toolbox, do the following:
Right-click within the Toolbox, and then select Add/Remove Items. This opens the Customize Toolbox dialog box.
On the COM Components tab, select Windows Media Player.
If Windows Media Player does not appear in the list, click Browse, and then open Wmp.dll, which should be in the Windows\System32 folder.
Click OK. The Windows Media Player control will be placed on the current Toolbox tab.
You can now select Windows Media Player in the Toolbox and add it
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
I have a question do you want to play movie files
|
|
|
|
|
Hi.
I am trying to display a graph in a dialog with data input from a file which i have put it in an array. How do i display the array with its data as the y-axis? This is what I have gotten so far and I am stuck here.
<br />
void CCTestDlg::OnOpenfile() <br />
{<br />
ifstream file;<br />
short data[10240];<br />
int iI;<br />
<br />
static char szFilter[] = "Binary files (*.bin)|*.bin|All files (*.*)|*.*||";<br />
<br />
DWORD dwFlags = OFN_HIDEREADONLY | OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST;<br />
<br />
CFileDialog m_ldFile(TRUE, ".bin", NULL, dwFlags, szFilter);<br />
<br />
if (m_ldFile.DoModal() == IDOK)<br />
{<br />
m_filePath = m_ldFile.GetPathName();<br />
<br />
file.open (m_filePath, ios::in|ios::binary);<br />
<br />
if (file.is_open())<br />
{<br />
for (iI = 0; iI < 10240; iI++)<br />
{<br />
data[iI] = file.get();<br />
}<br />
<br />
file.close();<br />
}<br />
}<br />
}<br />
If in SDI, there is a OnDraw() function but how do I do it in a dialog?
Thanks in advance.
|
|
|
|
|
|
ReturnRain wrote: If in SDI, there is a OnDraw() function but how do I do it in a dialog?
Does this[^] help?
Short story: Define a control for that!
Don't do it on the dialog. Your control might even have no border, so it looks like the drawing takes place on the dialog.
"We trained hard, but it seemed that every time we were beginning to form up into teams we would be reorganised. I was to learn later in life that we tend to meet any new situation by reorganising: and a wonderful method it can be for creating the illusion of progress, while producing confusion, inefficiency and demoralisation."
-- Caius Petronius, Roman Consul, 66 A.D.
|
|
|
|
|
Hello.
I tried to follow the link above (the one that jhwurmbach gave) and define a picture control. But I just get lost somewhere. I dont know if I am doing it right.
I placed the picture control on the dialog and change its ID and type to rectangle. Then it stated to add #include SpectrumAnalyzer.h to dialog header and to add member variable to dialog. Meaning I have to created SpectrumAnalyzer.h first? What should I do next?
I tried to find in the internet on picture control with rectangle as its type but I just couldn't find it. Is there any link that will teach me step by step on picture control?
Thanks again in advance.
|
|
|
|
|
ReturnRain wrote: add member variable to dialog.
So, you have added the include-line at the top of your dialog class-header file (but below the #include "stdafx.h ").
Now you add the lines given in the SpectrumAnalyser-Article
public:
CSpectrumAnalyzer m_SpectrumAnalyzer_Ctrl; to your dialog header.
The Demo-project from the SpectrumAnalyzer article shows what to do in its CSpectrumAnalyzerDemoDlg -class (the two files SpectrumAnalyzerDemoDlg.h and SpectrumAnalyzerDemoDlg.cpp )
You probably want the Spectrum Analyzer to be shown right from the start, so the creation code (in the demo found in the OnScanBtn() button click handler) needs to be moved to the OnCreate -function of your dialog (add it using the Visual-C++ code wizard!).
ReturnRain wrote: s there any link that will teach me step by step on picture control?
You won't get more than the Article I linked shows you. Basic C++ and MFC knowledge is required beforehand.
Failure is not an option - it's built right in.
|
|
|
|
|
How can i get list of the names of all devices attached with current system in VC++?
|
|
|
|
|
Certainly not by repeating the question, and most positivley not after being provided with 5 links. Stop waiting for somebody to give you the answer and go do some research.
|
|
|
|
|
i need a c script to list the devices in the sytem. any one know this. help me.
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
Hi All,
Can anyone please tell me what is the difference between a DLL file,.Lib file .tlb file.
I am little confused about them.
Thanking you,
Ashwath.
|
|
|
|
|
ashwath1979 wrote: .Lib file
Static library is a lib
ashwath1979 wrote: DLL file
A dynamic library is a DLL
ashwath1979 wrote: .tl
Type libraries can be standalone files with a .tlb extension, or they can be embedded in a file as a resource. They are typically contained in files with the extension .dll, .exe, .ocx, or .olb. A quick way to check for the presence of a type library in a file is to try opening the file in OLEVIEW.EXE
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Thanks ,One more doubt i have,
I have a exe.And calling a COM dll "example.dll" .In that there are some methods.I am calling those methods from my exe.To compile the exe
1.)where should the dll be residing.
2.)Is the .lib file required as i am loading the file dynamically by calling createinstance COM API.
3.)Why am i getting .lib not found error.
thanking in advance,
Ashwath Hegde.
|
|
|
|
|
1) anywhere in Windows path (for the application can find it). generally, you put it in the same folder as the one containing the exe.
2).lib files are for static link only AFAIK, but i don't know much about them.
3)did you look in your project settings that the full pathed lib where correctly provided, so that the linker can find it and link it ?
|
|
|
|
|
Thanks ,One more doubt i have,
I have a exe.And calling a COM dll "example.dll" .In that there are some methods.I am calling those methods from my exe.To compile the exe
1.)where should the dll be residing.
2.)Is the .lib file required as i am loading the file dynamically by calling createinstance COM API.
3.)Why am i getting .lib not found error when i am loading the Dll dynamically.
thanking in advance,
Ashwath Hegde.
|
|
|
|
|
twice ?!
|
|
|
|
|
sorry for that i wanted to be more clear in my question.
|
|
|
|
|
you could have deleted it
|
|
|
|
|
ok whats the answer for my question.
|
|
|
|
|
Hi All
I am using one console application and using getche and getchar function in this application.
ch = getchar();
ch1 = getche();
I found that using getchar when I press enter I get value 10(LF) in ch.
and when I press enter for getche() function i get value 13(CR) in ch1.
Why am I not getting the same value in both function?
When enter is pressed then two values are passed.that are 10(LF) and 13(CR).
So value of ch1 must also be 10 in place of 13.
Can anyone help me why I am getting different values in both functions.
Thanks in advance
BR
Sachin Ahuja
|
|
|
|
|
Are you using both the function calls in a sequence? i mean one statement after the other?
if Yes,
Pressing "Enter" button does mean you are entering \r\n together into the stdin(keyboard)
buffer.The first getchar() is returning the "\r". and the second getche() is returning
the "\n" .
can you test using getchar() once in your function and then, replace the getchar() with getche()
and then verify result?
regards,
haribabu
|
|
|
|