<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Lesson 3 &#8211; Resources: Icons, Dialogs and Menus</title>
	<atom:link href="http://pravin.insanitybegins.com/win32/lesson3/feed/" rel="self" type="application/rss+xml" />
	<link>http://pravin.insanitybegins.com</link>
	<description>Natural Language Processing, Information Extraction &#38; Search</description>
	<lastBuildDate>Thu, 22 Jul 2010 23:35:42 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
	<item>
		<title>By: Pravin Paratey</title>
		<link>http://pravin.insanitybegins.com/win32/lesson3/#comment-254</link>
		<dc:creator>Pravin Paratey</dc:creator>
		<pubDate>Sat, 28 Mar 2009 07:14:15 +0000</pubDate>
		<guid isPermaLink="false">http://pravin.insanitybegins.com/?page_id=159#comment-254</guid>
		<description>Updated the code. You&#039;ll have to change

&lt;code&gt;HINSTANCE m_hInstance;&lt;/code&gt;

to

&lt;code&gt;static HINSTANCE m_hInstance;&lt;/code&gt;

in MainWindow.h</description>
		<content:encoded><![CDATA[<p>Updated the code. You&#8217;ll have to change</p>
<p><code>HINSTANCE m_hInstance;</code></p>
<p>to</p>
<p><code>static HINSTANCE m_hInstance;</code></p>
<p>in MainWindow.h</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bascarane</title>
		<link>http://pravin.insanitybegins.com/win32/lesson3/#comment-251</link>
		<dc:creator>bascarane</dc:creator>
		<pubDate>Tue, 03 Feb 2009 11:40:43 +0000</pubDate>
		<guid isPermaLink="false">http://pravin.insanitybegins.com/?page_id=159#comment-251</guid>
		<description>I found a workaround for the error, &quot;MainWindow.h&#124;13&#124;error: invalid use of member `MainWindow::m_hInstance’&quot;.

try to add a global variable in mainWindow.hpp as follows:

static HINSTANCE g_instance;

then in mainWindow.cpp, initialise the global variable with the instance value as follows:

MainWindow::MainWindow(HINSTANCE hInstance)
{
    g_instance  = hInstance;
    m_hInstance = hInstance; // Save Instance handle

    m_wndClass.cbSize = sizeof(WNDCLASSEX); // Must always be sizeof(WNDCLASSEX)
...

and then finally, use this value instead of m_hInstance as follows:

case WM_LBUTTONDOWN:
   AboutDialog* dlg = new AboutDialog();
   dlg-&gt;Run(m_hInstance, hwnd);
   delete dlg; dlg = NULL;
   break;

this should solve the problem!</description>
		<content:encoded><![CDATA[<p>I found a workaround for the error, &#8220;MainWindow.h|13|error: invalid use of member `MainWindow::m_hInstance’&#8221;.</p>
<p>try to add a global variable in mainWindow.hpp as follows:</p>
<p>static HINSTANCE g_instance;</p>
<p>then in mainWindow.cpp, initialise the global variable with the instance value as follows:</p>
<p>MainWindow::MainWindow(HINSTANCE hInstance)<br />
{<br />
    g_instance  = hInstance;<br />
    m_hInstance = hInstance; // Save Instance handle</p>
<p>    m_wndClass.cbSize = sizeof(WNDCLASSEX); // Must always be sizeof(WNDCLASSEX)<br />
&#8230;</p>
<p>and then finally, use this value instead of m_hInstance as follows:</p>
<p>case WM_LBUTTONDOWN:<br />
   AboutDialog* dlg = new AboutDialog();<br />
   dlg-&gt;Run(m_hInstance, hwnd);<br />
   delete dlg; dlg = NULL;<br />
   break;</p>
<p>this should solve the problem!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bascarane</title>
		<link>http://pravin.insanitybegins.com/win32/lesson3/#comment-250</link>
		<dc:creator>bascarane</dc:creator>
		<pubDate>Tue, 03 Feb 2009 10:34:10 +0000</pubDate>
		<guid isPermaLink="false">http://pravin.insanitybegins.com/?page_id=159#comment-250</guid>
		<description>I also get the same error. Seems that the member variables cannot be used in static function. Is there another way to acheive this? may be create another function and call it!</description>
		<content:encoded><![CDATA[<p>I also get the same error. Seems that the member variables cannot be used in static function. Is there another way to acheive this? may be create another function and call it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: w359</title>
		<link>http://pravin.insanitybegins.com/win32/lesson3/#comment-253</link>
		<dc:creator>w359</dc:creator>
		<pubDate>Sun, 04 Jan 2009 21:48:54 +0000</pubDate>
		<guid isPermaLink="false">http://pravin.insanitybegins.com/?page_id=159#comment-253</guid>
		<description>I am also getting:
MainWindow.h&#124;13&#124;error: invalid use of member `MainWindow::m_hInstance&#039; in static member function
MainWindow.cpp&#124;48&#124;error: from this location

when adding the AboutDialog. What&#039;s wrong???</description>
		<content:encoded><![CDATA[<p>I am also getting:<br />
MainWindow.h|13|error: invalid use of member `MainWindow::m_hInstance&#8217; in static member function<br />
MainWindow.cpp|48|error: from this location</p>
<p>when adding the AboutDialog. What&#8217;s wrong???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bungy_serbia</title>
		<link>http://pravin.insanitybegins.com/win32/lesson3/#comment-252</link>
		<dc:creator>bungy_serbia</dc:creator>
		<pubDate>Sat, 13 Dec 2008 10:38:32 +0000</pubDate>
		<guid isPermaLink="false">http://pravin.insanitybegins.com/?page_id=159#comment-252</guid>
		<description>invalid use of member `MainWindow::m_hInstance&#039; in static member function</description>
		<content:encoded><![CDATA[<p>invalid use of member `MainWindow::m_hInstance&#8217; in static member function</p>
]]></content:encoded>
	</item>
</channel>
</rss>
