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. about MessageBox

about MessageBox

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

    i hope to display messageBox in the way of "always on top", that is - HWND_TOPMOST. do you know how to do that? if no, is there another easy-to-use dialog similar to MessageBox which can be displayed "always on top"? thx includeh10

    C 1 Reply Last reply
    0
    • I includeh10

      i hope to display messageBox in the way of "always on top", that is - HWND_TOPMOST. do you know how to do that? if no, is there another easy-to-use dialog similar to MessageBox which can be displayed "always on top"? thx includeh10

      C Offline
      C Offline
      csc
      wrote on last edited by
      #2

      You can make a messagebox stay on top by adding the attribute MB_SYSTEMMODAL. Short example : LPCTSTR lpszText = "my message text ...."; UINT nType = MB_OK | MB_SYSTEMMODAL; UINT nIDHelp = 0; int iResult = AfxMessageBox( lpszText, nType, nIDHelp );

      D 1 Reply Last reply
      0
      • C csc

        You can make a messagebox stay on top by adding the attribute MB_SYSTEMMODAL. Short example : LPCTSTR lpszText = "my message text ...."; UINT nType = MB_OK | MB_SYSTEMMODAL; UINT nIDHelp = 0; int iResult = AfxMessageBox( lpszText, nType, nIDHelp );

        D Offline
        D Offline
        David Crow
        wrote on last edited by
        #3

        System-modal message boxes should be used sparingly (e.g., use them to notify the user of serious, potentially damaging errors that require immediate attention) because all applications are suspended until the user responds.


        "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

        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