|
|
Hi Fellows
I've created an app that reads mp3 sounds. It works fine. I have a idea: I would like to set the volume of the music that is played. I don't have any idea about what interface I must to use or property or anything else.
To play my mp3 sounds I have these interfaces:
IGraphBuilder, IMediaControl, IMediaEvent, IMediaPosition.
I create the IGraphBuilder like this:
<br />
HRESULT hr = CoCreateInstance(CLSID_FilterGraph, NULL, CLSCTX_INPROC, IID_IGraphBuilder, (void**)&g_pMediaGraph);<br />
And the other interfaces like this
<br />
g_pMediaGraph->QueryInterface(IID_IMediaControl, (void**)&g_pMediaControl); g_pMediaGraph->QueryInterface(IID_IMediaEvent, (void**)&g_pMediaEvent); g_pMediaGraph->QueryInterface(IID_IMediaPosition, (void**)&g_pMediaPosition); g_pMediaGraph->RenderFile(wstrFileName, NULL);<br />
Where g_MediaGraph is my IgraphBuilder interface.
Do I need to use another interface instead any of these? If anyone knows a good resource, answer me.
|
|
|
|
|
|
Thanks a lot man, that's exactly what I needed.
|
|
|
|
|
Hi all. i am using this code to change color of listview item.
But unfortunetly it goes and changes color of all item instead
of only changing the color selected listview item. Could an expert
look at this and show me how i can only change color of selected
listview item instead of coloring all items in listview.Thanks
void CColor1Dlg::OnButton1() <br />
<br />
{<br />
<br />
HWND hPalWnd = ::FindWindow("my window class", NULL);<br />
<br />
HWND spilterwindow = FindWindowEx(hPalWnd, 0, "WTL_SplitterWindow", 0);<br />
<br />
spilterwindow = FindWindowEx(spilterwindow, 0, "WTL_SplitterWindow", 0);<br />
<br />
HWND ATL = FindWindowEx(spilterwindow, 0, "WTL_SplitterWindow", 0);<br />
<br />
HWND ATLWIN = FindWindowEx(ATL, 0, "atl:0053c8d0", 0);<br />
<br />
HWND Dialog = FindWindowEx(ATLWIN, 0, "SysListView32", 0);<br />
<br />
HWND Rich = FindWindowEx(Dialog, 0, "SysHeader32", 0);<br />
<br />
<br />
<br />
CButton *pButton1 = (CButton*)GetDlgItem(IDC_BUTTON1);<br />
<br />
COLORREF GetBkColor(IDC_BUTTON1);<br />
<br />
<br />
COLORREF color = 33023;<br />
<br />
TRACE("Color of the selected font = %8x\n", color);<br />
<br />
<br />
<br />
::SendMessage(Dialog, LVM_SETTEXTCOLOR, 0, color);<br />
<br />
<br />
<br />
}
-- modified at 12:16 Friday 7th July, 2006
|
|
|
|
|
That code looks like an absolute nightmare...
I think that in order to do what you want you would need to have to do custom draw for your list view.
|
|
|
|
|
could u help me how to make a code that custom draw for my list view.
I am not very expert in visual c++ so i be happy if u show how this can be done. Furthermore, why u say the code i a nightmare!! it does not crash any thing!!! it just does more then what i wanted it to do!
|
|
|
|
|
When it comes to doing anything out of the ordinary with a list control then Mike Dunn's article[^] is a must read.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|
|
|
How to check if ComboBox dropdown list is shown or not shown?
thanks.
|
|
|
|
|
GetDroppedState()
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
For a limited user on Windows XP, will regsvr32.exe be able to register a namespace extension? I tried and got error 0x80040201, but I'm not sure if this is an issue to do with the account being a limited user or not.
Any help would be greatly appreciated.
Thanks in advance!
Dave Kerr
codechamber@hotmail.com
http://www.codechamber.com
|
|
|
|
|
Dave Kerr wrote: I tried and got error 0x80040201, but I'm not sure if this is an issue to do with the account being a limited user or not.
It resolves to, "An event was unable to invoke any of the subscribers."
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello,
I have some problems with the PlotXY functions in the NTGraph activeX, Here is the article about this ActiveX:
http://www.codeproject.com/miscctrl/ntgraph_activex.asp[^]
I'll upload for you the picture of the problem here:
http://img433.imageshack.us/img433/4972/untitled2ee.jpg[^]
the function I wrote there the code is: BOOL CGraphsXYAxisDlg::OnInitDialog()(This is the function in the general Dialog)
I sure the problem is there because when I earase the line it works fine.
I tried a few combinations of the point(x,y) but it doesn't work and the errer occurs.
Do you know how can I fix it?
Thank you all for your great help!
SnaidiS(Semion)
|
|
|
|
|
Incidentally the correct place to post these questions would actually be at the relevant article[^] itself.
The error message says Element not found . Do you actually have 3 elements for your graph? (ie. did you add 2 extra elements as the 1st was created automatically)
|
|
|
|
|
OK thank you! I think I found the problem..
SnaidiS(Semion)
|
|
|
|
|
How can I draw a line with this ActiveX.
I tried to use the functions:
OLE_COLOR ElementLineColor
OLE_COLOR ElementPointColor
LineType ElementLinetype
but it doesn't draw..
Do you have any ideas how can I draw a line between all the points?
SnaidiS(Semion)
|
|
|
|
|
Provide some source code of what you are doing. I don't see what is so difficult.
|
|
|
|
|
|
I know what you want to do. I want to know what steps you have taken to attempt to achieve this and your existing code because it looks to me like the SetElementXXX functions have everything you need.
|
|
|
|
|
I haven't tried to add the line because I totaly dont know how. I just know how to add points to the board, if you want the code of adding the points: take:
<br />
void CGraphsXYAxisDlg::OnBnClickedButton2()<br />
{<br />
m_Graph.AddElement();<br />
m_Graph.SetElementWidth(10);<br />
m_Graph.PlotXY(X,m_Y,X);<br />
X++;
UpdateData(FALSE);<br />
<br />
}<br />
Thank you!
SnaidiS(Semion)
|
|
|
|
|
Semion_N wrote: I just know how to add points to the board
You didn't even get that right...
An element is not a data point, it's a data set. If you only have one data set, which you do, you are supposed to just m_Graph.PlotXY(x,y,0);
|
|
|
|
|
You mean that when I'm adding element so its not a point it can be a line too?
but how can I use the line and not the point-you wrote this m_Graph.PlotXY(x,y,0);
I used it but as a point draw.
How can I make lines?
SnaidiS(Semion)
|
|
|
|
|
From the article...
m_Graph.SetElementLineColor(RGB(255,0,0));
m_Graph.SetElementLinetype(0);
m_Graph.SetElementWidth(1);
|
|
|
|
|
Yes-I tri9ed this option but when I'm typing it here for instance:
<br />
void CGraphsXYAxisDlg::OnBnClickedButton2()<br />
{<br />
UpdateData(TRUE);<br />
m_Graph.AddElement();<br />
m_Graph.SetElementWidth(10);<br />
m_Graph.PlotXY(X,m_Y,X);<br />
X++;<br />
m_Graph.SetElementLineColor(RGB(0,0,0));<br />
m_Graph.SetElementLinetype(0);<br />
m_Graph.SetElementWidth(1);<br />
}<br />
The program do nothing it dont draw even only the points...
TY!
SnaidiS(Semion)
|
|
|
|