Control de botón de radio transparente con temas usando Win32

Estoy tratando de hacer un control de botón de radio con un fondo transparente usando solo Win32 cuando los temas están habilitados. La razón para hacerlo es permitir que se coloque un botón de radio sobre una imagen y que se muestre la imagen (en lugar del fondo gris de control predeterminado).

o que sucede fuera de la caja es que el control tendrá el fondo gris de control predeterminado y el método estándar para cambiar esto manejando ya seaWM_CTLCOLORSTATIC oWM_CTLCOLORBTN como se muestra a continuación no funciona:

case WM_CTLCOLORSTATIC:
    hdcStatic = (HDC)wParam;

    SetTextColor(hdcStatic, RGB(0,0,0)); 
    SetBkMode(hdcStatic,TRANSPARENT);

    return (LRESULT)GetStockObject(NULL_BRUSH);
    break;  

Mi investigación hasta ahora indica que Propietario Draw es la única forma de lograr esto. Me las arreglé para obtener la mayor parte del camino con un botón de opción Propietario: con el siguiente código, tengo un botón de opción y un fondo transparente (el fondo se establece enWM_CTLCOLORBTN). Sin embargo, los bordes de la verificación de radio se cortan utilizando este método: puedo recuperarlos descomentando la llamada a la funciónDrawThemeParentBackgroundEx pero esto rompe la transparencia.

void DrawRadioControl(HWND hwnd, HTHEME hTheme, HDC dc, bool checked, RECT rcItem)
{
    if (hTheme)
    {
      static const int cb_size = 13;

      RECT bgRect, textRect;
      HFONT font = (HFONT)SendMessageW(hwnd, WM_GETFONT, 0, 0);
      WCHAR *text = L"Experiment";

      DWORD state = ((checked) ? RBS_CHECKEDNORMAL : RBS_UNCHECKEDNORMAL) | ((bMouseOverButton) ? RBS_HOT : 0); 

      GetClientRect(hwnd, &bgRect);
      GetThemeBackgroundContentRect(hTheme, dc, BP_RADIOBUTTON, state, &bgRect, &textRect);

      DWORD dtFlags = DT_VCENTER | DT_SINGLELINE;

      if (dtFlags & DT_SINGLELINE) /* Center the checkbox / radio button to the text. */
         bgRect.top = bgRect.top + (textRect.bottom - textRect.top - cb_size) / 2;

      /* adjust for the check/radio marker */
      bgRect.bottom = bgRect.top + cb_size;
      bgRect.right = bgRect.left + cb_size;
      textRect.left = bgRect.right + 6;

      //Uncommenting this line will fix the button corners but breaks transparency
      //DrawThemeParentBackgroundEx(hwnd, dc, DTPB_USECTLCOLORSTATIC, NULL);

      DrawThemeBackground(hTheme, dc, BP_RADIOBUTTON, state, &bgRect, NULL);
      if (text)
      {
          DrawThemeText(hTheme, dc, BP_RADIOBUTTON, state, text, lstrlenW(text), dtFlags, 0, &textRect);

      }

   }
   else
   {
       // Code for rendering the radio when themes are not present
   }

}

El método anterior se llama desde WM_DRAWITEM como se muestra a continuación:

case WM_DRAWITEM:
{
    LPDRAWITEMSTRUCT pDIS = (LPDRAWITEMSTRUCT)lParam;
    hTheme = OpenThemeData(hDlg, L"BUTTON");    

    HDC dc = pDIS->hDC;

    wchar_t sCaption[100];
    GetWindowText(GetDlgItem(hDlg, pDIS->CtlID), sCaption, 100);
    std::wstring staticText(sCaption);

    DrawRadioControl(pDIS->hwndItem, hTheme, dc, radio_group.IsButtonChecked(pDIS->CtlID), pDIS->rcItem, staticText);                               

    SetBkMode(dc, TRANSPARENT);
    SetTextColor(hdcStatic, RGB(0,0,0));                                
    return TRUE;

}                           

Así que mi pregunta son dos partes, supongo:

¿He perdido alguna otra forma de lograr el resultado deseado? ¿Es posible solucionar el problema de las esquinas de los botones recortados con mi código y todavía tener un fondo transparente

Respuestas a la pregunta(2)

Su respuesta a la pregunta