Sundry window development

Hi all

I have developed a sundry window for a specific function.

This is not object managed, is sundry type.

I have atachments that i save the my function and that i open by code and it works fine.

When i have an atachment in that record, the paper clip remains grey, does not turn to green (as normal windows do), This is because its sundry.

How can i change the icon of the paper clip to the green one when i have the atachment? is it some global variable, system variable, i have to set? or is there a function i can call to make the icon change?

Many thanks in advance.

Luis Moreira