<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Hi,</p>
<p>Please include your tests in the same patch, or use series
notation of format-patch/send-email.</p>
<p>
<blockquote type="cite">
<pre style="color: rgb(0, 0, 0); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: start; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-style: initial; text-decoration-color: initial; overflow-wrap: break-word; white-space: pre-wrap;">+ siz.cx = rc.right - rc.left;
+ siz.cy = rc.bottom - rc.top;
+
+ if (rc.right > mi.rcWork.right)
+ {
+ rc.right = mi.rcWork.right;
+ rc.left = rc.right - siz.cx;
+ }
+ if (rc.bottom > mi.rcWork.bottom)
+ {
+ rc.bottom = mi.rcWork.bottom;
+ rc.top = rc.bottom - siz.cy;
+ }
+
+ if (rc.left < mi.rcWork.left)
+ {
+ rc.left = mi.rcWork.left;
+ rc.right = rc.left + siz.cx;
+ }
+ if (rc.top < mi.rcWork.top)
+ {
+ rc.top = mi.rcWork.top;
+ rc.bottom = rc.top + siz.cy;
+ }
+
+ SetWindowPos(hwnd, NULL, rc.left, rc.top, 0, 0,
+ SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE |
+ SWP_NOZORDER);</pre>
</blockquote>
You only need (x,y) coordinates - no need to set 'bottom' or
'right', so it could be reduced to a several min/max calls. Also
please change 'siz' -> 'size'.<br>
</p>
</body>
</html>