Need help converting 6 year old app to new coding

Typing “scopedpointer unique_ptr” in the forum search gave this first hit:

To compare a button e.g. in a Button::Listener you need to get the raw pointer using .get():

if (buttonThatWasClicked == myButton.get())
    // do whatever