flowing strings on BMP image of SDI View window?
-
Hi, I'd like get some idea how to do it? I displayed BMP image(full screen) in OnPaint fuction of SDI CView Window.(it's OK ); I'd like to flow a strings over the BMP image form right-bottom to left-bottom. it is just like subtitle on TV... How can I approach it to do it? because I'm VC beginner ... Any comment will help.. Have a day.
-
Hi, I'd like get some idea how to do it? I displayed BMP image(full screen) in OnPaint fuction of SDI CView Window.(it's OK ); I'd like to flow a strings over the BMP image form right-bottom to left-bottom. it is just like subtitle on TV... How can I approach it to do it? because I'm VC beginner ... Any comment will help.. Have a day.
in painting you draw at first the background and than draw the top painting stuff. So in your case you first draw the bmp and than draw the text. To draw nice the you got to create a own Font (CFont). Here is some API-code: BOOL DrawTextTransparent(HDC hdc, HFONT hFont, const RECT& rc, LPCTSTR pszText, UINT cnt) { HFONT hFontOld = (HFONT) ::SelectObject( hdc, hFont ); int iBkMode = ::SetBkMode( hdc, TRANSPARENT ); BOOL b = ::ExtTextOut( hdc, rc.left, rc.top, ETO_CLIPPED, &rc, pszText, cnt, 0 );//read the help ::SetBkMode( hdc, iBkMode ); ::SelectObject( hdc, hFontOld ); return b; }
Press F1 for help or google it. Greetings from Germany