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. problem with a mesasge box

problem with a mesasge box

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

    Hi my name i Alberto , I'm new to this forum... I'm still developing to a tapi service proveder in visual c++. This tapi service provider is a static library that is executed in svchost.exe and I want to pop up a message box when this tsp is called from a tapi application as outlook. How can I do? I try to create a my CDialog or to use the afxMessageBox but don't go. Please help me!!Thanks!!:((

    A J I 3 Replies Last reply
    0
    • C Castello07

      Hi my name i Alberto , I'm new to this forum... I'm still developing to a tapi service proveder in visual c++. This tapi service provider is a static library that is executed in svchost.exe and I want to pop up a message box when this tsp is called from a tapi application as outlook. How can I do? I try to create a my CDialog or to use the afxMessageBox but don't go. Please help me!!Thanks!!:((

      A Offline
      A Offline
      Aryan S
      wrote on last edited by
      #2

      what probs u facing with AfxMessageBox()? God is real unless declared int..

      1 Reply Last reply
      0
      • C Castello07

        Hi my name i Alberto , I'm new to this forum... I'm still developing to a tapi service proveder in visual c++. This tapi service provider is a static library that is executed in svchost.exe and I want to pop up a message box when this tsp is called from a tapi application as outlook. How can I do? I try to create a my CDialog or to use the afxMessageBox but don't go. Please help me!!Thanks!!:((

        J Offline
        J Offline
        John R Shaw
        wrote on last edited by
        #3

        The message box is built in to windows, it can be poped up at any time. If you do not know the handle of the window, then just pass NULL (0). Outlook is not a TAPI application, but it does call a piece of code that actualy makes a call using TAPI. I do not know if this will help, but try to call the ::MessageBox() function directly. CDialog and afxMessageBox() are wrappers requiring MFC. Windows was not written in C++, I do not know of any OS that was, so calling the function directly may work. INTP Every thing is relative...

        C 1 Reply Last reply
        0
        • J John R Shaw

          The message box is built in to windows, it can be poped up at any time. If you do not know the handle of the window, then just pass NULL (0). Outlook is not a TAPI application, but it does call a piece of code that actualy makes a call using TAPI. I do not know if this will help, but try to call the ::MessageBox() function directly. CDialog and afxMessageBox() are wrappers requiring MFC. Windows was not written in C++, I do not know of any OS that was, so calling the function directly may work. INTP Every thing is relative...

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

          Thanks, I tried this before but didn't work, at the MessageBox instruction the tsp stay there in position of stalemate with no windows error message or whatever..as the afxMessageBox.

          J 1 Reply Last reply
          0
          • C Castello07

            Thanks, I tried this before but didn't work, at the MessageBox instruction the tsp stay there in position of stalemate with no windows error message or whatever..as the afxMessageBox.

            J Offline
            J Offline
            John R Shaw
            wrote on last edited by
            #5

            I did not realy think it would work, but it was worth a try. We must be missing some Information, because this has nothing to do with TAPI and every thing to do with Windows. I am sorry, but I must go to sleep! It is 8:43 AM here and I have no idea when I got up yesterday, but I do know that I have until tommarrow to finish what I should be working on. Good night, good mourning, good after-noon, or whatever. INTP Every thing is relative...

            C 1 Reply Last reply
            0
            • J John R Shaw

              I did not realy think it would work, but it was worth a try. We must be missing some Information, because this has nothing to do with TAPI and every thing to do with Windows. I am sorry, but I must go to sleep! It is 8:43 AM here and I have no idea when I got up yesterday, but I do know that I have until tommarrow to finish what I should be working on. Good night, good mourning, good after-noon, or whatever. INTP Every thing is relative...

              C Offline
              C Offline
              Castello07
              wrote on last edited by
              #6

              Ok I understand, however I explain you that my tsp when go, connect to a pbx, so I want to create a message box that, in case of connection failed because the user have made a mistake when have configed the tsp, pop up and warns which parameter of connection is wrong...if is the ip address or pbx address, or whatever...I hope that this information explain much more better my situation... However Good night for now...:)

              1 Reply Last reply
              0
              • C Castello07

                Hi my name i Alberto , I'm new to this forum... I'm still developing to a tapi service proveder in visual c++. This tapi service provider is a static library that is executed in svchost.exe and I want to pop up a message box when this tsp is called from a tapi application as outlook. How can I do? I try to create a my CDialog or to use the afxMessageBox but don't go. Please help me!!Thanks!!:((

                I Offline
                I Offline
                Iain Clarke Warrior Programmer
                wrote on last edited by
                #7

                Just a guess, but you mention svchost. If your code is being called from a service, then the messagebox will either fail, or appear on a different windows station. A read of the MessageBox[^] API shows a flag of MB_SERVICE_NOTIFICATION. This may do what you want. If that doesn't help, then you may have to create a named pipe, and write your message to that. Also create a "normal" application, whose only job is to read that pipe, and display any messages in it. Just an example, I'm sure there are lots of ways to solve that problem. Iain.

                C 1 Reply Last reply
                0
                • I Iain Clarke Warrior Programmer

                  Just a guess, but you mention svchost. If your code is being called from a service, then the messagebox will either fail, or appear on a different windows station. A read of the MessageBox[^] API shows a flag of MB_SERVICE_NOTIFICATION. This may do what you want. If that doesn't help, then you may have to create a named pipe, and write your message to that. Also create a "normal" application, whose only job is to read that pipe, and display any messages in it. Just an example, I'm sure there are lots of ways to solve that problem. Iain.

                  C Offline
                  C Offline
                  Castello07
                  wrote on last edited by
                  #8

                  OK!!!Thanks a lot it works!!!:-D

                  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