I realized that this patch can't work this way because AdjustWindowRectEx doesn't respect CW_USEDEFAULT. Working around that is more involved. Anyway, please don't apply the above patch.