Well, MFC is just a wrapper around the plain Win32 API. So you could slightly modify the code from https://www.codeproject.com/Articles...rCtrl-Using-Cu removing the MFC parts and/or change it to raw Win32.
For instance the code in
Code:
 void CCustomDrawSliderCtrl::OnReflectedCustomDraw(NMHDR* pNMHDR, LRESULT* pResult)
after some changes you could place in your CALLBACK WndProc under the case of
Code:
if (lpNmhdr->code == NM_CUSTOMDRAW)