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. Message Box problem

Message Box problem

Scheduled Pinned Locked Moved C / C++ / MFC
jsonperformancehelpquestion
5 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.
  • Y Offline
    Y Offline
    Yamuna
    wrote on last edited by
    #1

    Hi, I am using AfxMessageBox() API in my application.Sometimes the message box doesn't come up and when I debugged and saw found that the return value is 0 which means that there is no enough memory to display the message box.What do I do to solve this problem? Thank You. Yamuna.E. Yamuna.E.

    C 1 Reply Last reply
    0
    • Y Yamuna

      Hi, I am using AfxMessageBox() API in my application.Sometimes the message box doesn't come up and when I debugged and saw found that the return value is 0 which means that there is no enough memory to display the message box.What do I do to solve this problem? Thank You. Yamuna.E. Yamuna.E.

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      Buy more RAM ? I've NEVER had AfxMessageBox fail, what makes you think it's memory related ? When does it happen ? Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. "I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?! - Jon Hulatt, 22/3/2002

      Y 1 Reply Last reply
      0
      • C Christian Graus

        Buy more RAM ? I've NEVER had AfxMessageBox fail, what makes you think it's memory related ? When does it happen ? Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. "I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?! - Jon Hulatt, 22/3/2002

        Y Offline
        Y Offline
        Yamuna
        wrote on last edited by
        #3

        Even for me this is the first time AfxMessageBox fails. MSDN tells that AfxMessageBox on failure returns 0 and that it is due to no enough memory. I forgot to mention the scenario. This messagebox I call from within a thread function(via CreateThread) which takes as its parameter the string to be displayed and I am sure there is no problem with string passing.This I made sure by hard-coding the string just to check whether it works fine with hard-coded string value.But even in that case I got the same problem. But now I tried using MessageBox API instead of AfxMessageBox.Its working fine.But couldn't get the reason behind the problem. Thank You. Yamuna.E. Yamuna.E.

        C 1 Reply Last reply
        0
        • Y Yamuna

          Even for me this is the first time AfxMessageBox fails. MSDN tells that AfxMessageBox on failure returns 0 and that it is due to no enough memory. I forgot to mention the scenario. This messagebox I call from within a thread function(via CreateThread) which takes as its parameter the string to be displayed and I am sure there is no problem with string passing.This I made sure by hard-coding the string just to check whether it works fine with hard-coded string value.But even in that case I got the same problem. But now I tried using MessageBox API instead of AfxMessageBox.Its working fine.But couldn't get the reason behind the problem. Thank You. Yamuna.E. Yamuna.E.

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          It's certainly an odd problem. In the future, TRACE or OutputDebugString will allow you to check a variable value in Debug mode without having to bring up a dialog. Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. "I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?! - Jon Hulatt, 22/3/2002

          L 1 Reply Last reply
          0
          • C Christian Graus

            It's certainly an odd problem. In the future, TRACE or OutputDebugString will allow you to check a variable value in Debug mode without having to bring up a dialog. Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. "I'm somewhat suspicious of STL though. My (test,experimental) program worked first time. Whats that all about??!?! - Jon Hulatt, 22/3/2002

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            Fine Thank You. Yamuna.E. Yamuna.E.

            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