Zhiyi Zhang (@zhiyi) commented about dlls/user32/edit.c:
- INT bw, bh;
- INT bw, bh, res; ExStyle = GetWindowLongPtrW(es->hwndSelf, GWL_EXSTYLE);
- res = EDIT_is_valid_format_rect(es, rc);
- if (res == 0)
- {
GetClientRect(es->hwndSelf, &es->format_rect);
- }
- else if (res == -1)
- {
CopyRect(&es->format_rect, rc);
es->format_rect.left += 1;
es->format_rect.top += 1;
es->format_rect.right -= 1;
es->format_rect.bottom += 1;
This looks hacky. What do these ones mean? Please find a way to simplify it. It's also a bit weird that EDIT_is_valid_format_rect() returns three values.