· Object properties can be just assigned values (app->Visible = … instead of app->put_Visible(…))
· If a method or property returns another object, you can keep calling that object’s methods directly (e.g. doc->ActiveLayer->CreateArtisticText). If any step of this process fails for whatever reason, an exception will be thrown which can simple by intercepted by try…catch construct.
· None of the COM objects ( app, doc, shape ) is explicitly released. This automatically happens when the function exits or an exception is thrown.
Download source: TextCreator.zip