On Wednesday, 17 March 2021 at 00:51:05 UTC, Vinod K Chandran
wrote:
On Tuesday, 16 March 2021 at 19:42:26 UTC, Imperatorn wrote:
At last, i found the answer myself. There is a item called
dwDrawStage in NMCUSTOMDRAW structure. If value of dwDrawStage
is equal to CDDS_PREERASE, call SetBkMode with transparent and
call SetTextColor. Then draw text with DrawText function. And
finally, return CDRF_NOTIFYPOSTPAINT. In short, do the color
changing process in pre-erase stage and return
CDRF_NOTIFYPOSTPAINT constant. As per MSDN, What this constant
means is,
The control will notify the parent after painting an item.
This occurs when the dwDrawStage of the NMCUSTOMDRAW
structure equals CDDS_PREPAINT.
Good that you solved it, that wasn't what I thought the solution
would be 👀
Was more than 10 years ago since I was "the king of win api" 😔