Do Window Get Window Error - Simple

I find it a bit unexpected this doesn't work...are graphs not windows?

function testgetwindow()

getwindow testwindow

They are. You need a keyword after the winName to tell GetWindow what to get! Check the help.
If you want to bring the window to the front, you need DoWindow/F winName