drawRect()s are Deprecated

Environment: Windows 8, Visual Studio 2015, Cocos2dx 3.9

I am very new to Cocos2dx but not C++ or graphics. I am experimenting with rendering shapes and, at the moment, I am trying to render a rectangle but I am confused because the two ways I have found are both deprecated.

Using CCNodeDraw::drawRect() causes the compiler to issue the following warning:

warning C4996: ‘cocos2d::CCDrawNode’: was declared deprecated

And DrawPrimitives.drawRect() and many other functions in DrawPrimitives namespace are deprecated:

CC_DEPRECATED_ATTRIBUTE void CC_DLL drawRect(Vec2 origin, Vec2 destination);

Generally speaking, what is the recommended practice for rendering vector graphics such a rectangles, ellipses, etc.

Thanks for helping.

Tom

Just use the functions of the DrawNode class:
http://www.cocos2d-x.org/reference/native-cpp/V3.9/dd/d6a/classcocos2d_1_1_draw_node.html

Your suggestion worked. Thank you.