The altered project is attached with two components side-by-side so you can compare the two handlers written by you and me.
The code I showed is not complete. It has various flaws, and does not paint some things correctly or completely.
A correct solution would require a deeper understanding than I have of the the various painting stages (cdPrePaint, cdPostPaint, cdPreErase, cdPostErase) and drawing states (cdsSelected, cdsGrayed, cdsDisabled, dsChecked, cdsFocused, cdsDefault, cdsHot, cdsMarked, cdsIndeterminate) that the advanced handler uses.
This would require you or me digging into the sources (which I do not have the time or motivation to do), or the skills of one of the developers who wrote the code. He could explain how to exploit it to do what you are after perfectly. Perhaps such a person will read this and be more help to you.