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. MCI

MCI

Scheduled Pinned Locked Moved C / C++ / MFC
questionc++
4 Posts 3 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.
  • G Offline
    G Offline
    Gian
    wrote on last edited by
    #1

    How can i use the MCI device in a MFC application? Is possible to put a video on a dialog with it?

    T 1 Reply Last reply
    0
    • G Gian

      How can i use the MCI device in a MFC application? Is possible to put a video on a dialog with it?

      T Offline
      T Offline
      Tomasz Sowinski
      wrote on last edited by
      #2

      I have never used it personally, but it seems MCIWndXXX API could do that. You may check MPlay SDK sample as well. Tomasz Sowinski -- http://www.shooltz.com

      *** Purgamentum init, exit purgamentum ***

      G 1 Reply Last reply
      0
      • T Tomasz Sowinski

        I have never used it personally, but it seems MCIWndXXX API could do that. You may check MPlay SDK sample as well. Tomasz Sowinski -- http://www.shooltz.com

        *** Purgamentum init, exit purgamentum ***

        G Offline
        G Offline
        Gian
        wrote on last edited by
        #3

        I've resolved using DirectShow (perform much things and formats than MCI) but i've a problem passing the CString filename, the function receive a LPCWSTR parameter but i can't find a way to convert it. I've read there's a macro T2W that can do that but the compiler tell me undeclared identifier.. there's some kind of include or it's a way better to convert it?

        S 1 Reply Last reply
        0
        • G Gian

          I've resolved using DirectShow (perform much things and formats than MCI) but i've a problem passing the CString filename, the function receive a LPCWSTR parameter but i can't find a way to convert it. I've read there's a macro T2W that can do that but the compiler tell me undeclared identifier.. there's some kind of include or it's a way better to convert it?

          S Offline
          S Offline
          Steve S
          wrote on last edited by
          #4

          The T2W macro is in ATLCONV.H, however, you might find it almost as easy to use the AllocSysString function that's part of CString. This will return a BSTR, which in your context could be treated as a LPCWSTR without a cast. However, you must free it after the call has returned; e.g. CString myFileName; .... BSTR tmp = myFileName.AllocSysString(); somefunction( tmp ); ::SysFreeString( tmp ); The T2W and it's friends would require something like; { USES_CONVERSION; somefunction( T2W( myFileName ) ); } Steve S [This signature space available for rent]

          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