<?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 : Urgent problem with CXTPPropertyGridItemFont</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Property Grid : Urgent problem with CXTPPropertyGridItemFont]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Sat, 18 Apr 2026 08:37:28 +0000</pubDate>
  <lastBuildDate>Mon, 28 May 2007 07:01:18 +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=7179</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[Urgent problem with CXTPPropertyGridItemFont : Yes, will not be updated. So try...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7179&amp;PID=23281&amp;title=urgent-problem-with-cxtppropertygriditemfont#23281</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 7179<br /><strong>Posted:</strong> 28 May 2007 at 7:01am<br /><br /><P>Yes, will not be updated. So try not delete items while dialogs are visible. use code I wrote in 21 May.</P>]]>
   </description>
   <pubDate>Mon, 28 May 2007 07:01:18 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7179&amp;PID=23281&amp;title=urgent-problem-with-cxtppropertygriditemfont#23281</guid>
  </item> 
  <item>
   <title><![CDATA[Urgent problem with CXTPPropertyGridItemFont : Good. But what happens if the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7179&amp;PID=23272&amp;title=urgent-problem-with-cxtppropertygriditemfont#23272</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 7179<br /><strong>Posted:</strong> 27 May 2007 at 4:20pm<br /><br /><P>Good. But what happens if the item is deleted and re-inserted into the grid while the dialog is visible? Then its value will not be updated when the user presses OK?</P>]]>
   </description>
   <pubDate>Sun, 27 May 2007 16:20:47 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7179&amp;PID=23272&amp;title=urgent-problem-with-cxtppropertygriditemfont#23272</guid>
  </item> 
  <item>
   <title><![CDATA[Urgent problem with CXTPPropertyGridItemFont : Hi,  We added InternalAddRef();...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7179&amp;PID=23144&amp;title=urgent-problem-with-cxtppropertygriditemfont#23144</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 7179<br /><strong>Posted:</strong> 22 May 2007 at 1:19am<br /><br />Hi,<DIV>&nbsp;</DIV><DIV>We added InternalAddRef(); in begining of OnInplaceButtonDown and InternalRelease(); in the end, so even if item was removed from grid it will be deleted only in the end of OnInplaceButtonDown&nbsp; method.<BR></DIV>]]>
   </description>
   <pubDate>Tue, 22 May 2007 01:19:01 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7179&amp;PID=23144&amp;title=urgent-problem-with-cxtppropertygriditemfont#23144</guid>
  </item> 
  <item>
   <title><![CDATA[Urgent problem with CXTPPropertyGridItemFont : Yes, it works =) What kind of...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7179&amp;PID=23109&amp;title=urgent-problem-with-cxtppropertygriditemfont#23109</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 7179<br /><strong>Posted:</strong> 21 May 2007 at 7:14am<br /><br /><P>Yes, it works =)</P><P>What kind of method will you use for the mutual exclusion? Please implement a general solution that would work for a custom-made propertygrid item where a dialog is shown. Recall your Grid sample where this can be found:</P><DIV><FONT color=#0000ff size=2>virtual</FONT><FONT size=2> </FONT><FONT color=#0000ff size=2>void</FONT><FONT size=2> OnValueChanged(CString strValue)</FONT></DIV><DIV><FONT size=2>{</FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp; <FONT color=#0000ff>if</FONT> (strValue == _T(<FONT color=#800000>"&lt;Edit...&gt;"</FONT>))</FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp; {</FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT><FONT size=2>CSomeDialog dlg(m_pGrid);<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</FONT><FONT size=2>dlg.DoModal();</FONT></DIV><DIV><FONT size=2>&nbsp;&nbsp;&nbsp; }<DIV></FONT><FONT size=2>&nbsp;&nbsp;&nbsp;&nbsp;...</FONT></DIV><DIV><FONT size=2>}</FONT></DIV></DIV><DIV>&nbsp;</DIV><DIV>Thanks!</DIV>]]>
   </description>
   <pubDate>Mon, 21 May 2007 07:14:05 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7179&amp;PID=23109&amp;title=urgent-problem-with-cxtppropertygriditemfont#23109</guid>
  </item> 
  <item>
   <title><![CDATA[Urgent problem with CXTPPropertyGridItemFont : You right. Please try this changed...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7179&amp;PID=23104&amp;title=urgent-problem-with-cxtppropertygriditemfont#23104</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 7179<br /><strong>Posted:</strong> 21 May 2007 at 4:59am<br /><br />You right. Please&nbsp; try this changed method:<DIV>&nbsp;</DIV><DIV>void CDrawView::OnActivateView(BOOL bActivate, CView* pActiveView,<BR>&nbsp;CView* pDeactiveView)<BR>{<BR>&nbsp;CView::OnActivateView(bActivate, pActiveView, pDeactiveView);</DIV><DIV>&nbsp;CMainFrame* pMainFrame = (CMainFrame*)AfxGetMainWnd();&nbsp;</DIV><DIV>&nbsp;if (!bActivate &amp;&amp; !pMainFrame-&gt;IsWindowEnabled())<BR>&nbsp;&nbsp;return;</DIV><DIV>&nbsp;// invalidate selections when active status changes<BR>&nbsp;if (m_bActive != bActivate)<BR>&nbsp;{<BR>&nbsp;&nbsp;if (bActivate)&nbsp; // if becoming active update as if active<BR>&nbsp;&nbsp;&nbsp;m_bActive = bActivate;<BR>&nbsp;&nbsp;if (!m_selection.IsEmpty())<BR>&nbsp;&nbsp;&nbsp;OnUpdate(NULL, HINT_UPDATE_SELECTION, NULL);<BR>&nbsp;&nbsp;m_bActive = bActivate;</DIV><DIV>&nbsp;}</DIV><DIV>&nbsp;if (!bActivate &amp;&amp; pMainFrame-&gt;MDIGetActive() != GetParentFrame())<BR>&nbsp;{<BR>&nbsp;&nbsp;pMainFrame-&gt;UpdatePropertyGridContent(0);<BR>&nbsp;}<BR>}<BR></DIV><DIV>&nbsp;</DIV><DIV>For next maintaince release we will update our code to not crush even if item was removed while dialog is visible. </DIV><DIV>&nbsp;</DIV><DIV>Thanks, let me know it it will work for you.</DIV>]]>
   </description>
   <pubDate>Mon, 21 May 2007 04:59:15 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7179&amp;PID=23104&amp;title=urgent-problem-with-cxtppropertygriditemfont#23104</guid>
  </item> 
  <item>
   <title><![CDATA[Urgent problem with CXTPPropertyGridItemFont : No, it doesn&amp;#039;t - until I...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7179&amp;PID=23099&amp;title=urgent-problem-with-cxtppropertygriditemfont#23099</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 7179<br /><strong>Posted:</strong> 21 May 2007 at 3:00am<br /><br />No, it doesn't - until I press OK/Cancel. When I close the font dialog, <FONT size=2>UpdatePropertyGridContent is actually called <strong>before</strong> DoModal() is finished. I think this is a race condition. It might work in some cases.<DIV>&nbsp;</DIV><DIV>Any further ideas?</DIV></FONT>]]>
   </description>
   <pubDate>Mon, 21 May 2007 03:00:29 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7179&amp;PID=23099&amp;title=urgent-problem-with-cxtppropertygriditemfont#23099</guid>
  </item> 
  <item>
   <title><![CDATA[Urgent problem with CXTPPropertyGridItemFont : Strange. it works for me.  If...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7179&amp;PID=23096&amp;title=urgent-problem-with-cxtppropertygriditemfont#23096</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 7179<br /><strong>Posted:</strong> 21 May 2007 at 1:14am<br /><br />Strange. it works for me.<DIV>&nbsp;</DIV><DIV>If you set breakpoint after if (!IsWindowEnabled())&nbsp;return; in the UpdatePropertyGridContent, show font dialog box&nbsp; and switch application does it fired?</DIV>]]>
   </description>
   <pubDate>Mon, 21 May 2007 01:14:11 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7179&amp;PID=23096&amp;title=urgent-problem-with-cxtppropertygriditemfont#23096</guid>
  </item> 
  <item>
   <title><![CDATA[Urgent problem with CXTPPropertyGridItemFont : You&amp;#039;re on the right track,...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7179&amp;PID=23065&amp;title=urgent-problem-with-cxtppropertygriditemfont#23065</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 7179<br /><strong>Posted:</strong> 19 May 2007 at 7:15am<br /><br />You're on the right track, but that fix doesn't work.<DIV>&nbsp;</DIV><DIV>As soon as UpdatePropertyGridContent is called (not just from that line), the destructor of the font item is called - causing the heap error. I tried adding this in CMainFrame::UpdatePropertyGridContent():</DIV><DIV>if (!IsWindowEnabled())&nbsp;return;</DIV><DIV>&nbsp;</DIV><DIV>... but it didn't help either.</DIV>]]>
   </description>
   <pubDate>Sat, 19 May 2007 07:15:53 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7179&amp;PID=23065&amp;title=urgent-problem-with-cxtppropertygriditemfont#23065</guid>
  </item> 
  <item>
   <title><![CDATA[Urgent problem with CXTPPropertyGridItemFont : Hello, Yes, thanks, this is problem...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7179&amp;PID=23061&amp;title=urgent-problem-with-cxtppropertygriditemfont#23061</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=6851">Oleg</a><br /><strong>Subject:</strong> 7179<br /><strong>Posted:</strong> 19 May 2007 at 2:03am<br /><br /><P>Hello,</P><DIV>Yes, thanks, this is problem of sample - not code.</DIV><DIV>&nbsp;</DIV><DIV>in CDrawView::OnActivateView replace</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;if (!bActivate)<BR>&nbsp;&nbsp;((CMainFrame*)AfxGetMainWnd())-&gt;UpdatePropertyGridContent(0);<BR></DIV><DIV>to</DIV><DIV>&nbsp;if (!bActivate &amp;&amp; <strong>AfxGetMainWnd()-&gt;IsWindowEnabled())</strong><BR>&nbsp;&nbsp;((CMainFrame*)AfxGetMainWnd())-&gt;UpdatePropertyGridContent(0);<BR></DIV>]]>
   </description>
   <pubDate>Sat, 19 May 2007 02:03:38 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7179&amp;PID=23061&amp;title=urgent-problem-with-cxtppropertygriditemfont#23061</guid>
  </item> 
  <item>
   <title><![CDATA[Urgent problem with CXTPPropertyGridItemFont : Open the DrawClient sample, open...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=7179&amp;PID=23052&amp;title=urgent-problem-with-cxtppropertygriditemfont#23052</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2198">znakeeye</a><br /><strong>Subject:</strong> 7179<br /><strong>Posted:</strong> 18 May 2007 at 7:27pm<br /><br />Open the DrawClient sample, open MainFrm.cpp and go to line 264. <DIV>Then add this:</DIV><DIV>&nbsp;</DIV><DIV>LOGFONT lf = { 0 };<BR>pCategorySelected-&gt;AddChildItem(new CXTPPropertyGridItemFont(_T("font test"), lf));</DIV><DIV>&nbsp;</DIV><DIV>Debug the application and then click on button of the newly added font property. The font dialog appears. Now Alt+Tab to another application. Switch back to the font dialog and press ok. <strong>BOOM! We get a heap error at line 164 in xtppropertygriditemfont.cpp:</strong></DIV><DIV><FONT color=#040004 size=2>CString</FONT><FONT size=2> </FONT><FONT color=#040004 size=2>strValue</FONT><FONT size=2> = </FONT><FONT color=#040004 size=2>FontToString</FONT><FONT size=2>(</FONT><FONT color=#040004 size=2>lf</FONT><FONT size=2>);</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>In some cases you break deep inside the C heap library. What's going on here?</FONT></DIV><DIV><FONT size=2></FONT>&nbsp;</DIV><DIV><FONT size=2>Please help!</DIV></FONT>]]>
   </description>
   <pubDate>Fri, 18 May 2007 19:27:45 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=7179&amp;PID=23052&amp;title=urgent-problem-with-cxtppropertygriditemfont#23052</guid>
  </item> 
 </channel>
</rss>