<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : OCX + WM_SIZE magic</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Controls : OCX + WM_SIZE magic]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 01:04:02 +0000</pubDate>
  <lastBuildDate>Thu, 21 Jan 2010 09:11:27 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=16028</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[OCX + WM_SIZE magic : Do you add the control via the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16028&amp;PID=56264&amp;title=ocx-wm-size-magic#56264</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=3213">rdhd</a><br /><strong>Subject:</strong> 16028<br /><strong>Posted:</strong> 21 January 2010 at 9:11am<br /><br /><P>Do you add the control via the resource editor (drag and drop) or are you doing it via code? If not using the editor, try that in a sample app&nbsp;and then see if there are any messages such as your size message sent to the control.</P>]]>
   </description>
   <pubDate>Thu, 21 Jan 2010 09:11:27 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16028&amp;PID=56264&amp;title=ocx-wm-size-magic#56264</guid>
  </item> 
  <item>
   <title><![CDATA[OCX + WM_SIZE magic :  Often when I put an OCX control...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=16028&amp;PID=56188&amp;title=ocx-wm-size-magic#56188</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 16028<br /><strong>Posted:</strong> 17 January 2010 at 8:08pm<br /><br /><FONT color=#010001 size=2><FONT color=#010001 size=2><DIV>Often when I put an OCX control inside a dialog, the border of the control is not painted correctly. I've seen this quite often, so I thought it's time to find the root cause!</DIV><DIV>&nbsp;</DIV><DIV>The solution has always been to explicitly send a WM_SIZE message (no other trick seems to work):</DIV><DIV>&nbsp;</DIV><DIV>CRect</FONT></FONT><FONT size=2> </FONT><FONT color=#010001 size=2><FONT color=#010001 size=2>rect</FONT></FONT><FONT size=2>;</FONT></DIV><DIV><FONT color=#010001 size=2><FONT color=#010001 size=2>m_htmlCtrl</FONT></FONT><FONT size=2>.</FONT><FONT color=#010001 size=2><FONT color=#010001 size=2>GetClientRect</FONT></FONT><FONT size=2>(</FONT><FONT color=#010001 size=2><FONT color=#010001 size=2>rect</FONT></FONT><FONT size=2>);</FONT></DIV><DIV><FONT color=#010001 size=2><FONT color=#010001 size=2>m_htmlCtrl</FONT></FONT><FONT size=2>.</FONT><FONT color=#010001 size=2><FONT color=#010001 size=2>SendMessage</FONT></FONT><FONT size=2>(</FONT><FONT color=#010001 size=2><FONT color=#010001 size=2>WM_SIZE</FONT></FONT><FONT size=2>, </FONT><FONT color=#010001 size=2><FONT color=#010001 size=2>SIZE_RESTORED</FONT></FONT><FONT size=2>, </FONT><FONT color=#010001 size=2><FONT color=#010001 size=2>MAKELPARAM</FONT></FONT><FONT size=2>(</FONT><FONT color=#010001 size=2><FONT color=#010001 size=2>rect</FONT></FONT><FONT size=2>.</FONT><FONT color=#010001 size=2><FONT color=#010001 size=2>Width</FONT></FONT><FONT size=2>(), </FONT><FONT color=#010001 size=2><FONT color=#010001 size=2>rect</FONT></FONT><FONT size=2>.</FONT><FONT color=#010001 size=2><FONT color=#010001 size=2>Height</FONT></FONT><FONT size=2>()));</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>I tried to find the underlying problem and found out that the desired rectangle was always decreased by 4 pixels (width and height). Strange.</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>Any ideas? I really dislike the hack above :(</DIV></FONT>]]>
   </description>
   <pubDate>Sun, 17 Jan 2010 20:08:32 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=16028&amp;PID=56188&amp;title=ocx-wm-size-magic#56188</guid>
  </item> 
 </channel>
</rss>