aslihannur
December 30, 2005, 15:56:56
Hi all,
I am trying to access IMVGDIOverlay interface in my playout application that developed with DirectShow in C++. I need to reach DC surface with GetDC method.
Relevant part of the code like that :
IBaseFilter *pTemp;
CComPtr<IMVGDIOverlay> pGDI;
HDC hDC;
CDC* pDC;
CController::_dEngine->get_gBuilder()->FindFilterByName(L"MV GDI Overlay", &pTemp); //it is just the filter structure of my app, pTemp is IBaseFilter
pTemp->QueryInterface(IID_IMVGDIOverlay, (void**) &pGDI);
if(pGDI->GetDC((long*)&hDC) == S_OK)
{
pDC = CDC::FromHandle(hDC);
if(pDC != 0L)
{
RECT rctB = {100,100,180,230};
pDC->DrawText("some text",&rctB,0);
pGDI->ReleaseDC((long*)&hDC);
}
}
pTemp->Release();
The code is compiled ok, but it says
"unresolved external symbol _IID_IMVGDIOverlay"
while linking.
iMVGDIOverlay.h is included. I also include mv.h and tried. But it did not work.
What I find strange is; it doesn't give an error for "IMVGDIOverlay" , just could not resolve REFIID.
What is wrong with my code? How can I solve this?
Any help will be appreciated.
Thanks in advance
Nihal
I am trying to access IMVGDIOverlay interface in my playout application that developed with DirectShow in C++. I need to reach DC surface with GetDC method.
Relevant part of the code like that :
IBaseFilter *pTemp;
CComPtr<IMVGDIOverlay> pGDI;
HDC hDC;
CDC* pDC;
CController::_dEngine->get_gBuilder()->FindFilterByName(L"MV GDI Overlay", &pTemp); //it is just the filter structure of my app, pTemp is IBaseFilter
pTemp->QueryInterface(IID_IMVGDIOverlay, (void**) &pGDI);
if(pGDI->GetDC((long*)&hDC) == S_OK)
{
pDC = CDC::FromHandle(hDC);
if(pDC != 0L)
{
RECT rctB = {100,100,180,230};
pDC->DrawText("some text",&rctB,0);
pGDI->ReleaseDC((long*)&hDC);
}
}
pTemp->Release();
The code is compiled ok, but it says
"unresolved external symbol _IID_IMVGDIOverlay"
while linking.
iMVGDIOverlay.h is included. I also include mv.h and tried. But it did not work.
What I find strange is; it doesn't give an error for "IMVGDIOverlay" , just could not resolve REFIID.
What is wrong with my code? How can I solve this?
Any help will be appreciated.
Thanks in advance
Nihal