UI tests, in my experience, are platform dependent. It's not something that you utilize from your C++ code. They are not a collection of methods you call from your app, but rather a separate app that sits there and presses buttons for you. It also has to be made compatible to the platform you are developing for. A Windows UI testing tool won't be able to test a game written for PS3, because it has to be able to send the appropriate input signals to be able to automate the tests, unless there's a PS3 emulator running on Windows.
It is a form of blackbox testing. The tests themselves don't care how the application under the test works. Try looking at Sikuli, for an example of a UI testing suite.