Hello. For my personal use, I want to improve the Media Player Classic (HC) OSD. I'm using Microsoft VS 2010 Pro to compile.
have already modified the code of file [login to view URL] for obtain more information in the OSD. Now I can see Time, Elapsed Time, Remaining Time, Duration and Estimated Time until the end of the movie.
Then in cpp [login to view URL] I added this code to render the text over the video:
//CDC * pDC = CDC::FromHandle(m_MemDC);
CWindowDC dc(m_pWnd);
Graphics graphics([login to view URL]());
[login to view URL](SmoothingModeAntiAlias);
[login to view URL](InterpolationModeHighQualityBicubic);
[login to view URL](PixelOffsetModeHighQuality);
SolidBrush Brush(Color(255, 255, 255, 255));
FontFamily fontFamily(L"Arial");
StringFormat strformat;
wchar_t pszbuf[] = L"12:34:56";
GraphicsPath path;
[login to view URL](pszbuf, wcslen(pszbuf), &fontFamily, FontStyleBold, 40, Gdiplus::Point(0,0), &strformat );
Pen pen(Color(255,0,0,0), 6);
[login to view URL](LineJoinRound);
[login to view URL](&pen, &path);
SolidBrush brush(Color(255, 255,255,0));
[login to view URL](&brush, &path);
But the text flashes (blinks). If I change graphics Graphics ([login to view URL] ()) for Graphics graphics (pDC-> GetSafeHdc ()), then the text not blinks, but is semi-transparent and is not highlighted. I want my text looks like this ([login to view URL]) an not like this ([login to view URL])
This code works fine (no flash), but the outline does not have too much quality and numbers look ugly:
CString texto;
texto = "12:24:45";
pDC->BeginPath();
pDC->TextOut(40, 40, texto, lstrlen (texto));
pDC->EndPath();
CPen penOutline;
[login to view URL](PS_SOLID, 3, RGB(0,0,0));
CPen* pOldPen = pDC->SelectObject(&penOutline);
pDC->StrokePath ();
pDC->SelectObject(pOldPen);
pDC->SetTextColor(RGB(255,255,0));
pDC->TextOut(40,40, texto,lstrlen (texto));
Sorry for my bad English, my native language is Spanish. I hope I explained well.