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. User defined buttons on MessageBox

User defined buttons on MessageBox

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
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.
  • M Offline
    M Offline
    Mr Bose Dayala
    wrote on last edited by
    #1

    Hi all I want to display MessageBox with "Disconnect" ,"Exit" and "Cancel" buttons....how di I?can any one help me regarding this with code example?? ThomasKennedyBose

    M E 2 Replies Last reply
    0
    • M Mr Bose Dayala

      Hi all I want to display MessageBox with "Disconnect" ,"Exit" and "Cancel" buttons....how di I?can any one help me regarding this with code example?? ThomasKennedyBose

      M Offline
      M Offline
      Mel Feik
      wrote on last edited by
      #2

      yes... but you need to define your own message box (dialog box) which is pretty simple and staight forward... In the resources view, right click on the Dialog icon and select Insert Dialog. The right click on IDD_DIALOG1 in Resoure View and select Proerties. Use this window as you normally would (change the IDD_DIALOG1 to something more useful to you). You can use the properties window to chant the Caption to one of your own. Now just double click on the dialog resource and add what ever controls you would like to use. You will also need to add a class for the dialog. Use Insert|New Class from menu, if you are using MFC select MFC Class as Class Type, etc.... Give it a name like CYourNameDlg and select CDialog as the base class. YOu should also see that the ID is the name you chose. Thats about it, its ready to go. --------------------------------------------- The greenest grass is NOT on the other side of the fence, its the grass you take care of. Have you watered your lawn lately? - Just remember when you point a finger at someone else, you are only one finger away from making a fist to hit them with!

      1 Reply Last reply
      0
      • M Mr Bose Dayala

        Hi all I want to display MessageBox with "Disconnect" ,"Exit" and "Cancel" buttons....how di I?can any one help me regarding this with code example?? ThomasKennedyBose

        E Offline
        E Offline
        Eugene Pustovoyt
        wrote on last edited by
        #3

        You can use the MessageBoxIndirect API. For example look this article Best regards, Eugene Pustovoyt

        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