Really nice code.
Just curious, have you ever tried using MTS themes? They give you the same freedom for this code as a dialog, but they are much easier to work with.