<?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 : GetEditCtrl()-&gt;GetWindowText crash</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Toolkit Pro : GetEditCtrl()-&gt;GetWindowText crash]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Mon, 20 Apr 2026 01:25:16 +0000</pubDate>
  <lastBuildDate>Fri, 03 Jan 2014 10:51:08 +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=22148</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[GetEditCtrl()-&gt;GetWindowText crash : It could be that the combo box...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22148&amp;PID=72165&amp;title=geteditctrlgetwindowtext-crash#72165</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1">kstowell</a><br /><strong>Subject:</strong> 22148<br /><strong>Posted:</strong> 03 January 2014 at 10:51am<br /><br />It could be that the combo box is a drop list in that case it would not have an edit control. &nbsp;You might want to try something like this:<div><br></div><div><table width="99%"><tr><td><pre class="BBcode"></div><div><div>CXTPControls* pXTPControls = m_myWndToolBar.GetControls();</div><div>if (pXTPControls)</div><div>&nbsp; &nbsp; return false;</div><div><br></div><div>CXTPControlComboBox* pXTPComboBox =(CXTPControlComboBox*)pXTPControls -&gt;FindControl(ID_ZOOM);</div><div>if (!pXTPComboBox)</div><div>&nbsp; &nbsp; return false;</div><div><br></div><div>CString strZoom;</div><div>CXTPControlComboBoxEditCtrl* pXTPEdit = pXTPComboBox-&gt;GetEditCtrl();</div><div>if (pXTPEdit)</div><div>&nbsp; &nbsp; strZoom = pXTPComboBox-&gt;GetEditText();</div><div>else</div><div>&nbsp; &nbsp; strZoom = pXTPComboBox-&gt;GetListBoxText();</div></div><div><span style="line-height: 1.4;"></pre></td></tr></table></span></div>]]>
   </description>
   <pubDate>Fri, 03 Jan 2014 10:51:08 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22148&amp;PID=72165&amp;title=geteditctrlgetwindowtext-crash#72165</guid>
  </item> 
  <item>
   <title><![CDATA[GetEditCtrl()-&gt;GetWindowText crash : Code snippet is as below:CXTPControls*...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=22148&amp;PID=72160&amp;title=geteditctrlgetwindowtext-crash#72160</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8615">mathewteena</a><br /><strong>Subject:</strong> 22148<br /><strong>Posted:</strong> 26 December 2013 at 1:29pm<br /><br />Code snippet is as below:<div><br></div><div><div>CXTPControls* pXTPControls = m_myWndToolBar.GetControls();</div><div><span ="Apple-tab-span" style="white-space:pre">	</span>if (!pXTPControls&nbsp;)</div><div>&nbsp; &nbsp; <span ="Apple-tab-span" style="white-space:pre">		</span>return false;</div><div><br></div><div>&nbsp; CXTPControlComboBox* pXTPComboBox =(CXTPControlComboBox*)pXTPControls&nbsp;-&gt;FindControl(ID_ZOOM);</div><div>&nbsp; &nbsp;</div><div>&nbsp; &nbsp;if (!pXTPComboBox&nbsp;)</div><div>&nbsp; &nbsp; <span ="Apple-tab-span" style="white-space:pre">	</span>return false;</div><div>&nbsp;</div><div>&nbsp; &nbsp; CString strZoom;</div><div>&nbsp; <b>&nbsp;&nbsp;pXTPComboBox&nbsp;-&gt;GetEditCtrl()-&gt;GetWindowText(strZoom);</b></div></div><div><b><u><br></u></b></div><div>The line in the snippet that has been marked as bold causes a crash. I suspect that GetEditCtrl returns NULL( or invalid pointer) which leads to GetWindowText() to crash.</div><div><br></div><div>What could be the possible reasons for GetEditCtrl returning invalid pointer?</div>]]>
   </description>
   <pubDate>Thu, 26 Dec 2013 13:29:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=22148&amp;PID=72160&amp;title=geteditctrlgetwindowtext-crash#72160</guid>
  </item> 
 </channel>
</rss>