ahojte,
pouzivam jednoduchy kod pro dekompresi avi videa a jeho vykresleni primo na display. potreboval bych ale do dekomprimovaneho obrazku pridat informaci - pro priklad jednoduchy text. vse relativne funguje, jen to nedelam spravnym zpusobem - text poblikava. je to dano tim, ze nejprve vykreslim dekomprimovany fram z videa a potom teprve text. neumim nejprve text vykreslit do dekomprimovaneho framu a podom na obrazovku.
poradi nekdo? diky
void CRenderer::RenderScreen(BYTE* data)
{
BITMAPINFOHEADER* pbitmapInfoHeader = (BITMAPINFOHEADER*)data;
(HBITMAP*)(data+sizeof(BITMAPINFOHEADER));
const char *DemoText = "ABCD0123456789\0";
RECT TextArea = {400, 400, 400, 400};
HFONT fontHandle = CreateFont(60, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, ANSI_CHARSET, OUT_OUTLINE_PRECIS, CLIP_DEFAULT_PRECIS, ANTIALIASED_QUALITY, VARIABLE_PITCH || FF_DONTCARE, "Arial\0");
HDC hdc = CreateDC(m_DispDevice.DeviceName,NULL,NULL,NULL); // creates a device context (DC) for a device ("\\.\DISPLAY2")
SelectObject ( hdc, fontHandle);
SetTextColor( hdc, RGB (128, 128, 128));
SetBkMode( hdc, TRANSPARENT);
DrawDibDraw(m_hDrwScr,hdc,m_ptScrPos.x,m_ptScrPos.y,-1,-1,pbitmapInfoHeader,phbitmap, 0,0,pbitmapInfoHeader->biWidth,pbitmapInfoHeader->biHeight,0); // draws a DIB to the screen
DrawTextA ( hdc, DemoText, 14, &TextArea, DT_LEFT | DT_SINGLELINE | DT_NOCLIP); // draws formatted text in the specified rectangle
DeleteObject( fontHandle);
DeleteDC(hdc);
};