Unfortunately, Milestone doesn’t have any sample written in C++, but have a C# sample called PTZ and Presets -
Alternatively you can use protocol methods on the Recorder Command SOAP https://doc.developer.milestonesys.com/html/index.html?base=recordersoaphelp/index.html&tree=tree_3.html