Minimize Window in C++ With a Custom BP Node?

I can’t get it to work, even tried to ask some friends who know more of C++ than me and either them couldn’t help me using the UE Api
I’m asking too much if you could build the code for me? so maybe i understand how to properly use the API and what i’m doing wrong. I’m Kinda confused honestly i keep getting errors anyway
I’m not sure how to properly use TSharedPtr either

I’m googling like mad but can’t find any usefull informations or anything similiar to understand my mistakes