Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

small messagebox help needed..

grahamojgrahamoj Member Posts: 366
i have a message box e.g

MessageBox( "Do You Really Want To Delete All Items?", "Warning",MB_ICONEXCLAMATION | MB_OKCANCEL );

how do i get the 'cancel button' of the message box if pressed, quit the messagebox and return as normal( not quit to application ), or if the 'ok button' pressed, continue with the code for example to delete all items.

have tried lots of things..must be simple way of doing it.

thanks,
grahamoj.

Comments

  • Joe MayoJoe Mayo Member Posts: 72
    Had you spent the time to look in your help files you would've seen that MessageBox returns an IDCANCEL when cancel is pressed and a IDOK when the ok button is pressed. You could've saved yourself a headache.


    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/dialogboxes/dialogboxreference/dialogboxfunctions/messagebox.asp



    : i have a message box e.g
    :
    : MessageBox( "Do You Really Want To Delete All Items?", "Warning",MB_ICONEXCLAMATION | MB_OKCANCEL );
    :
    : how do i get the 'cancel button' of the message box if pressed, quit the messagebox and return as normal( not quit to application ), or if the 'ok button' pressed, continue with the code for example to delete all items.
    :
    : have tried lots of things..must be simple way of doing it.
    :
    : thanks,
    : grahamoj.
    :
    :

  • Andre YoungAndre Young USAMember Posts: 0

    _ || http://forcoder.org || free ebooks and video tutorials about ( C++ Perl Swift PHP Scratch Delphi Ruby JavaScript Java R PL/SQL Go Python C# MATLAB C Visual Basic Objective-C Assembly Visual Basic .NET Logo Ada Awk Lua Erlang Bash Kotlin Rust LabVIEW F# ABAP Fortran D Apex Transact-SQL Prolog Crystal ML Alice Scheme Lisp SAS Hack Dart FoxPro Scala Julia Clojure VBScript COBOL ) __

Sign In or Register to comment.