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. How to remove default icon in caption of MessageBox

How to remove default icon in caption of MessageBox

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialquestion
9 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.
  • A Offline
    A Offline
    am 2009
    wrote on last edited by
    #1

    Hi , I am using MessageBox function as MessageBox(NULL,L"Please start application ",L"Test",MB_OK |MB_SYSTEMMODAL); I want to show this message box always on top so that user have to close it first. When I use MB_SYSTEMMODAL to make it modal message,default blank icon is added into messageBox caption. I want to messageBox as modal but without icon in caption. Is there any way to do this.? Thanks ABM

    B M 2 Replies Last reply
    0
    • A am 2009

      Hi , I am using MessageBox function as MessageBox(NULL,L"Please start application ",L"Test",MB_OK |MB_SYSTEMMODAL); I want to show this message box always on top so that user have to close it first. When I use MB_SYSTEMMODAL to make it modal message,default blank icon is added into messageBox caption. I want to messageBox as modal but without icon in caption. Is there any way to do this.? Thanks ABM

      B Offline
      B Offline
      BIJU Manjeri
      wrote on last edited by
      #2

      Please try this.. MessageBox(L"Please start application ",L"Test",MB_OK |MB_APPLMODAL); :)

      A 1 Reply Last reply
      0
      • B BIJU Manjeri

        Please try this.. MessageBox(L"Please start application ",L"Test",MB_OK |MB_APPLMODAL); :)

        A Offline
        A Offline
        am 2009
        wrote on last edited by
        #3

        IF I use MB_APPLMODAL style , messageBox get hided/minimize when user click on any other application. Actually I am calling one application having above message from custom action in setup project.

        1 Reply Last reply
        0
        • A am 2009

          Hi , I am using MessageBox function as MessageBox(NULL,L"Please start application ",L"Test",MB_OK |MB_SYSTEMMODAL); I want to show this message box always on top so that user have to close it first. When I use MB_SYSTEMMODAL to make it modal message,default blank icon is added into messageBox caption. I want to messageBox as modal but without icon in caption. Is there any way to do this.? Thanks ABM

          M Offline
          M Offline
          Mohan Ramachandra
          wrote on last edited by
          #4

          Hope this one will help

          MessageBox(NULL,L"Please start application ",L"Test",MB_OK |MB_TOPMOST);

          MB_TOPMOST : Creates the message box with the WS_EX_TOPMOST window style.

          B 1 Reply Last reply
          0
          • M Mohan Ramachandra

            Hope this one will help

            MessageBox(NULL,L"Please start application ",L"Test",MB_OK |MB_TOPMOST);

            MB_TOPMOST : Creates the message box with the WS_EX_TOPMOST window style.

            B Offline
            B Offline
            BIJU Manjeri
            wrote on last edited by
            #5

            yes Mohan, your code seems working.. :)

            M 1 Reply Last reply
            0
            • B BIJU Manjeri

              yes Mohan, your code seems working.. :)

              M Offline
              M Offline
              Mohan Ramachandra
              wrote on last edited by
              #6

              :thumbsup:

              A 1 Reply Last reply
              0
              • M Mohan Ramachandra

                :thumbsup:

                A Offline
                A Offline
                am 2009
                wrote on last edited by
                #7

                Hi Mohan, MB_TOPMOST property is ignored by vista. It is working fine on Windows XP,but not on Vista.

                B M 2 Replies Last reply
                0
                • A am 2009

                  Hi Mohan, MB_TOPMOST property is ignored by vista. It is working fine on Windows XP,but not on Vista.

                  B Offline
                  B Offline
                  BIJU Manjeri
                  wrote on last edited by
                  #8

                  hi am, I tested the code MessageBox(L"Please start application ",L"Test",MB_OK |MB_TOPMOST|MB_APPLMODAL); on windows 7. Its working fine for me. If the above code is also not working for you, then create your own message box, by specifyng the Window Styles in CreateWindow() :)

                  1 Reply Last reply
                  0
                  • A am 2009

                    Hi Mohan, MB_TOPMOST property is ignored by vista. It is working fine on Windows XP,but not on Vista.

                    M Offline
                    M Offline
                    Mohan Ramachandra
                    wrote on last edited by
                    #9

                    am 2009 wrote:

                    MB_TOPMOST property is ignored by vista. It is working fine on Windows XP,but not on Vista.

                    I am using Vista and it's working fine.

                    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