messagedlg

This is a discussion on messagedlg within the C++ Programming forums, part of the General Programming Boards category; I am just wondering if it is possible to use MessageDlg (C++ Builder) wherein the message box would be having ...

  1. #1
    Registered User
    Join Date
    Apr 2007
    Posts
    8

    messagedlg

    I am just wondering if it is possible to use MessageDlg (C++ Builder)
    wherein the message box would be having 2 or more buttons....

    for example the message would have an OK button, Cancel Button, etc....

    coz i'm looking at the help and it seems that it can only accomodate
    1 button....

    this is the table provided in the help which shows the type of button
    that can appear in a message box

    Code:
    TMsgDlgBtn Value	Corresponding return value
    
    mbOK	                       mrOk
    mbCancel	             mrCancel
    mbYes	                       mrYes
    mbNo	                       mrNo
    mbAbort	                      mrAbort
    mbRetry	                      mrRetry
    mbIgnore	             mrIgnore
    mbAll	                         mrAll
    mbNoToAll	             mrNoToAll
    mbYesToAll	             mrYesToAll
    a sample code provided also shows a message box with
    only 1 button...

    Code:
        MessageDlg("The list has " + IntToStr(pList->Count) + "objects", 
                   mtInformation, TMsgDlgButtons() << mbOK, 0);
    so now i am wondering if it is possible to have 2 buttons in a
    message box...

    please help.

  2. #2
    Registered User
    Join Date
    Apr 2007
    Posts
    8

    Talking

    got the answer....
    i could do something like...

    Code:
       MessageDlg("The list has ",
                   mtInformation, TMsgDlgButtons() <<  mbOK << mbCancel, 0);

Popular pages Recent additions subscribe to a feed

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21