I have tested SetViewportOrgEx SetWorldTransform which work perfectly. Could you please show a minimal, reproducible sample without private information?
case WM_PAINT:
{
PAINTSTRUCT ps;
HDC hdc = BeginPaint(hWnd, &ps);
// TODO: Add any drawing code that uses hdc here...
//SetRect(&rc, 0, 0, 100, 100);
GetClientRect(hWnd,&rc);
SetViewportOrgEx(hdc, rc.right / 2, rc.bottom / 2, NULL);
if (RectVisible(hdc, &rc))
{
//Polyline(hdc, aptRectangle, 5);
Ellipse(hdc, ( - 100), ( + 50),( + 100), ( - 50));
SetGraphicsMode(hdc, GM_ADVANCED);
XFORM xForm;
xForm.eM11 = (FLOAT)0.8660;
xForm.eM12 = (FLOAT)0.5000;
xForm.eM21 = (FLOAT)-0.5000;
xForm.eM22 = (FLOAT)0.8660;
xForm.eDx = (FLOAT)0.0;
xForm.eDy = (FLOAT)0.0;
SetWorldTransform(hdc, &xForm);
Ellipse(hdc, (-100), (+50), (+100), (-50));
}
EndPaint(hWnd, &ps);
}
break;