Okay, a minor bug fix.
It seems that you need BOTH lines in the template.
Make sure that you have BOTH of these lines in the template code that you add to "privmsg" - the first one is needed for the delete box to work, the second one for the icon to change to SENT when a message is replied to.
Code:
<input type="hidden" name="privatemessageid" value="$privatemessageid">
<input type="hidden" name="prevmessageid" value="$privatemessageid">
Sorry about this.

I knew that the first line was there for a reason!