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. "adding tones"

"adding tones"

Scheduled Pinned Locked Moved C / C++ / MFC
question
9 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.
  • H Offline
    H Offline
    harsh_2961
    wrote on last edited by
    #1

    hi, Mine is a phone like application and on an incoming call i should play some tone so that user can know that there is an incoming call.. Can anybody let me know the simplest way of doing it with minimum lines of code ?

    Harsha

    J B 2 Replies Last reply
    0
    • H harsh_2961

      hi, Mine is a phone like application and on an incoming call i should play some tone so that user can know that there is an incoming call.. Can anybody let me know the simplest way of doing it with minimum lines of code ?

      Harsha

      J Offline
      J Offline
      James R Twine
      wrote on last edited by
      #2

      Look up the PlaySound(...) function in MSDN - that will give you an example of how to play a sound using a small amount of code.    Peace!

      -=- James
      Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
      Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
      See DeleteFXPFiles

      H 1 Reply Last reply
      0
      • H harsh_2961

        hi, Mine is a phone like application and on an incoming call i should play some tone so that user can know that there is an incoming call.. Can anybody let me know the simplest way of doing it with minimum lines of code ?

        Harsha

        B Offline
        B Offline
        bryce
        wrote on last edited by
        #3

        PlaySound is the way to go Bryce

        --- To paraphrase Fred Dagg - the views expressed in this post are bloody good ones. --
        Publitor, making Pubmed easy. http://www.sohocode.com/publitor

        Our kids books :The Snot Goblin, and Book 2 - the Snotgoblin and Fluff

        1 Reply Last reply
        0
        • J James R Twine

          Look up the PlaySound(...) function in MSDN - that will give you an example of how to play a sound using a small amount of code.    Peace!

          -=- James
          Please rate this message - let me know if I helped or not! * * * If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong!
          Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road!
          See DeleteFXPFiles

          H Offline
          H Offline
          harsh_2961
          wrote on last edited by
          #4

          Can i know how to use this Playsound()? if you know about some project where this function is used please let me know as it will give me idea about what all to be used along with the function.. i searched for this but i am not getting anything satisfactory to make this function work

          Harsha

          P 1 Reply Last reply
          0
          • H harsh_2961

            Can i know how to use this Playsound()? if you know about some project where this function is used please let me know as it will give me idea about what all to be used along with the function.. i searched for this but i am not getting anything satisfactory to make this function work

            Harsha

            P Offline
            P Offline
            prasad_som
            wrote on last edited by
            #5

            harsh_2961 wrote:

            i am not getting anything satisfactory to make this function work

            Doesn't this[^] example satisfies you ?

            Prasad Notifier using ATL | Operator new[],delete[][^]

            H 1 Reply Last reply
            0
            • P prasad_som

              harsh_2961 wrote:

              i am not getting anything satisfactory to make this function work

              Doesn't this[^] example satisfies you ?

              Prasad Notifier using ATL | Operator new[],delete[][^]

              H Offline
              H Offline
              harsh_2961
              wrote on last edited by
              #6

              i am using the same line of code as mentioned in your link but its giving an errors saying "1. error C2065: 'SND_FILENAME' : undeclared identifier; 2. error C2065: 'SND_SYNC' : undeclared identifierError; 3. error C2065: 'SND_APPLICATION' : undeclared identifier; 4.error C3861: 'PlaySound': identifier not found;" Do i have to include anything else..? please let me know what all i have to include.. if i have to include any library files please send me thet file too if you have

              Harsha

              P 1 Reply Last reply
              0
              • H harsh_2961

                i am using the same line of code as mentioned in your link but its giving an errors saying "1. error C2065: 'SND_FILENAME' : undeclared identifier; 2. error C2065: 'SND_SYNC' : undeclared identifierError; 3. error C2065: 'SND_APPLICATION' : undeclared identifier; 4.error C3861: 'PlaySound': identifier not found;" Do i have to include anything else..? please let me know what all i have to include.. if i have to include any library files please send me thet file too if you have

                Harsha

                P Offline
                P Offline
                prasad_som
                wrote on last edited by
                #7

                harsh_2961 wrote:

                Do i have to include anything else..? please let me know what all i have to include.

                I tempted to tell you that, but it will definitely hamper your growth as professional. No offense intended. But,consider this as advice, MSDN is best soultion to 90 % of problems. But, you are not using it at all. And its very annoying, if you are asking such a question, that could be easily solved on your own. it makes clear that, you dont want/or dont have time to read carefully. Learn to explore things on your own, this is how you will catch up the fast changing technologies. In this particular case, all information about compatibility of API will be avilable at Requirements section, down below in MSDN description of that API.

                Prasad Notifier using ATL | Operator new[],delete[][^]

                H 1 Reply Last reply
                0
                • P prasad_som

                  harsh_2961 wrote:

                  Do i have to include anything else..? please let me know what all i have to include.

                  I tempted to tell you that, but it will definitely hamper your growth as professional. No offense intended. But,consider this as advice, MSDN is best soultion to 90 % of problems. But, you are not using it at all. And its very annoying, if you are asking such a question, that could be easily solved on your own. it makes clear that, you dont want/or dont have time to read carefully. Learn to explore things on your own, this is how you will catch up the fast changing technologies. In this particular case, all information about compatibility of API will be avilable at Requirements section, down below in MSDN description of that API.

                  Prasad Notifier using ATL | Operator new[],delete[][^]

                  H Offline
                  H Offline
                  harsh_2961
                  wrote on last edited by
                  #8

                  Thanks for the advice.. i explored a lot about this already and found that i need "winmm.lib" if you have that send it to me.. i will be greatfull. my id: harsh_2961@yahoo.co.in

                  Harsha

                  P 1 Reply Last reply
                  0
                  • H harsh_2961

                    Thanks for the advice.. i explored a lot about this already and found that i need "winmm.lib" if you have that send it to me.. i will be greatfull. my id: harsh_2961@yahoo.co.in

                    Harsha

                    P Offline
                    P Offline
                    prasad_som
                    wrote on last edited by
                    #9

                    harsh_2961 wrote:

                    if you have that send it to me

                    You need to have windows multimedia installed for that. I think its there on your machine. Just mention winmm.lib in linker option.

                    harsh_2961 wrote:

                    my id: harsh_2961@yahoo.co.in

                    You are exposing you self to spammners. And btw, nobody will help you, if you are seeking help this way.

                    Prasad Notifier using ATL | Operator new[],delete[][^]

                    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