MATLAB: Check if user pressed the button “OK” in msgbox

guiMATLABmatlab gui

I want to show some message to the user and then check if he proceed with pressing button or if he closed the dialogue. e.g.:
uiwait(msgbox('Please press OK.','something'))
if(user pressed button to continue)
%%do something
else
%%process aborted due the user action (he closed the msgbox)
end
Do you have any idea how to get this?
Thank you in advance!
Best regards,
goldenEyes

Best Answer

I solved it by using dialog and adding an callback to the button. Maybe not the simplest solution, but it is a solution which works for now :-) Anyway thank you TastyPastry!
bye