If I wanted to do something similiar, Im using a macro to get the name of addon to anchor it with.
This macro is telling you what to attach your texture to.
Code:
/run DEFAULT_CHAT_FRAME:AddMessage(GetMouseFocus():GetName())
You need to mouseover, in this case, the CastBar for example, to get the correct name.
Hope this helps.
Viryz