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. Sound In an App

Sound In an App

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

    How is it possible to get a program to play Midi \ Wav file when a button is pressed? I need my application to include 2-3 sound files which can be played when a button is pressed is this possible? if so how. And how do you display a bitmap on a button? :omg:

    M A C 3 Replies Last reply
    0
    • M mavgoose

      How is it possible to get a program to play Midi \ Wav file when a button is pressed? I need my application to include 2-3 sound files which can be played when a button is pressed is this possible? if so how. And how do you display a bitmap on a button? :omg:

      M Offline
      M Offline
      Mazdak
      wrote on last edited by
      #2

      mavgoose wrote: And how do you display a bitmap on a button? Search Botton control in this site and find lots if exampls. mavgoose wrote: How is it possible to get a program to play Midi \ Wav file when a button is pressed? Look into Audio part of this site. Mazy "A bank is a place that will lend you money if you can prove that you don't need it." - Bob Hope

      1 Reply Last reply
      0
      • M mavgoose

        How is it possible to get a program to play Midi \ Wav file when a button is pressed? I need my application to include 2-3 sound files which can be played when a button is pressed is this possible? if so how. And how do you display a bitmap on a button? :omg:

        A Offline
        A Offline
        Alexander M
        wrote on last edited by
        #3

        sndPlaySound API Don't try it, just do it! ;-)

        1 Reply Last reply
        0
        • M mavgoose

          How is it possible to get a program to play Midi \ Wav file when a button is pressed? I need my application to include 2-3 sound files which can be played when a button is pressed is this possible? if so how. And how do you display a bitmap on a button? :omg:

          C Offline
          C Offline
          Curi0us_George
          wrote on last edited by
          #4

          The simplest way to play an audio file on windows is to use the PlaySound function. http://msdn.microsoft.com/library/default.asp?url=/library/en-us/multimed/htm/\_win32\_playsound.asp Putting a bitmap on a button? Depends on whether you're using mfc, wtl, win32 api, .net or something else. There's probably a dozen tutorials on this site alone explaining it, though.

          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