How to use GUIUtility functions?

I couldn't find an example for this yet. Specifically I think of using GetStateObject, GetControlID and parameters of those.

The documentation says “Unless you are creating your own GUI controls from scratch, you should not use these functions.” Couple more hints here, but usually you shouldn’t need to go there.