Thank you Kas Op.
InvalidateRect
is not applicable for my purposes because I need the repainting immediately.
WM_DrawItem
Interesting.
However the part with the DRAWITEMSTRUCT sounds a bit complex (for me) (Pic1.jpg).
Seems that needs comparable efforts as my Procedure.
Just for Info:
In my StatusBar I can drag a panel to certain other positions, and I draw the dragged panel with different colors compared to other panels (Pic2.jpg).
I don't see theming or skinning involved in the Pic2, and that means you have an advantage of using the timer at 20ms which most likely will be between 20ms-31ms, if you send WM_PAINT to the status bar by timer with InvalidateRect, you will not see any noticeable CPU usage.
My reason here is that you have many parts and combining them all in one draw is the best, and also the timer will ensure the update close to 60hz and will be smooth without affecting the overall performance, and that of course if you are not doing heavy processing/logic when custom draw is invoked.