Trying to vertically center/align the text in an edit control (Win32 API, pure C, no MFC) but with no luck. Tried solutions from other answers such as this one or this and other quite old forums around, but no luck:
I could reduce the height of the control, but this is just a workaround. I don't want to make it multi-line. Code to create the control:
CreateWindowW(L"Edit", NULL,
WS_CHILD | WS_VISIBLE | WS_BORDER,
MulDiv(LOWORD(units), 50, 4), 0,
MulDiv(LOWORD(units), 150, 4),
MulDiv(HIWORD(units), 14, 8),
hwnd, NULL, NULL, NULL);
Question: is there really no way to vertically align the text?