<html>
<head>
<style>
<!--
body { background-color:#ffffff }
.file { border:1px solid #eeeeee; margin-top:1em; margin-bottom:1em }
.pathname { font-family:monospace; float:right }
.fileheader { margin-bottom:.5em }
.diff { margin:0 }
.tasklist { padding:4px; border:1px dashed #000000; margin-top:1em }
.tasklist ul { margin-top:0; margin-bottom:0 }
tr.alt { background-color:#eeeeee }
#added { background-color:#ddffdd }
#addedchars { background-color:#99ff99; font-weight:bolder }
tr.alt #added { background-color:#ccf7cc }
#removed { background-color:#ffdddd }
#removedchars { background-color:#ff9999; font-weight:bolder }
tr.alt #removed { background-color:#f7cccc }
#info { color:#888888 }
#context { background-color:#eeeeee }
td {padding-left:.3em; padding-right:.3em }
tr.head { border-bottom-width:1px; border-bottom-style:solid }
tr.head td { padding:0; padding-top:.2em }
.task { background-color:#ffff00 }
.comment { padding:4px; border:1px dashed #000000; background-color:#ffffdd }
.error { color:red }
hr { border-width:0px; height:2px; background:black }
-->
</style>
</head>
<body>
<pre class="comment">handle resizing of the control</pre><pre class="diff" id="context">Modified: trunk/reactos/lib/aclui/checklist.c
</pre><hr /><div class="file">
<div class="fileheader"><big><b>Modified: trunk/reactos/lib/aclui/checklist.c</b></big></div>
<pre class="diff"><small id="info">--- trunk/reactos/lib/aclui/checklist.c        2005-07-04 09:46:50 UTC (rev 16405)
+++ trunk/reactos/lib/aclui/checklist.c        2005-07-04 11:05:04 UTC (rev 16406)
@@ -63,8 +63,8 @@
</small></pre><pre class="diff" id="context"> #endif
 } CHECKLISTWND, *PCHECKLISTWND;
 
</pre><pre class="diff" id="removed">-#define CI_TEXT_MARGIN_WIDTH &nbsp; &nbsp;(6)
-#define CI_TEXT_MARGIN_<span id="removedchars">HEIGHT &nbsp; (2</span>)
</pre><pre class="diff" id="added">+#define CI_TEXT_MARGIN_<span id="addedchars">WIDTH &nbsp; &nbsp;(8</span>)
+#define CI_TEXT_MARGIN_HEIGHT &nbsp; (3)
</pre><pre class="diff" id="context"> 
 static PCHECKITEM
 FindCheckItemByIndex(IN PCHECKLISTWND infoPtr,
@@ -153,10 +153,9 @@
</pre><pre class="diff" id="context"> &nbsp; &nbsp; {
 &nbsp; &nbsp; &nbsp; &nbsp; /* return the Deny checkbox in case both check boxes are enabled! */
 &nbsp; &nbsp; &nbsp; &nbsp; *CheckBox = ((!(LastEnabledItem-&gt;State &amp; CIS_DENYDISABLED)) ? CLB_DENY : CLB_ALLOW);
</pre><pre class="diff" id="removed">- &nbsp; &nbsp; &nbsp; &nbsp;return LastEnabledItem;
</pre><pre class="diff" id="context"> &nbsp; &nbsp; }
 
</pre><pre class="diff" id="removed">- &nbsp; &nbsp;return <span id="removedchars">NULL</span>;
</pre><pre class="diff" id="added">+ &nbsp; &nbsp;return <span id="addedchars">LastEnabledItem</span>;
</pre><pre class="diff" id="context"> }
 
 static PCHECKITEM
@@ -631,7 +630,7 @@
</pre><pre class="diff" id="context"> &nbsp; &nbsp; &nbsp; &nbsp; }
 &nbsp; &nbsp; &nbsp; &nbsp; else
 &nbsp; &nbsp; &nbsp; &nbsp; {
</pre><pre class="diff" id="removed">- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;height = <span id="removedchars">0</span>;
</pre><pre class="diff" id="added">+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;height = <span id="addedchars">2</span>;
</pre><pre class="diff" id="context"> &nbsp; &nbsp; &nbsp; &nbsp; }
 
 &nbsp; &nbsp; &nbsp; &nbsp; SelectObject(hdc,
@@ -655,7 +654,7 @@
</pre><pre class="diff" id="context"> &nbsp; &nbsp; 
 &nbsp; &nbsp; if (hOldFont != hFont)
 &nbsp; &nbsp; {
</pre><pre class="diff" id="removed">- &nbsp; &nbsp; &nbsp; &nbsp;infoPtr-&gt;ItemHeight = <span id="removedchars">4</span> + GetIdealItemHeight(infoPtr);
</pre><pre class="diff" id="added">+ &nbsp; &nbsp; &nbsp; &nbsp;infoPtr-&gt;ItemHeight = <span id="addedchars">(2 * CI_TEXT_MARGIN_HEIGHT)</span> + GetIdealItemHeight(infoPtr);
</pre><pre class="diff" id="context"> &nbsp; &nbsp; }
 
 &nbsp; &nbsp; UpdateControl(infoPtr,
@@ -762,7 +761,7 @@
</pre><pre class="diff" id="context"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Item != NULL &amp;&amp; CurrentIndex &lt;= LastTouchedIndex;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Item = Item-&gt;Next, CurrentIndex++)
 &nbsp; &nbsp; &nbsp; &nbsp; {
</pre><pre class="diff" id="removed">- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TextRect.bottom = TextRect.top + infoPtr-&gt;ItemHeight;
</pre><pre class="diff" id="added">+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TextRect.bottom = TextRect.top + infoPtr-&gt;ItemHeight<span id="addedchars"> - (2 * CI_TEXT_MARGIN_HEIGHT)</span>;
</pre><pre class="diff" id="context"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ItemRect.bottom = ItemRect.top + infoPtr-&gt;ItemHeight;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; SetBrushOrgEx(hDC,
@@ -789,15 +788,16 @@
</pre><pre class="diff" id="context"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&amp;TextRect,
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;DT_LEFT | DT_NOPREFIX | DT_SINGLELINE | DT_VCENTER);
 
</pre><pre class="diff" id="added">+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CheckBox.top = TextRect.top;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CheckBox.bottom = TextRect.bottom;
+
</pre><pre class="diff" id="context"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /* draw the Allow checkbox */
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; IsPushed = (Enabled &amp;&amp; Item == infoPtr-&gt;FocusedCheckItem &amp;&amp; infoPtr-&gt;HasFocus &amp;&amp;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; !(Item-&gt;State &amp; CIS_ALLOWDISABLED) &amp;&amp; infoPtr-&gt;FocusedCheckItemBox != CLB_DENY &amp;&amp;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; infoPtr-&gt;FocusedPushed);
 
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CheckBox.left = infoPtr-&gt;CheckBoxLeft[CLB_ALLOW] - ((TextRect.bottom - TextRect.top) / 2);
</pre><pre class="diff" id="removed">- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CheckBox.right = CheckBox.left + (TextRect.bottom - TextRect.top) - (2 * CI_TEXT_MARGIN_HEIGHT);
- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CheckBox.top = TextRect.top;
- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CheckBox.<span id="removedchars">bottom = CheckBox.top + (TextRect.bottom - TextRect.top) - (2 * CI_TEXT_MARGIN_HEIGHT</span>);
</pre><pre class="diff" id="added">+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CheckBox.<span id="addedchars">right = CheckBox.left + (TextRect.bottom - TextRect.top</span>);
</pre><pre class="diff" id="context"> #if SUPPORT_UXTHEME
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (infoPtr-&gt;ThemeHandle != NULL)
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {
@@ -853,7 +853,7 @@
</pre><pre class="diff" id="context"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; infoPtr-&gt;FocusedPushed);
 
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; CheckBox.left = infoPtr-&gt;CheckBoxLeft[CLB_DENY] - ((TextRect.bottom - TextRect.top) / 2);
</pre><pre class="diff" id="removed">- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CheckBox.right = CheckBox.left + (TextRect.bottom - TextRect.top)<span id="removedchars"> - (2 * CI_TEXT_MARGIN_HEIGHT)</span>;
</pre><pre class="diff" id="added">+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CheckBox.right = CheckBox.left + (TextRect.bottom - TextRect.top);
</pre><pre class="diff" id="context"> #if SUPPORT_UXTHEME
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (infoPtr-&gt;ThemeHandle != NULL)
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {
@@ -1111,7 +1111,7 @@
</pre><pre class="diff" id="context"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 
 #if SUPPORT_UXTHEME
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /* handle hovering checkboxes */
</pre><pre class="diff" id="removed">- &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (hWndCapture == NULL)
</pre><pre class="diff" id="added">+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if (hWndCapture == NULL<span id="addedchars"> &amp;&amp; infoPtr-&gt;ThemeHandle != NULL</span>)
</pre><pre class="diff" id="context"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TRACKMOUSEEVENT tme;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; PCHECKITEM HotTrackItem;
@@ -1547,6 +1547,8 @@
</pre><pre class="diff" id="context"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; infoPtr-&gt;HasFocus = FALSE;
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (infoPtr-&gt;FocusedCheckItem != NULL)
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {
</pre><pre class="diff" id="added">+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;infoPtr-&gt;FocusedPushed = FALSE;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</pre><pre class="diff" id="context"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; UpdateCheckItem(infoPtr,
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; infoPtr-&gt;FocusedCheckItem);
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }
@@ -1836,6 +1838,13 @@
</pre><pre class="diff" id="context"> #endif
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; break;
 &nbsp; &nbsp; &nbsp; &nbsp; }
</pre><pre class="diff" id="added">+ &nbsp; &nbsp; &nbsp; &nbsp;
+ &nbsp; &nbsp; &nbsp; &nbsp;case WM_SIZE:
+ &nbsp; &nbsp; &nbsp; &nbsp;{
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;UpdateControl(infoPtr,
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;TRUE);
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break;
+ &nbsp; &nbsp; &nbsp; &nbsp;}
</pre><pre class="diff" id="context"> 
 &nbsp; &nbsp; &nbsp; &nbsp; case WM_CREATE:
 &nbsp; &nbsp; &nbsp; &nbsp; {
</pre>
</div>

</body>
</html>