<?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; backend servers</title>
	<atom:link href="http://weseetips.com/tag/backend-servers/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 set title for your console application window.</title>
		<link>http://weseetips.com/2008/05/03/how-to-set-title-for-your-console-application-window/</link>
		<comments>http://weseetips.com/2008/05/03/how-to-set-title-for-your-console-application-window/#comments</comments>
		<pubDate>Sat, 03 May 2008 17:32:32 +0000</pubDate>
		<dc:creator>Jijo Raj</dc:creator>
				<category><![CDATA[Windows APIs]]></category>
		<category><![CDATA[backend servers]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[console applications]]></category>
		<category><![CDATA[console title]]></category>
		<category><![CDATA[SetConsoleTitle]]></category>
		<category><![CDATA[VC++]]></category>
		<category><![CDATA[Visual C++]]></category>
		<category><![CDATA[wincon.h]]></category>
		<category><![CDATA[windows.h]]></category>

		<guid isPermaLink="false">http://weseetips.wordpress.com/?p=93</guid>
		<description><![CDATA[In huge frameworks, there might be a number of back-end servers running. Since they are servers most of them might be implemented as windows console applications to avoid gui overheads. But when you run the console, the title of the console window will be the path of console.exe. Since there can be multiple console applications, [...]]]></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 />
In huge frameworks, there might be a number of back-end servers running. Since they are servers most of them might be implemented as windows console applications to avoid gui overheads. But when you run the console, the title of the console window will be the path of console.exe.</p>
<p>Since there can be multiple console applications, One of the headache is to identify which console window is the server you are searching for? Usually we print logs in console such as <em>&#8220;Image Server Started&#8230;&#8221;</em> to identify which server it is. It will be nice, if we can set the console window title our own. So that we can easly identify the server application.</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 />
You can use the function &#8211; <span style="color:#0000ff;">SetConsoleTitle</span>(). Its straight forward. Just call the function by passing the preferred console title. See the code snippet below.</p>
<pre>int main(int argc, char* argv[])
{
    // Set the console title of my Image Server.
    SetConsoleTitle( "Image Server." );

    // Let me see the result.
    getchar();
    return 0;
}</pre>
<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 />
The <span style="color:#0000ff;">SetConsoleTitle()</span> is declared in <span style="color:#0000ff;">wincon.h</span>. But you just include <span style="color:#0000ff;">windows.h</span> which includes everything. <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/05/03/how-to-set-title-for-your-console-application-window/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

