How to scale all sprites and elements according to window size?

I’ve seen this done in Geometry Dash (which is also programmed with Cocos2d-x c++) and I want to know how to:

A) Scale every element according to the window size
B) Maintain aspect ratio when resizing window
C) Refresh size and position of each element when window size is altered
D) Allow switching to full screen in-game

I’m very new to cocos2dx and c++, so I figured I would stop here to try and figure this all out.
Thank you to anyone who helps!!