<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Visual C++ Tips &#187; Visual Studio</title>
	<atom:link href="http://weseetips.com/category/visual-studio/feed/" rel="self" type="application/rss+xml" />
	<link>http://weseetips.com</link>
	<description>Gold mine of Visual C++ tricks!</description>
	<lastBuildDate>Thu, 11 Mar 2010 09:09:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
		<item>
		<title>How to Get Project Build Time?</title>
		<link>http://weseetips.com/2010/02/07/how-to-get-project-build-time/</link>
		<comments>http://weseetips.com/2010/02/07/how-to-get-project-build-time/#comments</comments>
		<pubDate>Sun, 07 Feb 2010 18:26:15 +0000</pubDate>
		<dc:creator>Jijo Raj</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[compile time]]></category>
		<category><![CDATA[display build time]]></category>
		<category><![CDATA[display compile time]]></category>
		<category><![CDATA[get build time]]></category>
		<category><![CDATA[get project build time]]></category>
		<category><![CDATA[project build time]]></category>
		<category><![CDATA[VC++]]></category>
		<category><![CDATA[VC++ compile time]]></category>
		<category><![CDATA[vc++ project build time]]></category>
		<category><![CDATA[Visual C++]]></category>

		<guid isPermaLink="false">http://weseetips.com/?p=1312</guid>
		<description><![CDATA[Many times i lost my temper by waiting for the re-build to be finished. So i just attempted to tune and reduce the build time by removing unnecessary includes. At that time I just wondered how to get the build time? Just follow the steps to enable the &#8216;Build Time&#8217;. 1) Take &#8211; Tools &#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Many times i lost my temper by waiting for the re-build to be finished. So i just attempted to tune and reduce the build time by removing unnecessary includes. At that time I just wondered how to get the build time?</p>
<p><a href="http://weseetips.com/wp-content/uploads/2010/01/BuildTime.jpg"><img class="alignnone size-full wp-image-5" title="BuildTime" src="http://weseetips.com/wp-content/uploads/2010/01/BuildTime.jpg" alt="" width="483" height="321" /></a></p>
<p><a href="http://weseetips.com/wp-content/uploads/2008/03/icon_howcanidoit.jpg"><img class="alignnone size-full wp-image-12" title="Icon How Can I Do It?" src="http://weseetips.com/wp-content/uploads/2008/03/icon_howcanidoit.jpg" alt="" width="220" height="32" /></a><br />
Just follow the steps to enable the &#8216;Build Time&#8217;.</p>
<p>1) Take &#8211; <em>Tools &gt; Options</em>.<br />
2) Now take <em>- Project and Solutions &gt; VC++ Project Settings</em>.<br />
3) Now enable the &#8216;Build Timing&#8217; option and rebuild your project.</p>
<p><a href="http://weseetips.com/wp-content/uploads/2010/02/BuildTime_options1.jpg"><img class="alignnone size-full wp-image-1319" title="BuildTime_options" src="http://weseetips.com/wp-content/uploads/2010/02/BuildTime_options1.jpg" alt="" width="568" height="330" /></a></p>
<p><a href="http://weseetips.com/wp-content/uploads/2008/03/icon_note.jpg"><img class="alignnone size-full wp-image-18" title="Icon Note" src="http://weseetips.com/wp-content/uploads/2008/03/icon_note.jpg" alt="" width="94" height="32" /></a><br />
This article seems useful &#8211; <a href="http://stackoverflow.com/questions/364240/how-do-you-reduce-compile-time-and-linking-time-for-visual-c-projects-native" target="_blank">How do you reduce compile time, and linking time for Visual C++ projects?</a>. Have a look at it.</p>
]]></content:encoded>
			<wfw:commentRss>http://weseetips.com/2010/02/07/how-to-get-project-build-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to generate XML Schema from XML file?</title>
		<link>http://weseetips.com/2009/11/22/how-to-generate-xml-schema-from-xml-file/</link>
		<comments>http://weseetips.com/2009/11/22/how-to-generate-xml-schema-from-xml-file/#comments</comments>
		<pubDate>Sun, 22 Nov 2009 16:55:44 +0000</pubDate>
		<dc:creator>Jijo Raj</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[generate xml schema]]></category>
		<category><![CDATA[generate XML Schema from XSD file]]></category>
		<category><![CDATA[Visual Studio 2008]]></category>
		<category><![CDATA[xml schema]]></category>
		<category><![CDATA[XML schema from XML file]]></category>
		<category><![CDATA[xsd from xml]]></category>
		<category><![CDATA[xsd schema]]></category>

		<guid isPermaLink="false">http://weseetips.com/?p=1242</guid>
		<description><![CDATA[Ever wondered how to generate XML schema from XML file? Indeed, a lot of 3ed party tools can do it for you. But as usual, any easy way? You can use Visual Studio IDE itself to generate XSD from XML file. Follow the steps. 1) Open the XML file in Visual Studio IDE. 2) Take [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-11" title="Icon Description" src="http://weseetips.files.wordpress.com/2008/03/icon_description.jpg?w=166" alt="" width="166" height="32" /><br />
Ever wondered how to generate XML schema from XML file?<br />
Indeed, a lot of 3ed party tools can do it for you. But as usual, any easy way?</p>
<p><a href="http://siteground205.com/~weseetip/wp-content/uploads/2009/11/xsdfromxml.jpg"><img class="alignnone size-full wp-image-1244" title="XsdFromXml" src="http://siteground205.com/~weseetip/wp-content/uploads/2009/11/xsdfromxml.jpg" alt="" width="500" height="346" /></a></p>
<p><img class="alignnone size-medium wp-image-12" title="Icon How Can I Do It?" src="http://weseetips.files.wordpress.com/2008/03/icon_howcanidoit.jpg?w=220" alt="" width="220" height="32" /><br />
You can use Visual Studio IDE itself to generate XSD from XML file. Follow the steps.</p>
<p>1) Open the XML file in Visual Studio IDE.<br />
2) Take View &gt; Other Windows &gt; Command Window.<br />
3) Now type and execute command &#8211; <strong>XML.CreateSchema<br />
</strong>4) See, the schema is generated.</p>
<p><a href="http://siteground205.com/~weseetip/wp-content/uploads/2009/11/xsdfromxml1.jpg"><img class="alignnone size-full wp-image-1245" title="XsdFromXml1" src="http://siteground205.com/~weseetip/wp-content/uploads/2009/11/xsdfromxml1.jpg" alt="" width="510" height="382" /></a></p>
<p><img class="alignnone size-medium wp-image-18" title="Icon Note" src="http://weseetips.files.wordpress.com/2008/03/icon_note.jpg?w=94" alt="" width="94" height="32" /><br />
A hidden pearl in VS IDE. Isn&#8217;t it?</p>
<p><img class="alignnone size-medium wp-image-51" title="beginnerseries" src="http://weseetips.files.wordpress.com/2008/03/beginnerseries.jpg?w=215" alt="" width="215" height="32" /><br />
Targeted Audience &#8211; Beginners.</p>
]]></content:encoded>
			<wfw:commentRss>http://weseetips.com/2009/11/22/how-to-generate-xml-schema-from-xml-file/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Search for Symbols in Visual Studio more Easily</title>
		<link>http://weseetips.com/2009/11/15/search-for-symbols-in-visual-studio-more-easily/</link>
		<comments>http://weseetips.com/2009/11/15/search-for-symbols-in-visual-studio-more-easily/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 16:24:33 +0000</pubDate>
		<dc:creator>Jijo Raj</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[advanced find]]></category>
		<category><![CDATA[VC++]]></category>
		<category><![CDATA[VC++ search]]></category>
		<category><![CDATA[visual C++ Seach]]></category>
		<category><![CDATA[Visual Studio find]]></category>
		<category><![CDATA[visual Studio seach]]></category>
		<category><![CDATA[visual studio seach tip]]></category>

		<guid isPermaLink="false">http://weseetips.com/?p=1221</guid>
		<description><![CDATA[Ever tried VisualAssist? Yes man, Its a killer product. The feature that I like most is its Symbol Search. You can specify words and it will list symbols that contain those words. Its very useful if you have a vague idea about the function name that you&#8217;re searching for. Have a look at the following [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-11" title="Icon Description" src="http://weseetips.files.wordpress.com/2008/03/icon_description.jpg?w=166" alt="" width="166" height="32" /><br />
Ever tried <strong>VisualAssist</strong>? Yes man, Its a killer product. The feature that I like most is its Symbol Search. You can specify words and it will list symbols that contain those words. Its very useful if you have a vague idea about the function name that you&#8217;re searching for. Have a look at the following screenshot.</p>
<p><img class="alignnone size-full wp-image-1226" title="Search3" src="http://siteground205.com/~weseetip/wp-content/uploads/2009/11/search3.jpg" alt="Search3" width="394" height="209" /><img class="alignnone size-full wp-image-1217" title="FindInVisualStudio" src="http://siteground205.com/~weseetip/wp-content/uploads/2009/10/findinvisualstudio.gif" alt="FindInVisualStudio" width="75" height="56" /></p>
<p>But is there any PoorMan&#8217;s SearchSymbols without VisualAssist?</p>
<p><img class="alignnone size-medium wp-image-12" title="Icon How Can I Do It?" src="http://weseetips.files.wordpress.com/2008/03/icon_howcanidoit.jpg?w=220" alt="" width="220" height="32" /><br />
Did you forget about the hidden gem in VisualStudio find window? Yes, the <strong>Regular Expressions</strong>. You can use .* to do the same search done by VisualAssist. For instance, to do the above search, search for <strong>Show.*Msg</strong>. Have a look at following screenshots.</p>
<p><img class="alignnone size-full wp-image-1230" title="Search4" src="http://siteground205.com/~weseetip/wp-content/uploads/2009/11/search4.jpg" alt="Search4" width="350" height="440" /></p>
<p>Now look at the results. Cool! isn&#8217;t it?</p>
<p><img class="alignnone size-full wp-image-1231" title="Search5" src="http://siteground205.com/~weseetip/wp-content/uploads/2009/11/search5.jpg" alt="Search5" width="510" height="137" /></p>
<p><img class="alignnone size-medium wp-image-18" title="Icon Note" src="http://weseetips.files.wordpress.com/2008/03/icon_note.jpg?w=94" alt="" width="94" height="32" /><br />
Quite easy. nah? BTW, did you try to kill that bug. <img src='http://weseetips.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><img class="alignnone size-medium wp-image-51" title="beginnerseries" src="http://weseetips.files.wordpress.com/2008/03/beginnerseries.jpg?w=215" alt="" width="215" height="32" /><br />
Targeted Audience &#8211; Beginners.</p>
]]></content:encoded>
			<wfw:commentRss>http://weseetips.com/2009/11/15/search-for-symbols-in-visual-studio-more-easily/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to Watch this Pointer &#8211; The Wizards Way!</title>
		<link>http://weseetips.com/2009/07/30/how-to-watch-this-pointer-the-wizards-way/</link>
		<comments>http://weseetips.com/2009/07/30/how-to-watch-this-pointer-the-wizards-way/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 15:39:15 +0000</pubDate>
		<dc:creator>Jijo Raj</dc:creator>
				<category><![CDATA[VC++ Debugging Tips]]></category>
		<category><![CDATA[Visual C++]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[C++]]></category>
		<category><![CDATA[ECX]]></category>
		<category><![CDATA[this]]></category>
		<category><![CDATA[this pointer]]></category>
		<category><![CDATA[VC++]]></category>
		<category><![CDATA[watch window]]></category>

		<guid isPermaLink="false">http://weseetips.com/?p=1171</guid>
		<description><![CDATA[How to watch the this pointer? Just add &#8216;this&#8217; to watch window. Everyone does like that. Isn&#8217;t it? But how Visual C++ wizards watch &#8216;this&#8217; pointer? The secret is, visual C++ compiler passes this pointer via ECX register. So add (ClassName*)(@ECX) to watch window will give you this pointer. Have a look at the screenshot. [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-11" title="Icon Description" src="http://weseetips.files.wordpress.com/2008/03/icon_description.jpg?w=166" alt="" width="166" height="32" /><br />
How to watch the this pointer? Just add <span style="color:#0000ff;">&#8216;this&#8217;</span> to watch window. Everyone does like that. Isn&#8217;t it? But how <span style="color:#0000ff;">Visual C++ wizards</span> watch <span style="color:#0000ff;">&#8216;this&#8217;</span> pointer? <img src='http://weseetips.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><img class="alignnone size-full wp-image-1172" title="thiswizardway" src="http://siteground205.com/~weseetip/wp-content/uploads/2009/07/thiswizardway.jpg" alt="thiswizardway" width="442" height="350" /></p>
<p><img class="alignnone size-medium wp-image-12" title="Icon How Can I Do It?" src="http://weseetips.files.wordpress.com/2008/03/icon_howcanidoit.jpg?w=220" alt="" width="220" height="32" /><br />
The secret is, visual C++ compiler passes <span style="color:#0000ff;"><em><strong>this </strong></em></span>pointer via <span style="color:#0000ff;"><em>ECX</em> </span>register. So add <span style="color:#0000ff;"><strong>(ClassName*)(@ECX)</strong></span> to watch window will give you this pointer. Have a look at the screenshot.</p>
<p><img class="alignnone size-full wp-image-1173" title="thiswizardway2" src="http://siteground205.com/~weseetip/wp-content/uploads/2009/07/thiswizardway2.jpg" alt="thiswizardway2" width="510" height="382" /></p>
<p><img class="alignnone size-medium wp-image-18" title="Icon Note" src="http://weseetips.files.wordpress.com/2008/03/icon_note.jpg?w=94" alt="" width="94" height="32" /><br />
Interesting, the internals of Visual C++. Isn&#8217;t it?</p>
<p><img class="alignnone size-medium wp-image-53" title="intermediateseries" src="http://weseetips.files.wordpress.com/2008/03/intermediateseries.jpg?w=248" alt="" width="248" height="32" /><br />
Targeted Audiance &#8211; Intermediate.</p>
]]></content:encoded>
			<wfw:commentRss>http://weseetips.com/2009/07/30/how-to-watch-this-pointer-the-wizards-way/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>How to Watch Variables in Binary by using Visual Studio Debugger?</title>
		<link>http://weseetips.com/2009/01/01/how-to-watch-variables-in-binary-by-using-visual-studio-debugger/</link>
		<comments>http://weseetips.com/2009/01/01/how-to-watch-variables-in-binary-by-using-visual-studio-debugger/#comments</comments>
		<pubDate>Thu, 01 Jan 2009 20:18:38 +0000</pubDate>
		<dc:creator>Jijo Raj</dc:creator>
				<category><![CDATA[Codeproject]]></category>
		<category><![CDATA[Debugging Tips]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[variable in binary]]></category>
		<category><![CDATA[visual studio debugger]]></category>
		<category><![CDATA[visual studio debugging tips]]></category>
		<category><![CDATA[visual studio variable in binary]]></category>
		<category><![CDATA[watch binary]]></category>
		<category><![CDATA[watch value in binary]]></category>
		<category><![CDATA[watch variable in binary]]></category>

		<guid isPermaLink="false">http://weseetips.com/?p=806</guid>
		<description><![CDATA[In visual studio you can watch variable values in different formats. For instance, for viewing in hex add this to watch window &#8211; var,x and for octal &#8211; var,o. But its a pity that visual studio doesn&#8217;t support displaying variables in binaries. So how can you watch the value of a variable in binary, with [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-11" title="Icon Description" src="http://weseetips.wordpress.com/files/2008/03/icon_description.jpg?w=166" alt="" width="166" height="32" /><br />
In visual studio you can watch variable values in different formats. For instance, for viewing in hex add this to watch window &#8211; <strong>var,x</strong> and for octal &#8211; <strong>var,o</strong>. But its a pity that <span style="color:#0000ff;">visual studio doesn&#8217;t support displaying variables in binaries</span>. So how can <strong>you watch</strong> the value of a <strong>variable</strong> in binary, <strong>with debugger</strong>? <img src='http://weseetips.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><img class="alignnone size-full wp-image-808" title="watchvarinbinary_1" src="http://weseetips.wordpress.com/files/2009/01/watchvarinbinary_1.jpg" alt="watchvarinbinary_1" width="500" height="300" /><br />
Image Courtesy &#8211; <a title="Pixdaus" href="http://pixdaus.com/single.php?id=22790" target="_blank">Pixdaus</a>.</p>
<p><img class="alignnone size-medium wp-image-12" title="Icon How Can I Do It?" src="http://weseetips.wordpress.com/files/2008/03/icon_howcanidoit.jpg?w=220" alt="" width="220" height="32" /><br />
Well, we have to <span style="color:#0000ff;">utilize the special feature of visual studio debugger</span>. Basically the <span style="color:#0000ff;">watch window </span>is not just a tool to display the variable value. It <span style="color:#0000ff;">can evaluate and execute small code snippets as well. </span>If you <span style="color:#0000ff;">add a function call to the watch window,</span> that<span style="color:#0000ff;"> function will be called</span> when debugger refreshes the watch values. So, all you have to do is &#8211; Add a global function which accepts integer value, converts it to binary string then display it to output window. Have a look at the function.</p>
<pre>// Global function which converts integer to binary
// and dump to the output window.
void DumpBinary( DWORD Value )
{
    // Buffer to hold the converted string.
    TCHAR Buffer[255] = { 0 };

    // Convert the value to binary string.
    _itot( Value, Buffer, 2 );

    // Display to output window.
    CString csMessage;
    csMessage.Format( _T("\n%d in binary: %s"), Value, Buffer );
    OutputDebugString( csMessage );
}</pre>
<p>Now <span style="color:#0000ff;">if you want to convert the 100 to binary,</span> break at some location and just add <span style="color:#0000ff;"><strong>DumpBinary(100)</strong></span> to watch window and check the output in the output window. See the screenshot below.</p>
<p><img class="alignnone size-full wp-image-807" title="watchvarinbinary" src="http://weseetips.wordpress.com/files/2009/01/watchvarinbinary.jpg" alt="watchvarinbinary" width="510" height="382" /></p>
<p><img class="alignnone size-medium wp-image-18" title="Icon Note" src="http://weseetips.wordpress.com/files/2008/03/icon_note.jpg?w=94" alt="" width="94" height="32" /><br />
Just now I realized &#8211; how powerful the Visual Studio Debugger is. Hats off to Visual Studio Team!</p>
<p>Well, please note that <span style="color:#0000ff;">in visual studio 2008 </span>and may be in siblings, When you add this to watch window, <span style="color:#0000ff;">its possible to see this error</span> &#8211; &#8220;<span style="color:#0000ff;">CXX0001: Error: error attempting to execute user function&#8221;</span>. In that case <span style="color:#0000ff;">just click the &#8220;Evaluate button&#8221;</span> which appears next to it and the expression will be re-evaluate.</p>
<p><img class="alignnone size-full wp-image-54" title="advancedseries" src="http://weseetips.wordpress.com/files/2008/03/advancedseries.jpg" alt="advancedseries" width="217" height="32" /><br />
Targeted Audiance &#8211; Advanced.</p>
]]></content:encoded>
			<wfw:commentRss>http://weseetips.com/2009/01/01/how-to-watch-variables-in-binary-by-using-visual-studio-debugger/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to find the Relative Path to other Common Folders &#8211; More Easily?</title>
		<link>http://weseetips.com/2008/12/16/how-to-find-the-relative-path-to-other-common-folders-more-easily/</link>
		<comments>http://weseetips.com/2008/12/16/how-to-find-the-relative-path-to-other-common-folders-more-easily/#comments</comments>
		<pubDate>Tue, 16 Dec 2008 21:27:54 +0000</pubDate>
		<dc:creator>Jijo Raj</dc:creator>
				<category><![CDATA[Codeproject]]></category>
		<category><![CDATA[Project settings]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[absolute path]]></category>
		<category><![CDATA[calculate relative path]]></category>
		<category><![CDATA[how to generate relative path]]></category>
		<category><![CDATA[relative path]]></category>
		<category><![CDATA[relative path to common folders]]></category>
		<category><![CDATA[relative path to folder]]></category>
		<category><![CDATA[windows relative path]]></category>

		<guid isPermaLink="false">http://weseetips.com/?p=723</guid>
		<description><![CDATA[Well you know what a relative path is. The &#8220;.\..\..\Folder&#8221; thing. Usually in project settings, while referring the path of other common include folders, relative path is being used. Because, it won&#8217;t break the project settings even though the entire development folder structure is moved from one location to another. To be more specific, If [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align:left;"><img class="alignnone size-medium wp-image-11" title="Icon Description" src="http://weseetips.files.wordpress.com/2008/03/icon_description.jpg?w=166" alt="" width="166" height="32" /><br />
Well you know what a relative path is. The &#8220;.\..\..\Folder&#8221; thing. <span style="color:#0000ff;">Usually in project settings, while referring the path of other common include folders, relative path is being used.</span> Because, it won&#8217;t break the project settings even though the entire development folder structure is moved from one location to another.</p>
<p style="text-align:left;">To be more specific, If you have specified absolute path like &#8211; &#8220;c:\Source\BlahBlahProject\Libs&#8221; in the project settings, if you move Source folder to D:\ your project won&#8217;t compile. Relative paths are good, but its a bit difficult to calculate it. <span style="color:#0000ff;">I saw people calculating it with their memory by touching the folder structure in monitor. <img src='http://weseetips.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </span> Some advanced guys uses the windows explorer&#8217;s auto complete feature to get the relative path. But <span style="color:#0000ff;">is there any other easy method to get it?</span></p>
<p><img class="alignnone size-full wp-image-725" title="relativepath" src="http://siteground205.com/~weseetip/wp-content/uploads/2008/12/relativepath.jpg" alt="relativepath" width="510" height="345" /></p>
<p><img class="alignnone size-medium wp-image-12" title="Icon How Can I Do It?" src="http://weseetips.files.wordpress.com/2008/03/icon_howcanidoit.jpg?w=220" alt="" width="220" height="32" /><br />
Well, <span style="color:#0000ff;">You can use Visual Studio for it.</span> Just follow the steps. Assume you want to get the relative path from your project folder to the common lib folder &#8211; &#8220;c:\Source\BlahBlahProject\Libs&#8221;.</p>
<p>1) Load you project in visual studio.<br />
2) Create a file <span style="color:#0000ff;">hello.cpp</span> in folder &#8211; <span style="color:#0000ff;">&#8220;c:\Source\BlahBlahProject\Libs&#8221;</span>.<br />
3) Add the file to your project by using menu &#8211; <span style="color:#0000ff;"><strong>Project &gt; Add To Project &gt; Files</strong></span>.<br />
4) Right click the file and take <span style="color:#0000ff;"><strong>Properties</strong></span>.<br />
<img class="alignnone size-full wp-image-726" title="relativepath1" src="http://siteground205.com/~weseetip/wp-content/uploads/2008/12/relativepath1.jpg" alt="relativepath1" width="510" height="389" /></p>
<p>5) In the properties, you can get the relative path from <strong><span style="color:#0000ff;">&#8220;Persist as&#8221; editbox</span></strong>.<br />
<img class="alignnone size-full wp-image-727" title="relativepath2" src="http://siteground205.com/~weseetip/wp-content/uploads/2008/12/relativepath2.jpg" alt="relativepath2" width="510" height="387" /></p>
<p><img class="alignnone size-medium wp-image-18" title="Icon Note" src="http://weseetips.files.wordpress.com/2008/03/icon_note.jpg?w=94" alt="" width="94" height="32" /><br />
The only limitation is our imagination. Isn&#8217;t it? <img src='http://weseetips.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><img class="alignnone size-medium wp-image-53" title="intermediateseries" src="http://weseetips.files.wordpress.com/2008/03/intermediateseries.jpg?w=248" alt="" width="248" height="32" /><br />
Targeted Audience &#8211; Intermediate.</p>
]]></content:encoded>
			<wfw:commentRss>http://weseetips.com/2008/12/16/how-to-find-the-relative-path-to-other-common-folders-more-easily/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to import dialogs or resources from one project to another?</title>
		<link>http://weseetips.com/2008/09/09/how-to-import-dialogs-or-resources-from-one-project-to-another/</link>
		<comments>http://weseetips.com/2008/09/09/how-to-import-dialogs-or-resources-from-one-project-to-another/#comments</comments>
		<pubDate>Tue, 09 Sep 2008 17:16:26 +0000</pubDate>
		<dc:creator>Jijo Raj</dc:creator>
				<category><![CDATA[Codeproject]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[copy dialog from one project to another]]></category>
		<category><![CDATA[copy dialog resource]]></category>
		<category><![CDATA[copy resource]]></category>
		<category><![CDATA[dialog resource]]></category>
		<category><![CDATA[import dialog]]></category>
		<category><![CDATA[import resource]]></category>
		<category><![CDATA[resource]]></category>

		<guid isPermaLink="false">http://weseetips.wordpress.com/?p=438</guid>
		<description><![CDATA[Designing dialogs &#8211; that could grab a good amount of time! But often we can find dialogs that can be reused from our previous projects. But the copy paste trick &#8211; the Ctrl+C &#38; Ctrl+V won&#8217;t work on dialog resources. So how to copy/paste dialogs or any other resources from one project to another? Assume [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-11" title="Icon Description" src="http://weseetips.files.wordpress.com/2008/03/icon_description.jpg?w=166" alt="" width="166" height="32" /><br />
<span style="color:#0000ff;">Designing dialogs</span> &#8211; that <span style="color:#0000ff;">could grab</span> a <span style="color:#0000ff;">good amount of time</span>! But often <span style="color:#0000ff;">we can find dialogs</span> that can be <span style="color:#0000ff;">reused</span> <span style="color:#0000ff;">from our previous projects</span>. But the <span style="color:#0000ff;">copy paste trick</span> &#8211; the Ctrl+C &amp; Ctrl+V <span style="color:#0000ff;">won&#8217;t work on dialog resources.</span> So how to copy/paste dialogs or any other resources from one project to another?</p>
<p><img class="alignnone size-full wp-image-626" title="importdialog" src="http://siteground205.com/~weseetip/wp-content/uploads/2008/11/importdialog.jpg" alt="importdialog" width="380" height="380" /></p>
<p><img class="alignnone size-medium wp-image-12" title="Icon How Can I Do It?" src="http://weseetips.files.wordpress.com/2008/03/icon_howcanidoit.jpg?w=220" alt="" width="220" height="32" /><br />
<span style="color:#0000ff;">Assume you have two projects</span> &#8211; <span style="color:#0000ff;">Project1 </span>and <span style="color:#0000ff;">project2 </span>and you want to <span style="color:#0000ff;">copy one dialog from Project1</span> to <span style="color:#0000ff;">Project2</span>. Just follow the steps -</p>
<p><span style="text-decoration:underline;"><strong>For Visual Studio 6.0</strong></span><br />
1) Load project2 workspace in visual studio.<br />
2) Now <span style="color:#0000ff;">Browse and load Project1&#8242;s rc file.</span> While opening resource file, select <span style="color:#0000ff;">&#8220;Open As&#8221;</span> as <span style="color:#0000ff;">&#8220;Resources&#8221;</span>.<br />
<img class="alignnone size-full wp-image-444" title="importdialog_1" src="http://siteground205.com/~weseetip/wp-content/uploads/2008/09/importdialog_1.jpg" alt="" width="510" height="356" /></p>
<p>3) Now <span style="color:#0000ff;">drag your required dialog </span>from project1&#8242;s resource tree <span style="color:#0000ff;">and drop it to your resource tree.</span><br />
<img class="alignnone size-full wp-image-449" title="importdialog_3" src="http://siteground205.com/~weseetip/wp-content/uploads/2008/09/importdialog_3.jpg" alt="" width="510" height="382" /></p>
<p>4) You&#8217;ve successfully copied dialog from one project to another!</p>
<p><span style="text-decoration:underline;"><strong>For Visual Studio 2005 and siblings</strong></span><br />
1) Open your IDE without any solutions loaded.<br />
2) open both RC files into the IDE.<br />
3) Now take Project2 RC file, right click on the dialog you want to export and copy it.</p>
<p><img class="alignnone size-full wp-image-628" title="importdialog1" src="http://siteground205.com/~weseetip/wp-content/uploads/2008/11/importdialog1.jpg" alt="importdialog1" width="510" height="416" /></p>
<p>4) Now take Project1 RC file, right click and paste.</p>
<p><img class="alignnone size-full wp-image-629" title="importdialog2" src="http://siteground205.com/~weseetip/wp-content/uploads/2008/11/importdialog2.jpg" alt="importdialog2" width="510" height="388" /></p>
<p>5) You see, now the dialog is imported from project1 to Project2.</p>
<p><img class="alignnone size-full wp-image-630" title="importdialog3" src="http://siteground205.com/~weseetip/wp-content/uploads/2008/11/importdialog3.jpg" alt="importdialog3" width="509" height="387" /></p>
<p>Well, special thanks to Mike and Alan for their contribution for the trick in Visual Studio 2005.</p>
<p><img class="alignnone size-medium wp-image-18" title="Icon Note" src="http://weseetips.files.wordpress.com/2008/03/icon_note.jpg?w=94" alt="" width="94" height="32" /><br />
<span style="color:#0000ff;">You could also edit the rc file in some text editor</span> and <span style="color:#0000ff;">can copy paste the dialog</span> <span style="color:#0000ff;">if you&#8217;re a geek. <img src='http://weseetips.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </span></p>
<p><img class="alignnone size-medium wp-image-51" title="beginnerseries" src="http://weseetips.files.wordpress.com/2008/03/beginnerseries.jpg?w=215" alt="" width="215" height="32" /><br />
Targeted Audience &#8211; Beginners.</p>
]]></content:encoded>
			<wfw:commentRss>http://weseetips.com/2008/09/09/how-to-import-dialogs-or-resources-from-one-project-to-another/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>How to add ampersand(&amp;) symbol to dialog control captions?</title>
		<link>http://weseetips.com/2008/06/15/how-to-add-ampersand-symbol-to-dialog-control-captions/</link>
		<comments>http://weseetips.com/2008/06/15/how-to-add-ampersand-symbol-to-dialog-control-captions/#comments</comments>
		<pubDate>Sun, 15 Jun 2008 11:10:43 +0000</pubDate>
		<dc:creator>Jijo Raj</dc:creator>
				<category><![CDATA[Codeproject]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[& in caption]]></category>
		<category><![CDATA[&&]]></category>
		<category><![CDATA[Ampersand in control caption]]></category>
		<category><![CDATA[dialog control caption]]></category>

		<guid isPermaLink="false">http://weseetips.wordpress.com/?p=173</guid>
		<description><![CDATA[For dialog controls we can assign keyboard accelerators. If you give the button text as &#8220;&#38;Add&#8221;, then really it will become &#8220;Add&#8221; because the ampersand character is used to mark the keyboard accelerator for that control. But what to do if you want the button text to be &#8220;Add &#38; Refresh&#8220;? Just use &#38;&#38; if [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-11" src="http://weseetips.files.wordpress.com/2008/03/icon_description.jpg?w=166" alt="" width="166" height="32" /><br />
For dialog controls we can assign keyboard accelerators. If you give the button text as <span style="color:#0000ff;">&#8220;&amp;Add&#8221;</span>, then really it will become <span style="color:#0000ff;">&#8220;<span style="text-decoration:underline;">A</span>dd&#8221;</span> because the ampersand character is used to <span style="color:#0000ff;">mark the keyboard accelerator</span> for that control. But what to do if you want the button text to be <span style="color:#0000ff;">&#8220;Add &amp; Refresh</span>&#8220;?</p>
<p><img class="alignnone size-medium wp-image-12" src="http://weseetips.files.wordpress.com/2008/03/icon_howcanidoit.jpg?w=220" alt="" width="220" height="32" /><br />
Just use <span style="color:#0000ff;">&amp;&amp;</span> if you want <span style="color:#0000ff;">ampersand as part of caption</span> instead of Keyboard accelerator marker. For instance see the screenshot.</p>
<p><img class="alignnone size-full wp-image-176" src="http://siteground205.com/~weseetip/wp-content/uploads/2008/06/ampersand_to_ctrl_caption.jpg" alt="" width="510" height="351" /></p>
<p><img class="alignnone size-medium wp-image-51" src="http://weseetips.files.wordpress.com/2008/03/beginnerseries.jpg?w=215" alt="" width="215" height="32" /><br />
Targeted Audience &#8211; Beginners.</p>
]]></content:encoded>
			<wfw:commentRss>http://weseetips.com/2008/06/15/how-to-add-ampersand-symbol-to-dialog-control-captions/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to make dialogs for languages which reads from right to left?</title>
		<link>http://weseetips.com/2008/06/13/how-to-make-dialogs-for-languages-which-reads-from-right-to-left/</link>
		<comments>http://weseetips.com/2008/06/13/how-to-make-dialogs-for-languages-which-reads-from-right-to-left/#comments</comments>
		<pubDate>Fri, 13 Jun 2008 20:09:27 +0000</pubDate>
		<dc:creator>Jijo Raj</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[arabic dialog]]></category>
		<category><![CDATA[right to left languages]]></category>

		<guid isPermaLink="false">http://weseetips.wordpress.com/?p=170</guid>
		<description><![CDATA[Ever thought of designing user interface for a middle east customer in his native language? There are languages which are written from right to left, For instance &#8211; Hebrew or Arabic. Obviously the dialogs and controls also should be from right to left, i.e. flipped horizontally. So how can we design such a dialog? With [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-medium wp-image-11" src="http://weseetips.files.wordpress.com/2008/03/icon_description.jpg?w=166" alt="" width="166" height="32" /><br />
Ever thought of <span style="color:#0000ff;">designing user interface for a middle east customer in his native language?</span> There are <span style="color:#0000ff;">languages which are written from right to left</span>, For instance &#8211; <span style="color:#0000ff;">Hebrew or Arabic.</span> Obviously the <span style="color:#0000ff;">dialogs and controls also should be from right to left</span>, i.e. <span style="color:#0000ff;">flipped horizontally</span>. So how can we design such a dialog? With the help of a mirror? or any other cool trick? <img src='http://weseetips.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><img class="alignnone size-medium wp-image-12" src="http://weseetips.files.wordpress.com/2008/03/icon_howcanidoit.jpg?w=220" alt="" width="220" height="32" /><br />
As usual, Yes there is! The Visual studio resource editor will take care of it. All you want to do is -</p>
<p>1) Design your dialog as usual. For instance the following dialog.<br />
<img class="alignnone size-full wp-image-171" src="http://siteground205.com/~weseetip/wp-content/uploads/2008/06/rtl_lan_dialog1.jpg" alt="" width="309" height="194" /></p>
<p>2) Now take Menu, <span style="color:#0000ff;">Layout &gt; Flip</span>. And you&#8217;re dialog will be as follows.</p>
<p><img class="alignnone size-full wp-image-172" src="http://siteground205.com/~weseetip/wp-content/uploads/2008/06/rtl_lan_dialog2.jpg" alt="" width="309" height="194" /></p>
<p><img class="alignnone size-medium wp-image-18" src="http://weseetips.files.wordpress.com/2008/03/icon_note.jpg?w=94" alt="" width="94" height="32" /><br />
Yes! i can read your mind. <span style="color:#0000ff;">&#8220;The strings are not reversed&#8221;.</span> That you <span style="color:#0000ff;">can take care while entering the strings.</span> Just enter is as reverse. All visual studio can do is to reverse the layout which itself saves lot of time. isn&#8217;t it? <img src='http://weseetips.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><img class="alignnone size-medium wp-image-51" src="http://weseetips.files.wordpress.com/2008/03/beginnerseries.jpg?w=215" alt="" width="215" height="32" /><br />
Targeted Audience &#8211; Beginners.</p>
]]></content:encoded>
			<wfw:commentRss>http://weseetips.com/2008/06/13/how-to-make-dialogs-for-languages-which-reads-from-right-to-left/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

