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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. mciSendString problem

mciSendString problem

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
3 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.
  • C Offline
    C Offline
    CS925
    wrote on last edited by
    #1

    Hello all I have the following two lines of code to play an avi file:

    mciSendString("open Res\\test.avi type avivideo alias myfile", NULL, 0, NULL);
    mciSendString("play myfile", NULL, 0, NULL);

    The problem is that it plays the audio but no video is displayed. I can play the video fine in any media player, but it wont show up in the program, but I know its getting to the file because I can hear the audio. Any suggestions as to what the problem could be? Thanks.

    Chris

    L 1 Reply Last reply
    0
    • C CS925

      Hello all I have the following two lines of code to play an avi file:

      mciSendString("open Res\\test.avi type avivideo alias myfile", NULL, 0, NULL);
      mciSendString("play myfile", NULL, 0, NULL);

      The problem is that it plays the audio but no video is displayed. I can play the video fine in any media player, but it wont show up in the program, but I know its getting to the file because I can hear the audio. Any suggestions as to what the problem could be? Thanks.

      Chris

      L Offline
      L Offline
      L Madhavan
      wrote on last edited by
      #2

      I believe it might have something to do with not having a "window" to play the video in. It might be simpler to use the MCIWnd functions (I've used them and had no problem in playing videos) compared to sending command strings yourself.

      C 1 Reply Last reply
      0
      • L L Madhavan

        I believe it might have something to do with not having a "window" to play the video in. It might be simpler to use the MCIWnd functions (I've used them and had no problem in playing videos) compared to sending command strings yourself.

        C Offline
        C Offline
        CS925
        wrote on last edited by
        #3

        Yes! I tried that and it works. Once I set up a window to play it in with the MCIWnd functions the video plays in the window. Thanks alot!

        Chris

        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