Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. flowing strings on BMP image of SDI View window?

flowing strings on BMP image of SDI View window?

Scheduled Pinned Locked Moved C / C++ / MFC
questionhelptutoriallearning
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    rambojanggoon
    wrote on last edited by
    #1

    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.

    K 1 Reply Last reply
    0
    • R rambojanggoon

      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.

      K Offline
      K Offline
      KarstenK
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups