<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments for C++ Programming</title>
	<link>http://zitomerconsulting.com/WordPress</link>
	<description>Windows, Web and Stuff</description>
	<pubDate>Thu, 24 Jul 2008 07:15:02 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
		<item>
		<title>Comment on Dealing with Vista&#8217;s Low Cookies by Bill Zitomer</title>
		<link>http://zitomerconsulting.com/WordPress/2007/09/11/dealing-with-vistas-low-integrity-cookies/#comment-198</link>
		<dc:creator>Bill Zitomer</dc:creator>
		<pubDate>Thu, 27 Dec 2007 15:03:31 +0000</pubDate>
		<guid>http://zitomerconsulting.com/WordPress/2007/09/11/dealing-with-vistas-low-integrity-cookies/#comment-198</guid>
		<description>You'll need to install the SDK for Vista to get the new structs: http://www.microsoft.com/downloads/details.aspx?familyid=4377f86d-c913-4b5c-b87e-ef72e5b4e065&#038;displaylang=en. Keep in mind that some API functions won't work on other versions of Windows. I had to make some calls runtime linked after checking if running on Vista or not.</description>
		<content:encoded><![CDATA[<p>You&#8217;ll need to install the SDK for Vista to get the new structs: <a href="http://www.microsoft.com/downloads/details.aspx?familyid=4377f86d-c913-4b5c-b87e-ef72e5b4e065&#038;displaylang=en." rel="nofollow">http://www.microsoft.com/downloads/details.aspx?familyid=4377f86d-c913-4b5c-b87e-ef72e5b4e065&#038;displaylang=en.</a> Keep in mind that some API functions won&#8217;t work on other versions of Windows. I had to make some calls runtime linked after checking if running on Vista or not.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Dealing with Vista&#8217;s Low Cookies by Bob Zhong</title>
		<link>http://zitomerconsulting.com/WordPress/2007/09/11/dealing-with-vistas-low-integrity-cookies/#comment-197</link>
		<dc:creator>Bob Zhong</dc:creator>
		<pubDate>Thu, 27 Dec 2007 08:48:31 +0000</pubDate>
		<guid>http://zitomerconsulting.com/WordPress/2007/09/11/dealing-with-vistas-low-integrity-cookies/#comment-197</guid>
		<description>hi, Bill Zitomer
    Thanks for you article, it's very useful to me. But There have a problem.  I write the code to run  low integrity mode from msdn in step 2, and the structure  TOKEN_MANDATORY_LABEL is undeclare identify. I include the header of windows.h. But it seems no use.  Hope you can give me same advice. Thank you!  waitting for you respones.</description>
		<content:encoded><![CDATA[<p>hi, Bill Zitomer<br />
    Thanks for you article, it&#8217;s very useful to me. But There have a problem.  I write the code to run  low integrity mode from msdn in step 2, and the structure  TOKEN_MANDATORY_LABEL is undeclare identify. I include the header of windows.h. But it seems no use.  Hope you can give me same advice. Thank you!  waitting for you respones.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on MFC and Multiple Inheritance by Bill Zitomer</title>
		<link>http://zitomerconsulting.com/WordPress/2007/10/11/mfc-and-multiple-inheritance/#comment-26</link>
		<dc:creator>Bill Zitomer</dc:creator>
		<pubDate>Fri, 12 Oct 2007 16:46:38 +0000</pubDate>
		<guid>http://zitomerconsulting.com/WordPress/2007/10/11/mfc-and-multiple-inheritance/#comment-26</guid>
		<description>I know, not my choice to use MFC either. Yeah I saw your name on Steve's blogroll. Thanks for the conversation! :)</description>
		<content:encoded><![CDATA[<p>I know, not my choice to use MFC either. Yeah I saw your name on Steve&#8217;s blogroll. Thanks for the conversation! <img src='http://zitomerconsulting.com/WordPress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Deleting Browser History by Bill Zitomer</title>
		<link>http://zitomerconsulting.com/WordPress/2007/10/12/deleting-browser-history/#comment-25</link>
		<dc:creator>Bill Zitomer</dc:creator>
		<pubDate>Fri, 12 Oct 2007 16:44:06 +0000</pubDate>
		<guid>http://zitomerconsulting.com/WordPress/2007/10/12/deleting-browser-history/#comment-25</guid>
		<description>That's a good point, I've seen that section but never thought to write to it.</description>
		<content:encoded><![CDATA[<p>That&#8217;s a good point, I&#8217;ve seen that section but never thought to write to it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Deleting Browser History by Aaron Ballman</title>
		<link>http://zitomerconsulting.com/WordPress/2007/10/12/deleting-browser-history/#comment-24</link>
		<dc:creator>Aaron Ballman</dc:creator>
		<pubDate>Fri, 12 Oct 2007 16:11:37 +0000</pubDate>
		<guid>http://zitomerconsulting.com/WordPress/2007/10/12/deleting-browser-history/#comment-24</guid>
		<description>It always sucks when the docs are vague, but you can use the community content to beg for clarification.  I've seen them respond in there and modify the docs from it a few times, so it may be worth trying.  Won't help in the short term though.</description>
		<content:encoded><![CDATA[<p>It always sucks when the docs are vague, but you can use the community content to beg for clarification.  I&#8217;ve seen them respond in there and modify the docs from it a few times, so it may be worth trying.  Won&#8217;t help in the short term though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on MFC and Multiple Inheritance by Aaron Ballman</title>
		<link>http://zitomerconsulting.com/WordPress/2007/10/11/mfc-and-multiple-inheritance/#comment-23</link>
		<dc:creator>Aaron Ballman</dc:creator>
		<pubDate>Fri, 12 Oct 2007 16:03:42 +0000</pubDate>
		<guid>http://zitomerconsulting.com/WordPress/2007/10/11/mfc-and-multiple-inheritance/#comment-23</guid>
		<description>Weird...well, I've always avoided MFC whenever possible, so this is entirely likely to be out of my scope.  I hate MFC and don't envy you!  ;-)

In any event, nice blog!  Steve pointed it out to me, in case you're wondering where I came from.  :-)</description>
		<content:encoded><![CDATA[<p>Weird&#8230;well, I&#8217;ve always avoided MFC whenever possible, so this is entirely likely to be out of my scope.  I hate MFC and don&#8217;t envy you!  <img src='http://zitomerconsulting.com/WordPress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>In any event, nice blog!  Steve pointed it out to me, in case you&#8217;re wondering where I came from.  <img src='http://zitomerconsulting.com/WordPress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on MFC and Multiple Inheritance by Bill Zitomer</title>
		<link>http://zitomerconsulting.com/WordPress/2007/10/11/mfc-and-multiple-inheritance/#comment-22</link>
		<dc:creator>Bill Zitomer</dc:creator>
		<pubDate>Fri, 12 Oct 2007 15:46:30 +0000</pubDate>
		<guid>http://zitomerconsulting.com/WordPress/2007/10/11/mfc-and-multiple-inheritance/#comment-22</guid>
		<description>Well, yeah, the virtual base class is what would make this work, but the problem is you get compile errors because of how MFC is implemented (something to do with the message mapping). That was one of the articles I linked (the one that says MI is not required for serious applications).

The reason I want to do it this way, is because 95% of the code for my control class is the same. It's mainly one method which reads the dialog control info from a file - the text, color, font, position, etc. So all of that code fits nicely in my base class, and from the outside I just need to call a generic LoadFromFile method, and the class does everything. The descendant classes can override this method to add any special items, like a flag for a checkbox for instance.

There are some other basic methods, like adding a bitmap, which one control might handle differently than another.

My solution to use GetCWnd() method to get the class ptr I need is not so bad. The thing I'm more unhappy about is not being able to implement message handlers such as CtlColor and OnSetCursor in the base class. If I've got 5 control classes, now I have 5 copies of the same handlers. I loathe redundant code, it keeps me up at night. :)</description>
		<content:encoded><![CDATA[<p>Well, yeah, the virtual base class is what would make this work, but the problem is you get compile errors because of how MFC is implemented (something to do with the message mapping). That was one of the articles I linked (the one that says MI is not required for serious applications).</p>
<p>The reason I want to do it this way, is because 95% of the code for my control class is the same. It&#8217;s mainly one method which reads the dialog control info from a file - the text, color, font, position, etc. So all of that code fits nicely in my base class, and from the outside I just need to call a generic LoadFromFile method, and the class does everything. The descendant classes can override this method to add any special items, like a flag for a checkbox for instance.</p>
<p>There are some other basic methods, like adding a bitmap, which one control might handle differently than another.</p>
<p>My solution to use GetCWnd() method to get the class ptr I need is not so bad. The thing I&#8217;m more unhappy about is not being able to implement message handlers such as CtlColor and OnSetCursor in the base class. If I&#8217;ve got 5 control classes, now I have 5 copies of the same handlers. I loathe redundant code, it keeps me up at night. <img src='http://zitomerconsulting.com/WordPress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Stoopid Intarweb by david</title>
		<link>http://zitomerconsulting.com/WordPress/2007/10/11/stoopid-intarweb/#comment-21</link>
		<dc:creator>david</dc:creator>
		<pubDate>Fri, 12 Oct 2007 15:28:53 +0000</pubDate>
		<guid>http://zitomerconsulting.com/WordPress/2007/10/11/stoopid-intarweb/#comment-21</guid>
		<description>No problem ;)</description>
		<content:encoded><![CDATA[<p>No problem <img src='http://zitomerconsulting.com/WordPress/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on MFC and Multiple Inheritance by Aaron Ballman</title>
		<link>http://zitomerconsulting.com/WordPress/2007/10/11/mfc-and-multiple-inheritance/#comment-20</link>
		<dc:creator>Aaron Ballman</dc:creator>
		<pubDate>Fri, 12 Oct 2007 15:17:43 +0000</pubDate>
		<guid>http://zitomerconsulting.com/WordPress/2007/10/11/mfc-and-multiple-inheritance/#comment-20</guid>
		<description>Last thing first: check out this link to MSDN, specifically the Virtual and Nonvirtual Inheritance section.

http://msdn2.microsoft.com/en-us/library/wcz57btd(VS.80).aspx

I finally think I understand what you're after now though.  :-)  You have a bunch of CWnd controls (like CEdit, CButton, etc), but you also want them to inherit from your common set of "Control" functionality.  But your Control functionality wants to be a CWnd as well so it can manipulate the control as a base window object.  However, you can't make Control inherit from CWnd because of multiple vtables.  Basically correct?</description>
		<content:encoded><![CDATA[<p>Last thing first: check out this link to MSDN, specifically the Virtual and Nonvirtual Inheritance section.</p>
<p><a href="http://msdn2.microsoft.com/en-us/library/wcz57btd" rel="nofollow">http://msdn2.microsoft.com/en-us/library/wcz57btd</a>(VS.80).aspx</p>
<p>I finally think I understand what you&#8217;re after now though.  <img src='http://zitomerconsulting.com/WordPress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  You have a bunch of CWnd controls (like CEdit, CButton, etc), but you also want them to inherit from your common set of &#8220;Control&#8221; functionality.  But your Control functionality wants to be a CWnd as well so it can manipulate the control as a base window object.  However, you can&#8217;t make Control inherit from CWnd because of multiple vtables.  Basically correct?</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on MFC and Multiple Inheritance by Bill Zitomer</title>
		<link>http://zitomerconsulting.com/WordPress/2007/10/11/mfc-and-multiple-inheritance/#comment-19</link>
		<dc:creator>Bill Zitomer</dc:creator>
		<pubDate>Fri, 12 Oct 2007 06:34:12 +0000</pubDate>
		<guid>http://zitomerconsulting.com/WordPress/2007/10/11/mfc-and-multiple-inheritance/#comment-19</guid>
		<description>Well, no that's not what I was after. What I want is to avoid rewriting methods that already exist. All of the stuff that already exists in CWnd, I just want to be able to call it, directly. 

My classes are simple:

class CMyControl : virtual public CWnd {…}

class CMyEdit : public CEdit, public CMyControl {…}

The class that uses CMyControl (a dialog class, go figure) doesn't need to know if it's an edit control, or a checkbox control, or what. It just needs to know that it's a "contorl" and it can go ahead and position it, or set its font, or change its color, etc. The descendant classes to CMyControl - like CMyEdit - will implement those functions. I don't need to worry about it, because the underlying MFC controls already do those things. But, if I'm the dialog class and all I have is a pointer to CMyControl, then I need to get a hold of a pointer to the CWnd object to do those things.

Also, I don't think you're last statement is correct. Delcaring a pure virtual base class (I believe) is just like declaring a virtual method in a base class. Once you've done it, the descendants are automatically virtual whether you use the keyword or not.</description>
		<content:encoded><![CDATA[<p>Well, no that&#8217;s not what I was after. What I want is to avoid rewriting methods that already exist. All of the stuff that already exists in CWnd, I just want to be able to call it, directly. </p>
<p>My classes are simple:</p>
<p>class CMyControl : virtual public CWnd {…}</p>
<p>class CMyEdit : public CEdit, public CMyControl {…}</p>
<p>The class that uses CMyControl (a dialog class, go figure) doesn&#8217;t need to know if it&#8217;s an edit control, or a checkbox control, or what. It just needs to know that it&#8217;s a &#8220;contorl&#8221; and it can go ahead and position it, or set its font, or change its color, etc. The descendant classes to CMyControl - like CMyEdit - will implement those functions. I don&#8217;t need to worry about it, because the underlying MFC controls already do those things. But, if I&#8217;m the dialog class and all I have is a pointer to CMyControl, then I need to get a hold of a pointer to the CWnd object to do those things.</p>
<p>Also, I don&#8217;t think you&#8217;re last statement is correct. Delcaring a pure virtual base class (I believe) is just like declaring a virtual method in a base class. Once you&#8217;ve done it, the descendants are automatically virtual whether you use the keyword or not.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
