<?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>Marc Gregoire's Blog</title>
	<atom:link href="http://www.nuonsoft.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nuonsoft.com/blog</link>
	<description>Sharing my software development progress + other interesting things.</description>
	<lastBuildDate>Fri, 03 Feb 2012 18:43:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>C++ AMP Open Specification Published</title>
		<link>http://www.nuonsoft.com/blog/2012/02/03/c-amp-open-specification-published/</link>
		<comments>http://www.nuonsoft.com/blog/2012/02/03/c-amp-open-specification-published/#comments</comments>
		<pubDate>Fri, 03 Feb 2012 18:43:49 +0000</pubDate>
		<dc:creator>Marc Gregoire</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[threading]]></category>
		<category><![CDATA[C++ AMP]]></category>
		<category><![CDATA[Visual C++ 11]]></category>

		<guid isPermaLink="false">http://www.nuonsoft.com/blog/?p=874</guid>
		<description><![CDATA[As promised, Microsoft has released an open specification of C++ AMP: Accelerated Massive Parallelism This allows other compiler vendors to implement support for C++ AMP on any platform. Read the official announcement. Download the specification.]]></description>
			<content:encoded><![CDATA[<p>As promised, Microsoft has released an open specification of C++ AMP: Accelerated Massive Parallelism <img src='http://www.nuonsoft.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
This allows other compiler vendors to implement support for C++ AMP on any platform.</p>
<p><a href="http://blogs.msdn.com/b/nativeconcurrency/archive/2012/02/03/c-amp-open-spec-published.aspx" target="_blank">Read the official announcement</a>.</p>
<p><a href="http://download.microsoft.com/download/4/0/E/40EA02D8-23A7-4BD2-AD3A-0BFFFB640F28/CppAMPLanguageAndProgrammingModel.pdf" target="_blank">Download the specification</a>.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.nuonsoft.com%2Fblog%2F2012%2F02%2F03%2Fc-amp-open-specification-published%2F&amp;title=C%2B%2B%20AMP%20Open%20Specification%20Published" id="wpa2a_2"><img src="http://www.nuonsoft.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.nuonsoft.com/blog/2012/02/03/c-amp-open-specification-published/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Slides of Presentation “Introduction to Microsoft C++ AMP&#8221;</title>
		<link>http://www.nuonsoft.com/blog/2012/01/23/slides-of-presentation-introduction-to-microsoft-cpp-amp/</link>
		<comments>http://www.nuonsoft.com/blog/2012/01/23/slides-of-presentation-introduction-to-microsoft-cpp-amp/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 22:15:43 +0000</pubDate>
		<dc:creator>Marc Gregoire</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Presentation]]></category>
		<category><![CDATA[C++ AMP]]></category>
		<category><![CDATA[Visual C++ 11]]></category>

		<guid isPermaLink="false">http://www.nuonsoft.com/blog/?p=840</guid>
		<description><![CDATA[Here are the slides of my presentation on C++ AMP that I gave to software engineers at my company. One of the demos in the presentation is a Mandelbrot renderer. This blog post describes this C++ AMP Mandelbrot renderer in more details.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.nuonsoft.com/downlds/Introduction%20to%20Microsoft%20C++%20AMP.pptx">Here are the slides</a> of my presentation on <a href="http://msdn.microsoft.com/en-us/library/hh265136(v=VS.110).aspx" target="_blank">C++ AMP</a> that I gave to software engineers at my company.<br />
<center><a href="http://www.nuonsoft.com/downlds/Introduction%20to%20Microsoft%20C++%20AMP.pptx"><img src="http://www.nuonsoft.com/images/blog/Presentation_C++_AMP.png" /></a></center><br />
One of the demos in the presentation is a Mandelbrot renderer. <a href="http://www.nuonsoft.com/blog/2012/01/23/mandelbrot-using-c-amp/">This blog post</a> describes this C++ AMP Mandelbrot renderer in more details.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.nuonsoft.com%2Fblog%2F2012%2F01%2F23%2Fslides-of-presentation-introduction-to-microsoft-cpp-amp%2F&amp;title=Slides%20of%20Presentation%20%E2%80%9CIntroduction%20to%20Microsoft%20C%2B%2B%20AMP%26%238221%3B" id="wpa2a_4"><img src="http://www.nuonsoft.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.nuonsoft.com/blog/2012/01/23/slides-of-presentation-introduction-to-microsoft-cpp-amp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mandelbrot Using C++ AMP</title>
		<link>http://www.nuonsoft.com/blog/2012/01/23/mandelbrot-using-c-amp/</link>
		<comments>http://www.nuonsoft.com/blog/2012/01/23/mandelbrot-using-c-amp/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 22:13:49 +0000</pubDate>
		<dc:creator>Marc Gregoire</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[concurrency]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[parallel programming]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[threading]]></category>
		<category><![CDATA[Accelerated Massive Parallelism]]></category>
		<category><![CDATA[C++ AMP]]></category>
		<category><![CDATA[Mandelbrot]]></category>
		<category><![CDATA[Visual C++ 11]]></category>

		<guid isPermaLink="false">http://www.nuonsoft.com/blog/?p=802</guid>
		<description><![CDATA[It is time to start taking advantage of the computing power of GPUs&#8230; A while ago I wrote an article about how to use the Microsoft Parallel Patterns Library (PPL) to render the Mandelbrot fractal using multiple CPU cores. That article can be found here. This new article will make the Mandelbrot renderer multiple times [...]]]></description>
			<content:encoded><![CDATA[<p><b><i>It is time to start taking advantage of the computing power of GPUs&#8230;</i></b></p>
<p>A while ago I wrote an article about how to use the Microsoft Parallel Patterns Library (PPL) to render the Mandelbrot fractal using multiple CPU cores. That article can be found <a href="http://www.nuonsoft.com/blog/2008/11/07/parallel-programming-in-visual-c-2010-ctp/" target="_blank">here</a>.</p>
<p>This new article will make the Mandelbrot renderer multiple times faster by using a new Microsoft technology called <a href="http://msdn.microsoft.com/en-us/library/hh265136(v=VS.110).aspx" target="_blank"><b>C++ AMP: Accelerated Massive Parallelism</b></a>, introduced in the Visual C++ 11 Preview.</p>
<p><span id="more-802"></span></p>
<p>The code in the previous article showed each line of the fractal immediately after it was calculated. For this article, this is changed. The Mandelbrot image will be rendered completely off-screen, and only shown when the entire image has been calculated. This is to reduce overhead of displaying the fractal line-by-line, especially with the C++ AMP version which will be so fast that this overhead could become pretty substantial.</p>
<p>I will also switch to single precision floating point numbers, because the GPU and GPU driver combination on my Windows 7 machine does not support double precision floating point numbers. The C++ AMP technology itself supports both single- and double precision floating point arithmetic. However, whether or not double precision arithmetic works depends on your specific GPU hardware and your specific drivers from your GPU vendor. A side effect of using single precision arithmetic in the Mandelbrot renderer is that the image will get blocky at big zoom levels. At the end of this article, a piece of code is shown how to check if an accelerator in your system supports double precision arithmetic or not. You could use that to decide at runtime whether to use a single precision or double precision implementation. This is left as an exercise for the reader.</p>
<p><H3>Single-Threaded Implementation</H3></p>
<p>All implementations, the single-threaded, the PPL, and the C++ AMP Mandelbrot version, use the following setup:</p>
<pre class="brush: cpp; title: ; notranslate">const int halfHeight = int(floor(m_nBuffHeight/2.0));
const int halfWidth = int(floor(m_nBuffWidth/2.0));
const int maxiter = 1024;
const float escapeValue = 4.0f;
float zoomLevel = float(m_zoomLevel);
float view_i = float(m_view_i);
float view_r = float(m_view_r);
float invLogOf2 = 1 / log(2.0f);
if (m_buffers[m_nRenderToBufferIndex].empty())
    return;
unsigned __int32* pBuffer = &amp;(m_buffers[m_nRenderToBufferIndex][0]);</pre>
<p>Here is the single-threaded implementation from my <a href="http://www.nuonsoft.com/blog/2008/11/07/parallel-programming-in-visual-c-2010-ctp/" target="_blank">previous article</a>, but updated to use single precision floating point arithmetic, and to render one Mandelbrot image to the buffer before displaying it:</p>
<pre class="brush: cpp; title: ; notranslate">for (int y = -halfHeight; y &lt; halfHeight; ++y)
{
    // Formula: zi = z^2 + z0
    float Z0_i = view_i + y * zoomLevel;
    for (int x = -halfWidth; x &lt; halfWidth; ++x)
    {
        float Z0_r = view_r + x * zoomLevel;
        float Z_r = Z0_r;
        float Z_i = Z0_i;
        float res = 0.0f;
        for (int iter = 0; iter &lt; maxiter; ++iter)
        {
            float Z_rSquared = Z_r * Z_r;
            float Z_iSquared = Z_i * Z_i;
            if (Z_rSquared + Z_iSquared &gt; escapeValue)
            {
                // We escaped
                res = iter + 1 - log(log(sqrt(Z_rSquared + Z_iSquared))) * invLogOf2;
                break;
            }
            Z_i = 2 * Z_r * Z_i + Z0_i;
            Z_r = Z_rSquared - Z_iSquared + Z0_r;
        }

        unsigned __int32 result = RGB(res * 50, res * 50, res * 50);
        pBuffer[(y + halfHeight) * m_nBuffWidth + (x + halfWidth)] = result;
    }
}</pre>
<p><H3>Multi-Threaded Implementation (PPL)</H3></p>
<p>Parallelizing this implementation using the Microsoft Parallel Patterns Library (PPL) is shown in my <a href="http://www.nuonsoft.com/blog/2008/11/07/parallel-programming-in-visual-c-2010-ctp/" target="_blank">previous article</a>. Again, this implementation has been updated to use single precision arithmetic and to render one whole frame to the buffer before displaying it. The updated code looks as follows:</p>
<pre class="brush: cpp; title: ; notranslate">parallel_for(-halfHeight, halfHeight, 1, [&amp;](int y)
{
    // Formula: zi = z^2 + z0
    float Z0_i = view_i + y * zoomLevel;
    for (int x = -halfWidth; x &lt; halfWidth; ++x)
    {
        float Z0_r = view_r + x * zoomLevel;
        float Z_r = Z0_r;
        float Z_i = Z0_i;
        float res = 0.0f;
        for (int iter = 0; iter &lt; maxiter; ++iter)
        {
            float Z_rSquared = Z_r * Z_r;
            float Z_iSquared = Z_i * Z_i;
            if (Z_rSquared + Z_iSquared &gt; escapeValue)
            {
                // We escaped
                res = iter + 1 - log(log(sqrt(Z_rSquared + Z_iSquared))) * invLogOf2;
                break;
            }
            Z_i = 2 * Z_r * Z_i + Z0_i;
            Z_r = Z_rSquared - Z_iSquared + Z0_r;
        }

        unsigned __int32 result = RGB(res * 50, res * 50, res * 50);
        pBuffer[(y + halfHeight) * m_nBuffWidth + (x + halfWidth)] = result;
    }
});</pre>
<p><H3>C++ AMP Implementation</H3></p>
<p>C++ AMP is a new technology being developed by Microsoft for C++ to allow you to easily write code that takes advantage of the computing power of accelerators, such as GPUs. For now, C++ AMP requires DirectX 11 GPUs. C++ AMP abstracts the accelerators for you. When using C++ AMP, you don&#8217;t need to worry about what kind of accelerator is in the system. For example, there is no need to write one implementation for an NVidia GPU and another for an AMD GPU. You just write 1 implementation, and C++ AMP handles the rest. If you have multiple GPUs in your system, C++ AMP can use them all at the same time, and they don&#8217;t even need to be of the same vendor. For example, if you have a system with both an AMD and an NVidia GPU in it, C++ AMP can use them both together.</p>
<p>Microsoft has the intention to make C++ AMP an open specification, so that other compiler vendors could also add support for it.</p>
<p>For this simple Mandelbrot renderer, once you have a PPL implementation, it&#8217;s almost trivial to transform it to C++ AMP. Without further ado, here is the C++ AMP version, with a detailed explanation after the code:</p>
<pre class="brush: cpp; title: ; notranslate">try
{
    array_view&lt;writeonly&lt;unsigned __int32&gt;, 2&gt; a(m_nBuffHeight, m_nBuffWidth, pBuffer);
    parallel_for_each(a.grid, [=](index&lt;2&gt; idx) restrict(direct3d)
    {
        // Formula: zi = z^2 + z0
        int x = idx[1] - halfWidth;
        int y = idx[0] - halfHeight;
        float Z0_i = view_i + y * zoomLevel;
        float Z0_r = view_r + x * zoomLevel;
        float Z_r = Z0_r;
        float Z_i = Z0_i;
        float res = 0.0f;
        for (int iter = 0; iter &lt; maxiter; ++iter)
        {
            float Z_rSquared = Z_r * Z_r;
            float Z_iSquared = Z_i * Z_i;
            if (Z_rSquared + Z_iSquared &gt; escapeValue)
            {
                // We escaped
                res = iter + 1 - fast_log(fast_log(fast_sqrt(Z_rSquared + Z_iSquared))) * invLogOf2;
                break;
            }
            Z_i = 2 * Z_r * Z_i + Z0_i;
            Z_r = Z_rSquared - Z_iSquared + Z0_r;
        }

        unsigned __int32 result = RGB(res * 50, res * 50, res * 50);
        a[idx] = result;
    });
    a.synchronize();
}
catch (const Concurrency::runtime_exception&amp; ex)
{
    MessageBoxA(NULL, ex.what(), &quot;Error&quot;, MB_ICONERROR);
}</pre>
<p>Everything of C++ AMP is in the <a href="http://msdn.microsoft.com/en-us/library/hh305267(v=VS.110).aspx" target="_blank">concurrency</a> namespace. Certain Direct3D interoperability functionality, such as fast_log(), is in the <a href="http://msdn.microsoft.com/en-us/library/hh305262(v=VS.110).aspx" target="_blank">concurrency::direct3d</a> namespace.</p>
<p>The first thing the C++ AMP implementation does is defining a 2D <a href="http://msdn.microsoft.com/en-us/library/hh305260(v=VS.110).aspx" target="_blank">array_view</a> over the buffer. The array_view class creates a multi-dimensional view over a user supplied buffer. The data of this buffer is copied to and from GPU memory on demand by C++ AMP. The basic use of array_view is:</p>
<pre class="brush: cpp; title: ; notranslate">array_view&lt;type, dim&gt;</pre>
<p>where type is the type of data in the buffer and dim is the dimensionality of your data. The dimensionality can be anything you want; it can be 1D, 2D, 3D, 4D&#8230; When you define your array_view like this, it will be a <b>read and write</b> view over your buffer, which means that initial data is copied from system memory to GPU memory, and the end result is copied from GPU memory back to system memory. If your GPU kernel is only writing to the buffer, the array_view can be defined as a <b>write-only</b> view over your buffer as follows:</p>
<pre class="brush: cpp; title: ; notranslate">array_view&lt;writeonly&lt;type&gt;, dim&gt;</pre>
<p>This will optimize memory transfers. No initial data is copied from system memory to the GPU memory; data is only copied after finishing the calculations, from GPU memory to system memory.<br />
The opposite is also possible. You can create a <b>read-only</b> array_view as follows:</p>
<pre class="brush: cpp; title: ; notranslate">array_view&lt;const type, dim&gt;</pre>
<p>This will only copy initial data from system memory to GPU memory, and will not copy it back from GPU memory to system memory.</p>
<p>The above Mandelbrot implementation only writes to the buffer, so the array_view is defined as write-only.</p>
<p>Another option is to use the <a href=" http://msdn.microsoft.com/en-us/library/hh305242(v=VS.110).aspx" target="_blank">array</a> class instead of array_view. The array class allocates a buffer, while array_view creates a view over a user allocated buffer.</p>
<p>After the C++ AMP Mandelbrot implementation has created the array_view, it uses <a href="http://msdn.microsoft.com/en-us/library/hh305254(v=VS.110).aspx" target="_blank">concurrency::parallel_for_each()</a>.</p>
<p>The first parameter to the parallel_for_each() is a compute domain, called a <a href="http://msdn.microsoft.com/en-us/library/hh305282(v=VS.110).aspx" target="_blank">grid</a>. If you have an array_view, you can simply use its <a href="http://msdn.microsoft.com/en-us/library/hh367856(v=VS.110).aspx" target="_blank">grid property</a> as shown in the above implementation. For this Mandelbrot renderer, we have a two dimensional array_view, so the grid will also be 2D. On each position of the grid, a computation will be performed.</p>
<p>The second parameter to parallel_for_each() is a lambda expression that specifies <a href="http://msdn.microsoft.com/en-us/library/hh388953(v=VS.110).aspx" target="_blank">restrict(direct3d)</a> to say that the code in the lambda expression should be executed on your GPU, instead of your CPU. The restrict(direct3d) attribute is a compile time check; the compiler will check the code to see whether the code will be able to run on GPUs. For example, if you call a system call in your restrict(direct3d) GPU kernel, the code will not work on the GPU, and compilation will fail. In other words, if you use restrict(direct3d) and it compiles without errors, you are not violating any GPU restrictions and the code is valid to be executed on GPUs. Any function that you call from inside a GPU kernel should also have the restrict(direct3d) specifier. There are a number of restrictions on the code in a restrict(direct3d) function. <a href="http://msdn.microsoft.com/en-us/library/hh388953(v=VS.110).aspx" target="_blank">MSDN</a> lists them as follows:</p>
<ul>
<li>The function can call only functions that have the restrict(direct3d) clause.</li>
<li>The function must be inlinable.</li>
<li>The function can declare only int, unsigned int, float, and double variables, and classes and structures that contain only these types.</li>
<li>Lambda functions cannot capture by reference and cannot capture pointers.</li>
<li>References and single-indirection pointers are supported only as local variables and function arguments.</li>
<li>The following are not allowed:
<ul>
<li>Recursion.</li>
<li>Variables declared with the volatile keyword.</li>
<li>Virtual functions.</li>
<li>Pointers to functions.</li>
<li>Pointers to member functions.</li>
<li>Pointers in structures.</li>
<li>Pointers to pointers.</li>
<li>goto statements.</li>
<li>Labeled statements.</li>
<li>try, catch, or throw statements.</li>
<li>Global variables.</li>
<li>Static variables. Use tile_static Keyword instead.</li>
<li>dynamic_cast casts.</li>
<li>The typeid operator.</li>
<li>asm declarations.</li>
<li>Varargs.</li>
</ul>
</li>
</ul>
<p>The lambda expression accepts only one parameter. This parameter is an <a href="http://msdn.microsoft.com/en-us/library/hh305273(v=VS.110).aspx" target="_blank">index</a> into the compute domain (= grid). For the 2D Mandelbrot case, this index is a 2D index denoted as:</p>
<pre class="brush: cpp; title: ; notranslate">index&lt;2&gt; idx</pre>
<p>You can access each dimensionality of this index using array notation, for this 2D index you can use idx[0] and idx[1]. This gives you the position in the grid. An added bonus of using an index is that the code looks cleaner. In the C++ AMP version of the Mandelbrot renderer there is no ugly buffer index calculation. Compare the C++ AMP version:</p>
<pre class="brush: cpp; title: ; notranslate">a[idx] = result;</pre>
<p>with the PPL version and single-threaded version:</p>
<pre class="brush: cpp; title: ; notranslate">pBuffer[(y + halfHeight) * m_nBuffWidth + (x + halfWidth)] = result;</pre>
<p>The lambda expression should capture all variables it needs by value, except concurrency::array objects, which have to be captured by reference. <a href="http://msdn.microsoft.com/en-us/library/hh305254(v=VS.110).aspx" target="_blank">MSDN</a> also states that the following restrictions apply on the object types that can be captured:</p>
<ul>
<li>No pointers or references (exception: array<T,N>)</li>
<li>No char, short, or long long types</li>
<li>No bool types</li>
<li>Structs or classes that contain supported types are allowed</li>
<li>No objects that contain virtual functions or virtual bases</li>
<li>Structs or classes must be PODs (more formally, they must be copyable by blitting)</li>
</ul>
<p>parallel_for_each() will throw exceptions in case of errors. Possible reasons are:</p>
<ul>
<li>Failure to create the shader, which is the code that runs on the accelerator</li>
<li>Failure to create buffers</li>
<li>Invalid grid passed</li>
<li>Mismatched accelerators</li>
</ul>
<p>The body of the lambda expression supplied to the parallel_for_each() (= kernel) runs asynchronously with the CPU code following the parallel_for_each() call, which means that your CPU code after the parallel_for_each() call continues to execute in parallel with the code inside the body of the parallel_for_each() lambda, until a synchronization point is reached. If your CPU code at a certain point observes the result of the parallel_for_each() kernel, by inspecting the array_view in this example, at that point C++ AMP synchronizes and blocks until the GPU kernel is finished. A synchronize is also forced when the array_view object goes out of scope. However, when the array_view goes out of scope, the <a href="http://msdn.microsoft.com/en-us/library/hh416782(v=VS.110).aspx" target="_blank">synchronize()</a> method is called from within the array_view destructor and thus is not allowed to throw any exceptions. In that case, GPU and CPU exceptions that happen during the synchronization, including during transferring results from GPU memory back to system memory, will be lost. For this reason, it is recommended to manually call synchronize() at a suitable point in time, and properly catch any exceptions.</p>
<p>C++ AMP also includes a function called <a href="http://msdn.microsoft.com/en-us/library/hh305257(v=VS.110).aspx" target="_blank">copy_async()</a> which copies data from a source to a destination. The function returns a C++11 std::future<void> which you can check whenever you want to see whether the copy has finished or not.</p>
<p>To get even more performance out of your accelerators, you can investigate the <b>tiled model</b>, which works up to three dimensions. However, this article will not go deeper in on this more advanced feature. You can find an example in this blog post: <a href="http://www.danielmoth.com/Blog/tilestatic-Tilebarrier-And-Tiled-Matrix-Multiplication-With-C-AMP.aspx" target="_blank">tile_static, tile_barrier, and tiled matrix multiplication with C++ AMP</a>.</p>
<p>You can use the <a href="http://msdn.microsoft.com/en-us/library/hh350895(v=VS.110).aspx" target="_blank">accelerator</a> and <a href="http://msdn.microsoft.com/en-us/library/hh350919(v=VS.110).aspx" target="_blank">accelerator_view</a> classes to retrieve information from installed accelerators in a system; and use the <a href="http://msdn.microsoft.com/en-us/library/hh350903(v=VS.110).aspx" target="_blank">get_accelerators()</a> function to get a vector of accelerators. This introductory article on C++ AMP does not go deeper in on the functionality of these classes. Only a small example is given.</p>
<p>You can get a hold of the default accelerator in a system by using the default constructor of the accelerator class. Once you have this, you can query it for information using the <a href="http://msdn.microsoft.com/en-us/library/hh350927(v=VS.110).aspx" target="_blank">supports()</a> method and the <a href="http://msdn.microsoft.com/en-us/library/hh336179(v=VS.110).aspx" target="_blank">accelerator_restriction enumeration</a>. For example, the following code checks whether the default accelerator supports double precision calculations or not:</p>
<pre class="brush: cpp; title: ; notranslate">accelerator acc;
if (acc.supports(accelerator_restriction::double_precision))
    cout &lt;&lt; &quot;Your C++ AMP default GPU supports double precision arithmetic.&quot; &lt;&lt; endl;
else
    cout &lt;&lt; &quot;Your C++ AMP default GPU does not support double precision arithmetic.&quot; &lt;&lt; endl;</pre>
<p><H3>Results</H3></p>
<p>On my test machine (Intel Core i7-2600k, 16GB RAM, AMD Radeon HD 6800) I get the following averages in milliseconds for rendering one frame at the default zoom level at a resolution of 1916&#215;951:</p>
<ul>
<li>Single threaded version: 1167 ms</li>
<li>PPL version: 194 ms</li>
<li>C++ AMP version: 31 ms</li>
</ul>
<p>The Intel Core i7-2600k has 4 physical cores. With hyperthreading enabled, this results in 8 cores seen by the operating system. When using the single threaded version, there is only 1 of these cores being utilized. Using the PPL version, all 8 cores are fully loaded. The C++ AMP version uses almost no CPU power at all; it only uses the GPU cores. On my Radeon HD 6800, it executes around 220 threads.</p>
<p>When you are running Windows 8 Preview with Visual C++ 11 Preview, you can use GPU debugging and put breakpoints in your GPU code; see <a href="http://msdn.microsoft.com/en-us/library/hh368280(v=vs.110).aspx" target="_blank">Debugging a C++ AMP Application</a>. At the moment, GPU debugging does not work on Windows 7.</p>
<p><H3>Sample Application</H3></p>
<p>This article comes with a <a href="http://www.nuonsoft.com/downlds/Mandelbrot_AMP_src.zip">sample application</a>. You need the <a href="http://www.microsoft.com/download/en/details.aspx?id=27543" target="_blank">Visual Studio 11 Developer Preview</a> to compile it. Unfortunately, I am not able to include a pre-compiled binary because that binary would depend on the Visual C++ 11 Preview redistributable which is not yet available.</p>
<p>The sample application has a toolbar with the following &#8216;programmers-art&#8217; buttons:</p>
<ul>
<li><b>R</b>: Render one frame using the selected method</li>
<li><b>-</b>: Zoom out on the Mandelbrot fractal</li>
<li><b>+</b>: Zoom in on the Mandelbrot fractal</li>
<li><b>S</b>: Select the single-threaded implementation</li>
<li><b>PPL</b>: Select the PPL implementation</li>
<li><b>AMP</b>: Select the C++ AMP implementation</li>
<li><b>B</b>: Benchmark: Render a number of frames and display the average in the window title bar.</li>
</ul>
<p>After rendering a frame, the title bar shows how long it took to render and at what resolution. You can use the left mouse button to move around in the Mandelbrot fractal, and the mouse wheel to zoom in and out. Note however that this interactive moving and zooming is only useful with the C++ AMP implementation, because the single-threaded and PPL versions are too slow for interactivity.</p>
<p><H3>Conclusion</H3></p>
<p>This article is an introduction to, and demonstration of the power of C++ AMP. Check out the official documentation at <a href="http://msdn.microsoft.com/en-us/library/hh265136(v=VS.110).aspx" target="_blank"><b>C++ AMP: Accelerated Massive Parallelism</b></a> for more information. Also check out <a href="http://www.danielmoth.com/Blog/" target="_blank"><b>Daniel Moth&#8217;s blog</b></a>, containing a wealth of information on C++ AMP.</p>
<p><i>Disclaimer: Keep in mind that this article is written using the Developer Preview of Visual C++ 11. Certain aspects might change in the final version of Visual C++ 11.</i></p>
<p><H3>Resources</H3></p>
<ul>
<li><a href="http://www.danielmoth.com/Blog/" target="_blank">Daniel Moth&#8217;s blog (PM of C++ AMP)</a>: this blog contains a wealth of information on C++ AMP.</li>
<li><a href="http://blogs.msdn.com/b/nativeconcurrency/" target="_blank">MSDN Native parallelism blog (team blog)</a></li>
<li><a href="http://msdn.com/concurrency" target="_blank">MSDN Dev Center for Parallel Computing</a></li>
<li><a href="http://social.msdn.microsoft.com/Forums/en/parallelcppnative/threads" target="_blank">MSDN Forums to ask questions</a></li>
</ul>
<p><H3>Downloads</H3></p>
<ul>
<li><a href="http://www.nuonsoft.com/downlds/Mandelbrot_AMP_src.zip">Sample application</a></li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.nuonsoft.com%2Fblog%2F2012%2F01%2F23%2Fmandelbrot-using-c-amp%2F&amp;title=Mandelbrot%20Using%20C%2B%2B%20AMP" id="wpa2a_6"><img src="http://www.nuonsoft.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.nuonsoft.com/blog/2012/01/23/mandelbrot-using-c-amp/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Belgian C++ User Group Dinner (Monday 13th of February at 19:00)</title>
		<link>http://www.nuonsoft.com/blog/2012/01/23/belgian-c-user-group-dinner-monday-13th-of-february-at-1900/</link>
		<comments>http://www.nuonsoft.com/blog/2012/01/23/belgian-c-user-group-dinner-monday-13th-of-february-at-1900/#comments</comments>
		<pubDate>Mon, 23 Jan 2012 17:20:55 +0000</pubDate>
		<dc:creator>Marc Gregoire</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[CPPUG]]></category>
		<category><![CDATA[User Group]]></category>
		<category><![CDATA[Visual C++ 2010]]></category>

		<guid isPermaLink="false">http://www.nuonsoft.com/blog/?p=831</guid>
		<description><![CDATA[The Belgian C++ User Group is organizing a dinner on Monday 13th of February at 19:00, somewhere in the Brussels area, but the place depends on the number of people coming. Already joining us: Tarek Madkour from Microsoft, Principal Program Manager Lead in the Visual C++ team Jim Hogg from Microsoft, his main focus is [...]]]></description>
			<content:encoded><![CDATA[<p>The Belgian C++ User Group is organizing a dinner on Monday 13th of February at 19:00, somewhere in the Brussels area, but the place depends on the number of people coming.</p>
<p>Already joining us:</p>
<ul>
<li><strong>Tarek Madkour </strong>from Microsoft, Principal Program Manager Lead in the Visual C++ team</li>
<li><strong>Jim Hogg </strong>from Microsoft, his main focus is C++ compiler optimizations</li>
</ul>
<p>If you ever wanted to speak directly with the Microsoft Visual C++ development team, now is your chance.<br />
If you know any C++ people that would be interested in this, please tell them about it.</p>
<p>Since I need to make reservations somewhere, please let me know (<a href="mailto:marc.gregoire@nuonsoft.com?subject=BeC++UG Dinner">marc.gregoire@nuonsoft.com</a>) before 31st of January if you are joining us for dinner.</p>
<p>If you have any questions, don’t hesitate to ask me.</p>
<p>PS: this is not a sponsored dinner, so everyone should pay for themselves, but that shouldn’t be a problem I hope.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.nuonsoft.com%2Fblog%2F2012%2F01%2F23%2Fbelgian-c-user-group-dinner-monday-13th-of-february-at-1900%2F&amp;title=Belgian%20C%2B%2B%20User%20Group%20Dinner%20%28Monday%2013th%20of%20February%20at%2019%3A00%29" id="wpa2a_8"><img src="http://www.nuonsoft.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.nuonsoft.com/blog/2012/01/23/belgian-c-user-group-dinner-monday-13th-of-february-at-1900/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Microsoft Extended Experts Team Member</title>
		<link>http://www.nuonsoft.com/blog/2012/01/20/microsoft-extended-experts-team-member/</link>
		<comments>http://www.nuonsoft.com/blog/2012/01/20/microsoft-extended-experts-team-member/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 15:09:37 +0000</pubDate>
		<dc:creator>Marc Gregoire</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Microsoft Extended Experts Team]]></category>
		<category><![CDATA[MEET]]></category>

		<guid isPermaLink="false">http://www.nuonsoft.com/blog/?p=820</guid>
		<description><![CDATA[I&#8217;m honored to have become a Microsoft Extended Experts Team Member (MEET). The official page gives the following description of the MEET program: Do you have a complex problem, but not the knowledge to solve it? Then you can get in contact with a community of Belgian experts. All MEET members are selected for their [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m honored to have become a <a href="http://msdn.microsoft.com/nl-be/hh560770?ocid=ban-n-be-loc--meetmsdnnl#marcgregoire" target="_blank">Microsoft Extended Experts Team Member</a> (MEET).</p>
<p>The official page gives the following description of the MEET program:</p>
<blockquote><p>Do you have a complex problem, but not the knowledge to solve it? Then you can get in contact with a community of Belgian experts.<br />
All MEET members are selected for their knowledge and skills in their field. And they are also excellent communicators. All share knowledge through their personal blogs and they are also frequent speakers at Microsoft events or their respective user group.<br />
MEET gets the explicit support of Microsoft Belgium and Luxembourg.</p></blockquote>
<p><center><a href="http://msdn.microsoft.com/nl-be/hh560770?ocid=ban-n-be-loc--meetmsdnnl#marcgregoire" target="_blank"><img src="http://www.nuonsoft.com/images/meet_logo_long.jpg"></a></center></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.nuonsoft.com%2Fblog%2F2012%2F01%2F20%2Fmicrosoft-extended-experts-team-member%2F&amp;title=Microsoft%20Extended%20Experts%20Team%20Member" id="wpa2a_10"><img src="http://www.nuonsoft.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.nuonsoft.com/blog/2012/01/20/microsoft-extended-experts-team-member/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Home Made Chocolate Moelleux</title>
		<link>http://www.nuonsoft.com/blog/2012/01/08/home-made-chocolate-moelleux/</link>
		<comments>http://www.nuonsoft.com/blog/2012/01/08/home-made-chocolate-moelleux/#comments</comments>
		<pubDate>Sun, 08 Jan 2012 11:18:37 +0000</pubDate>
		<dc:creator>Marc Gregoire</dc:creator>
				<category><![CDATA[Food]]></category>
		<category><![CDATA[chocolate]]></category>
		<category><![CDATA[moelleux]]></category>

		<guid isPermaLink="false">http://www.nuonsoft.com/blog/?p=795</guid>
		<description><![CDATA[Here is a picture of a home made chocolate moelleux, made by my mom. It&#8217;s my favorite dessert If you like chocolate, you should definitely try a chocolate moelleux!]]></description>
			<content:encoded><![CDATA[<p>Here is a picture of a home made chocolate moelleux, made by my mom. It&#8217;s my favorite dessert <img src='http://www.nuonsoft.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
If you like chocolate, you should definitely try a chocolate moelleux!<br />
<center><a href="http://www.nuonsoft.com/images/blog/Moulleux.jpg"><img src="http://www.nuonsoft.com/images/blog/Moulleux_small.jpg" alt="Home Made Chocolate Moelleux" /></a></center></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.nuonsoft.com%2Fblog%2F2012%2F01%2F08%2Fhome-made-chocolate-moelleux%2F&amp;title=Home%20Made%20Chocolate%20Moelleux" id="wpa2a_12"><img src="http://www.nuonsoft.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.nuonsoft.com/blog/2012/01/08/home-made-chocolate-moelleux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to programmatically toggle the visibilty of the desktop icons</title>
		<link>http://www.nuonsoft.com/blog/2012/01/05/how-to-programmatically-toggle-the-visibilty-of-the-desktop-icons/</link>
		<comments>http://www.nuonsoft.com/blog/2012/01/05/how-to-programmatically-toggle-the-visibilty-of-the-desktop-icons/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 17:55:11 +0000</pubDate>
		<dc:creator>Marc Gregoire</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[desktop icons]]></category>

		<guid isPermaLink="false">http://www.nuonsoft.com/blog/?p=788</guid>
		<description><![CDATA[The following code will toggle the visibility of the desktop icons, and will update the checkmark in the menu when you right click the desktop.]]></description>
			<content:encoded><![CDATA[<p>The following code will toggle the visibility of the desktop icons, and will update the checkmark in the menu when you right click the desktop.</p>
<pre class="brush: cpp; title: ; notranslate">HWND GetDesktopHWND()
{
  HWND hProgman = FindWindow(_T(&quot;Progman&quot;), 0);
  if (hProgman)
    return FindWindowEx(hProgman, 0, _T(&quot;SHELLDLL_DefView&quot;), 0);

  return NULL;
}

void ToggleDesktopIcons()
{
  HWND hWndDesktop = GetDesktopHWND();
  if (hWndDesktop)
    SendMessage(hWndDesktop, WM_COMMAND, 0x7402, 0);
}</pre>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.nuonsoft.com%2Fblog%2F2012%2F01%2F05%2Fhow-to-programmatically-toggle-the-visibilty-of-the-desktop-icons%2F&amp;title=How%20to%20programmatically%20toggle%20the%20visibilty%20of%20the%20desktop%20icons" id="wpa2a_14"><img src="http://www.nuonsoft.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.nuonsoft.com/blog/2012/01/05/how-to-programmatically-toggle-the-visibilty-of-the-desktop-icons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Happy New Year 2012</title>
		<link>http://www.nuonsoft.com/blog/2011/12/31/happy-new-year-2012/</link>
		<comments>http://www.nuonsoft.com/blog/2011/12/31/happy-new-year-2012/#comments</comments>
		<pubDate>Sat, 31 Dec 2011 22:30:01 +0000</pubDate>
		<dc:creator>Marc Gregoire</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[new year]]></category>

		<guid isPermaLink="false">http://www.nuonsoft.com/blog/?p=767</guid>
		<description><![CDATA[2012 Happy New Year Sretna Nova Godina Gelukkig Nieuwjaar Bonne Année]]></description>
			<content:encoded><![CDATA[<p><strong><center><span style="color: #ff9900; text-align: center; font-size: 96px; font-weight:900; font-family:Arial Black">2012</span><br />
Happy New Year<br />
Sretna Nova Godina<br />
Gelukkig Nieuwjaar<br />
Bonne Année<br />
 <img src='http://www.nuonsoft.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </center></strong></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.nuonsoft.com%2Fblog%2F2011%2F12%2F31%2Fhappy-new-year-2012%2F&amp;title=Happy%20New%20Year%202012" id="wpa2a_16"><img src="http://www.nuonsoft.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.nuonsoft.com/blog/2011/12/31/happy-new-year-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Call for C++ Community folks in Belgium – January 10th meeting</title>
		<link>http://www.nuonsoft.com/blog/2011/12/23/call-for-c-community-folks-in-belgium-%e2%80%93-january-10th-meeting/</link>
		<comments>http://www.nuonsoft.com/blog/2011/12/23/call-for-c-community-folks-in-belgium-%e2%80%93-january-10th-meeting/#comments</comments>
		<pubDate>Fri, 23 Dec 2011 12:47:45 +0000</pubDate>
		<dc:creator>Marc Gregoire</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[CPPUG]]></category>
		<category><![CDATA[MSDN Belux]]></category>
		<category><![CDATA[User Group]]></category>

		<guid isPermaLink="false">http://www.nuonsoft.com/blog/?p=761</guid>
		<description><![CDATA[I&#8217;m going to try to get a C++ User Group going in Belgium, and got support from the Microsoft Developer Network (MSDN) Belux Team Here is the official call for action: Are you passionate about C++ and interested in finding like-minded people? Feel like coming together, setting an informal User Group in 2012? We’d like [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m going to try to get a C++ User Group going in Belgium, and got support from the Microsoft Developer Network (MSDN) Belux Team <img src='http://www.nuonsoft.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Here is the official call for action:</p>
<p>Are you passionate about C++ and interested in finding like-minded people? Feel like coming together, setting an informal User Group in 2012? We’d like to support you in that and have a call to action for you.</p>
<p><b><a href="http://www.nuonsoft.com/blog/">Marc Gregoire</a>, C++ MVP</b> and author of the book <a href="http://eu.wiley.com/WileyCDA/WileyTitle/productCd-0470932449,descCd-buy.html" target="_blank">Professional C++, 2nd Edition</a> is one of the folks passionate about the technology and interested in starting up a more active C++ community in Belgium. Are you interested? Join Marc and the MSDN Belux Team for an informal discussion at the Microsoft office in Zaventem on Tuesday January 10th 2012 at 6:30 PM.</p>
<p>Contact Marc through <a href="mailto:marc.gregoire@nuonsoft.com">email</a>, leave a note on the <a href="http://blogs.msdn.com/b/belux/archive/2011/12/23/call-for-c-community-folks-in-belgium-january-10th-meeting.aspx" target="_blank">MSDN Belux Team blog</a> or reach out to Katrien De Graeve from MSDN Belux via her <a href="http://www.twitter.com/katriendg" target="_blank">Twitter</a> and we’ll see you in January.</p>
<p>If you are looking for some of the other Microsoft technology communities there is the full listing here: <a href="http://msdn.microsoft.com/nl-be/cc196311" target="_blank">http://msdn.microsoft.com/nl-be/cc196311</a>.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.nuonsoft.com%2Fblog%2F2011%2F12%2F23%2Fcall-for-c-community-folks-in-belgium-%25e2%2580%2593-january-10th-meeting%2F&amp;title=Call%20for%20C%2B%2B%20Community%20folks%20in%20Belgium%20%E2%80%93%20January%2010th%20meeting" id="wpa2a_18"><img src="http://www.nuonsoft.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.nuonsoft.com/blog/2011/12/23/call-for-c-community-folks-in-belgium-%e2%80%93-january-10th-meeting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Events Organized by Microsoft Belgium</title>
		<link>http://www.nuonsoft.com/blog/2011/12/23/events-organized-by-microsoft-belgium/</link>
		<comments>http://www.nuonsoft.com/blog/2011/12/23/events-organized-by-microsoft-belgium/#comments</comments>
		<pubDate>Fri, 23 Dec 2011 07:57:56 +0000</pubDate>
		<dc:creator>Marc Gregoire</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Microsoft]]></category>

		<guid isPermaLink="false">http://www.nuonsoft.com/blog/?p=757</guid>
		<description><![CDATA[If you want to know which events Microsoft Belgium is organizing, take a look at www.msdn-events.be. There you&#8217;ll find a list of Live Meetings, Offline Events, Community Events, &#8230;]]></description>
			<content:encoded><![CDATA[<p>If you want to know which events Microsoft Belgium is organizing, take a look at <a href="http://www.msdn-events.be" target="_blank">www.msdn-events.be</a>. There you&#8217;ll find a list of Live Meetings, Offline Events, Community Events, &#8230;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.nuonsoft.com%2Fblog%2F2011%2F12%2F23%2Fevents-organized-by-microsoft-belgium%2F&amp;title=Events%20Organized%20by%20Microsoft%20Belgium" id="wpa2a_20"><img src="http://www.nuonsoft.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.nuonsoft.com/blog/2011/12/23/events-organized-by-microsoft-belgium/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Slides of Presentation &#8220;C++11 (C++0x) in Visual C++ 2010&#8243;</title>
		<link>http://www.nuonsoft.com/blog/2011/12/19/slides-of-presentation-c11-c0x-in-visual-c-2010/</link>
		<comments>http://www.nuonsoft.com/blog/2011/12/19/slides-of-presentation-c11-c0x-in-visual-c-2010/#comments</comments>
		<pubDate>Mon, 19 Dec 2011 17:26:47 +0000</pubDate>
		<dc:creator>Marc Gregoire</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Presentation]]></category>
		<category><![CDATA[C++0x]]></category>
		<category><![CDATA[C++11]]></category>
		<category><![CDATA[Visual C++ 2010]]></category>
		<category><![CDATA[Visual Studio 2010]]></category>

		<guid isPermaLink="false">http://www.nuonsoft.com/blog/?p=750</guid>
		<description><![CDATA[A couple of months ago, I gave a presentation about C++11/C++0x features supported in Visual C++ 2010 for software engineers at my company. You can now download the slides.]]></description>
			<content:encoded><![CDATA[<p>A couple of months ago, I gave a presentation about C++11/C++0x features supported in Visual C++ 2010 for software engineers at my company. You can now <a href="http://www.nuonsoft.com/downlds/C++11%20(C++0x)%20in%20Visual%20C++%202010.pptx">download the slides</a>.<br />
<center><a href="http://www.nuonsoft.com/downlds/C++11%20(C++0x)%20in%20Visual%20C++%202010.pptx"><img src="http://www.nuonsoft.com/images/blog/Presentation_C++11.png" alt="" /></a></center></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.nuonsoft.com%2Fblog%2F2011%2F12%2F19%2Fslides-of-presentation-c11-c0x-in-visual-c-2010%2F&amp;title=Slides%20of%20Presentation%20%26%238220%3BC%2B%2B11%20%28C%2B%2B0x%29%20in%20Visual%20C%2B%2B%202010%26%238243%3B" id="wpa2a_22"><img src="http://www.nuonsoft.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.nuonsoft.com/blog/2011/12/19/slides-of-presentation-c11-c0x-in-visual-c-2010/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Microsoft TechDays 2012</title>
		<link>http://www.nuonsoft.com/blog/2011/11/16/microsoft-techdays-2012/</link>
		<comments>http://www.nuonsoft.com/blog/2011/11/16/microsoft-techdays-2012/#comments</comments>
		<pubDate>Wed, 16 Nov 2011 18:37:44 +0000</pubDate>
		<dc:creator>Marc Gregoire</dc:creator>
				<category><![CDATA[Events]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[TechDays]]></category>

		<guid isPermaLink="false">http://www.nuonsoft.com/blog/?p=744</guid>
		<description><![CDATA[The Microsoft TechDays 2012 event will be held on 14, 15 and 16 february 2012. It&#8217;s the 10th anniversary edition and will happen in a new location (Kinepolis Imagibraine &#8211; Braine l&#8217;Alleud). .]]></description>
			<content:encoded><![CDATA[<p>The Microsoft TechDays 2012 event will be held on 14, 15 and 16 february 2012.<br />
It&#8217;s the 10th anniversary edition and will happen in a new location (Kinepolis Imagibraine &#8211; Braine l&#8217;Alleud).</p>
<p><a href="http://bit.ly/mstechdays2012" target="_blank"><img src="http://www.nuonsoft.com/images/blog/TechDays_2012_EarlyBird_600x50.jpg"></a>.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.nuonsoft.com%2Fblog%2F2011%2F11%2F16%2Fmicrosoft-techdays-2012%2F&amp;title=Microsoft%20TechDays%202012" id="wpa2a_24"><img src="http://www.nuonsoft.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.nuonsoft.com/blog/2011/11/16/microsoft-techdays-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wallpaper Cycler Uses Axialis Ribbon &amp; Toolbar Stock Icons</title>
		<link>http://www.nuonsoft.com/blog/2011/10/20/wallpaper-cycler-uses-axialis-ribbon-toolbar-stock-icons/</link>
		<comments>http://www.nuonsoft.com/blog/2011/10/20/wallpaper-cycler-uses-axialis-ribbon-toolbar-stock-icons/#comments</comments>
		<pubDate>Thu, 20 Oct 2011 16:49:17 +0000</pubDate>
		<dc:creator>Marc Gregoire</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[icons]]></category>

		<guid isPermaLink="false">http://www.nuonsoft.com/blog/?p=739</guid>
		<description><![CDATA[In a previous post I mentioned that I would add a user-friendly context-sensitive ribbon to Wallpaper Cycler. I&#8217;m working on that right now, and found a very interesting icon pack that contains lots of icons that I can use for my ribbon bar. It&#8217;s called the Ribbon &#038; Toolbar Stock Icons from Axialis. Their description: [...]]]></description>
			<content:encoded><![CDATA[<p>In a <a href="http://www.nuonsoft.com/blog/2011/10/04/wallpaper-cycler-development/">previous post</a> I mentioned that I would add a user-friendly context-sensitive ribbon to Wallpaper Cycler.<br />
I&#8217;m working on that right now, and found a very interesting icon pack that contains lots of icons that I can use for my ribbon bar. It&#8217;s called the <a href="http://www.axialis.com/stock-icons/ribbon-toolbar.html" target="_blank">Ribbon &#038; Toolbar Stock Icons</a> from Axialis. Their description:</p>
<ul>
<li>Pixel perfect, ready-to-use royalty-free icons</li>
<li>48&#215;48, 32&#215;32, 24&#215;24, 16&#215;16</li>
<li>RGB with alpha channel, RGB</li>
<li>96 PPI compatible with WPF, Silverlight, MFC, VB&#8230;</li>
<li>Normal, Hot, Disabled states</li>
<li>PNG, ICO, BMP file formats</li>
<li>Many derivatives &#038; overlays</li>
<li>Lifetime Commercial/No-Attribution License</li>
</ul>
<p>The set contains 1108 unique icons for €39.</p>
<p>And even better, you get 30% discount if you order before November 20 by following <a href="https://usd.swreg.org/cgi-bin/s.cgi?s=47156&#038;p=47156-14&#038;q=1&#038;rc=45K2D45KC4" target="_blank">this link</a>.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.nuonsoft.com%2Fblog%2F2011%2F10%2F20%2Fwallpaper-cycler-uses-axialis-ribbon-toolbar-stock-icons%2F&amp;title=Wallpaper%20Cycler%20Uses%20Axialis%20Ribbon%20%26%23038%3B%20Toolbar%20Stock%20Icons" id="wpa2a_26"><img src="http://www.nuonsoft.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.nuonsoft.com/blog/2011/10/20/wallpaper-cycler-uses-axialis-ribbon-toolbar-stock-icons/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction to WIC: How to use WIC to load an image, and draw it with GDI?</title>
		<link>http://www.nuonsoft.com/blog/2011/10/17/introduction-to-wic-how-to-use-wic-to-load-an-image-and-draw-it-with-gdi/</link>
		<comments>http://www.nuonsoft.com/blog/2011/10/17/introduction-to-wic-how-to-use-wic-to-load-an-image-and-draw-it-with-gdi/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 17:04:41 +0000</pubDate>
		<dc:creator>Marc Gregoire</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[WIC]]></category>
		<category><![CDATA[Windows Imaging Component]]></category>

		<guid isPermaLink="false">http://www.nuonsoft.com/blog/?p=711</guid>
		<description><![CDATA[The Windows Imaging Component (WIC) is a flexible and robust API for working with images on Windows. The API is extensible. Third-party vendors can create new image codecs (readers and writers) to make new image formats available to all applications that use the WIC API. Here is a brief description from the MSDN: The Windows [...]]]></description>
			<content:encoded><![CDATA[<p>The Windows Imaging Component (WIC) is a flexible and robust API for working with images on Windows. The API is extensible. Third-party vendors can create new image codecs (readers and writers) to make new image formats available to all applications that use the WIC API. Here is a brief <a href="http://msdn.microsoft.com/en-us/library/ee719654.aspx" target="_blank">description from the MSDN</a>:</p>
<blockquote><p>The Windows Imaging Component (WIC) provides an extensible framework for working with images and image metadata. WIC makes it possible for independent software vendors (ISVs) and independent hardware vendors (IHVs) to develop their own image codecs and get the same platform support as standard image formats (for example, TIFF, JPEG, PNG, GIF, BMP, and HDPhoto). A single, consistent set of interfaces is used for all image processing, regardless of image format, so any application using the WIC gets automatic support for new image formats as soon as the codec is installed. The extensible metadata framework makes it possible for applications to read and write their own proprietary metadata directly to image files, so the metadata never gets lost or separated from the image.</p></blockquote>
<p>The MSDN states the primary features of WIC as follows:</p>
<ul>
<li>Enables application developers to perform image processing operations on any image format through a single, consistent set of common interfaces, without requiring prior knowledge of specific image formats.</li>
<li>Provides an extensible &#8220;plug and play&#8221; architecture for image codecs, pixel formats, and metadata, with automatic run-time discovery of new formats.</li>
<li>Supports reading and writing of arbitrary metadata in image files, with the ability to preserve unrecognized metadata during editing.</li>
<li>Preserves high bit depth image data, up to 32 bits per channel, throughout the image processing pipeline.</li>
<li>Provides built-in support for most popular image formats, pixel formats, and metadata schemas.</li>
</ul>
<p>WIC comes with the following standard built-in codecs:</p>
<ul>
<li>BMP (Windows Bitmap Format), BMP Specification v5.</li>
<li>GIF (Graphics Interchange Format 89a), GIF Specification 89a/89m</li>
<li>ICO (Icon Format)</li>
<li>JPEG (Joint Photographic Experts Group), JFIF Specification 1.02</li>
<li>PNG (Portable Network Graphics), PNG Specification 1.2</li>
<li>TIFF (Tagged Image File Format), TIFF Specification 6.0</li>
<li>Windows Media Photo, HD Photo Specification 1.0</li>
</ul>
<p>All codecs can both load and save the specific image format, except the ICO codec which can only load icon files and not save them.</p>
<p>Reading all this, it looks like WIC is pretty powerful, and the best part is that it&#8217;s easy to use as I will demonstrate in this article.<span id="more-711"></span> So, let&#8217;s get started with some code.<br />
The first thing you need to do is include the following headers and link with Windowscodecs.lib:</p>
<pre class="brush: cpp; title: ; notranslate">#include &lt;wincodec.h&gt;
#include &lt;wincodecsdk.h&gt;</pre>
<p>WIC uses COM, however, this should not scare you away. The main thing to remember is to use a COM smart pointer which makes it much easier and prevents memory leaks. The COM smart pointer I&#8217;ll be using is <a href="http://msdn.microsoft.com/en-us/library/ezzw7k98(v=VS.100).aspx" target="_blank">CComPtr</a>. This smart pointer is defined in atlbase.h.<br />
To start working with WIC, you need an instance of the <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ee690281(v=VS.85).aspx" target="_blank">IWICImagingFactory</a>. You only have to create one such instance and can use it for the entire lifetime of the application. Below is the header file of a class that wraps an IWICImagingFactory instance into a singleton class to give easy access to it from anywhere in your application.</p>
<pre class="brush: cpp; title: ; notranslate">#pragma once

#include &lt;atlbase.h&gt;
#include &lt;wincodec.h&gt;
#include &lt;memory&gt;

class CWICImagingFactory
{
public:
	inline static CWICImagingFactory&amp; GetInstance()
	{
		if (nullptr == m_pInstance.get())
			m_pInstance.reset(new CWICImagingFactory());
		return *m_pInstance;
	}

	virtual IWICImagingFactory* GetFactory() const;

protected:
	CComPtr&lt;IWICImagingFactory&gt; m_pWICImagingFactory;

private:
	CWICImagingFactory();	// Private because singleton
	static std::shared_ptr&lt;CWICImagingFactory&gt; m_pInstance;
};</pre>
<p>This code is using the C++11 <a href="http://msdn.microsoft.com/en-us/library/bb982026.aspx" target="_blank">std::shared_ptr</a> smart pointer. If your compiler does not yet support this smart pointer, you can replace it with any other smart pointer, for example boost::shared_ptr. Note that this singleton class is not threadsafe. The GetInstance() method contains a race-condition. So, if you need this singleton to be threadsafe, you&#8217;ll have to add some synchronization to the GetInstance() method.</p>
<p>The implementation file of the CWICImagingFactory is rather straightforward:</p>
<pre class="brush: cpp; title: ; notranslate">#include &quot;stdafx.h&quot;
#include &quot;WICImagingFactory.h&quot;
#include &lt;assert.h&gt;

std::shared_ptr&lt;CWICImagingFactory&gt; CWICImagingFactory::m_pInstance;

CWICImagingFactory::CWICImagingFactory()
	: m_pWICImagingFactory(nullptr)
{
	HRESULT hr = CoCreateInstance(CLSID_WICImagingFactory, NULL, CLSCTX_INPROC_SERVER,
		IID_IWICImagingFactory, (LPVOID*)&amp;m_pWICImagingFactory);
	assert(SUCCEEDED(hr));
}

IWICImagingFactory* CWICImagingFactory::GetFactory()  const
{
	assert(m_pWICImagingFactory);
	return m_pWICImagingFactory;
}</pre>
<p>Now that we have access to an IWICImagingFactory instance, let&#8217;s start with writing the definition of a class called CNuonImg that uses WIC to load and render images.</p>
<pre class="brush: cpp; title: ; notranslate">#pragma once

#include &lt;atlbase.h&gt;
#include &lt;wincodec.h&gt;
#include &lt;wincodecsdk.h&gt;

class CNuonImg
{
public:
	CNuonImg();
	virtual ~CNuonImg();

	// Opens the nFrame-th frame of the given image file.
	// Throws HRESULT in case of failure.
	virtual void Open(const wchar_t* pszFile, UINT nFrame = 0);

	// Returns true if an image is loaded successfully, false otherwise
	virtual bool IsLoaded() const;

	// Renders the loaded image to the given device context hDC,
	// at position x,y and size cx, cy.
	// Throws HRESULT in case of failure.
	virtual void Render(HDC hDC, UINT x, UINT y, UINT cx, UINT cy);

	// Returns the width of the loaded image.
	virtual UINT GetWidth() const;

	// Returns the height of the loaded image.
	virtual UINT GetHeight() const;

protected:
	virtual void Cleanup();

	CComPtr&lt;IWICBitmapDecoder&gt; m_pDecoder;
	CComPtr&lt;IWICBitmapFrameDecode&gt; m_pFrame;
	CComPtr&lt;IWICFormatConverter&gt; m_pConvertedFrame;
	UINT m_nWidth;
	UINT m_nHeight;
};</pre>
<p>The constructor of this class initializes the data members, and initializes COM.</p>
<pre class="brush: cpp; title: ; notranslate">CNuonImg::CNuonImg()
	: m_pDecoder(nullptr)
	, m_pFrame(nullptr)
	, m_pConvertedFrame(nullptr)
	, m_nWidth(0)
	, m_nHeight(0)
{
	// Initialize COM
	CoInitialize(nullptr);
}</pre>
<p>The destructor performs some cleanup and uninitializes COM.</p>
<pre class="brush: cpp; title: ; notranslate">CNuonImg::~CNuonImg()
{
	Cleanup();

	// Uninitialize COM
	CoUninitialize();
}</pre>
<p>The Cleanup() method cleans up the previously loaded image and prepares the class to load another image.</p>
<pre class="brush: cpp; title: ; notranslate">void CNuonImg::Cleanup()
{
	m_nWidth = m_nHeight = 0;

	if (m_pConvertedFrame)
	{
		m_pConvertedFrame.Release();
		m_pConvertedFrame = nullptr;
	}
	if (m_pFrame)
	{
		m_pFrame.Release();
		m_pFrame = nullptr;
	}
	if (m_pDecoder)
	{
		m_pDecoder.Release();
		m_pDecoder = nullptr;
	}
}</pre>
<p>It&#8217;s not strictly required to call Cleanup() from the destructor. The class is using CComPtr to wrap all COM pointers, and the CComPtr class will automatically release the COM pointers when the destructor of the CComPtr instances is executed. However, the class needs a Cleanup() method anyway, to allow loading a second image with the same CNuonImg instance, so, we might as well call the Cleanup() method in the destructor also.</p>
<p>The remaining of the code will call a lot of methods on COM interfaces. It&#8217;s good coding practice to check the return value of each COM method call. To make this easier, the code uses the following little helper macro:</p>
<pre class="brush: cpp; title: ; notranslate">#define IfFailedThrowHR(expr) {HRESULT hr = (expr); if (FAILED(hr)) throw hr;}</pre>
<p>This executes an expression expr, which returns an HRESULT. The HRESULT is checked and if it&#8217;s a failure, the HRESULT value is thrown as an exception. You should change this error handling mechanism to suit your requirements.</p>
<p>The Open() method is of course the most interesting method. It loads the given image. The parameter nFrame is the index of the frame that you want to load. Certain image formats, for example TIFF and GIF, support multiple frames inside a single image file. The first frame in the file has index 0.</p>
<pre class="brush: cpp; title: ; notranslate">void CNuonImg::Open(const wchar_t* pszFile, UINT nFrame/* = 0*/)
{
	try
	{
		// Cleanup a previously loaded image
		Cleanup();

		// Get the WIC factory from the singleton wrapper class
		IWICImagingFactory* pFactory = CWICImagingFactory::GetInstance().GetFactory();
		assert(pFactory);
		if (!pFactory)
			throw WINCODEC_ERR_NOTINITIALIZED;

		// Create a decoder for the given image file
		IfFailedThrowHR(pFactory-&gt;CreateDecoderFromFilename(
			pszFile, NULL, GENERIC_READ, WICDecodeMetadataCacheOnDemand, &amp;m_pDecoder));

		// Validate the given frame index nFrame
		UINT nCount = 0;
		// Get the number of frames in this image
		if (SUCCEEDED(m_pDecoder-&gt;GetFrameCount(&amp;nCount)))
		{
			if (nFrame &gt;= nCount)
				nFrame = nCount - 1; // If the requested frame number is too big, default to the last frame
		}
		// Retrieve the requested frame of the image from the decoder
		IfFailedThrowHR(m_pDecoder-&gt;GetFrame(nFrame, &amp;m_pFrame));

		// Retrieve the image dimensions
		IfFailedThrowHR(m_pFrame-&gt;GetSize(&amp;m_nWidth, &amp;m_nHeight));

		// Convert the format of the image frame to 32bppBGR
		IfFailedThrowHR(pFactory-&gt;CreateFormatConverter(&amp;m_pConvertedFrame));
		IfFailedThrowHR(m_pConvertedFrame-&gt;Initialize(
				m_pFrame,                        // Source frame to convert
				GUID_WICPixelFormat32bppBGR,     // The desired pixel format
				WICBitmapDitherTypeNone,         // The desired dither pattern
				NULL,                            // The desired palette
				0.f,                             // The desired alpha threshold
				WICBitmapPaletteTypeCustom       // Palette translation type
				));
	}
	catch (...)
	{
		// Cleanup after something went wrong
		Cleanup();
		// Rethrow the exception, so the client code can handle it
		throw;
	}
}</pre>
<p>The above code shows the basics of loading an image. To learn more about the different parameters to the different COM calls, consult the MSDN. Here are a couple of MSDN links to make it easy to find the right pages:</p>
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ee690281(v=VS.85).aspx" target="_blank">IWICImagingFactory</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ee690307(v=vs.85).aspx" target="_blank">IWICImagingFactory::CreateDecoderFromFilename()</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ee690086(v=VS.85).aspx" target="_blank">IWICBitmapDecoder</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ee690099(v=VS.85).aspx" target="_blank">IWICBitmapDecoder::GetFrameCount()</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ee690098(v=VS.85).aspx" target="_blank">IWICBitmapDecoder::GetFrame()</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ee690134(v=VS.85).aspx" target="_blank">IWICBitmapFrameDecode</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ee690185(v=VS.85).aspx" target="_blank">IWICBitmapSource::GetSize()</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ee690317(v=vs.85).aspx" target="_blank">IWICImagingFactory::CreateFormatConverter()</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ee690274(v=vs.85).aspx" target="_blank">IWICFormatConverter</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ee690279(v=VS.85).aspx" target="_blank">IWICFormatConverter::Initialize()</a></li>
</ul>
<p>The CNuonImg::IsLoaded(), CNuonImg::GetWidth(), and CNuonImg::GetHeigh() methods are simple one-liners.</p>
<pre class="brush: cpp; title: ; notranslate">bool CNuonImg::IsLoaded() const
{
	return m_pConvertedFrame != nullptr;
}

UINT CNuonImg::GetWidth() const
{
	return m_nWidth;
}

UINT CNuonImg::GetHeight() const
{
	return m_nHeight;
}</pre>
<p>The CNuonImg::Render() method is responsible for rendering the image to the given HDC.</p>
<pre class="brush: cpp; title: ; notranslate">#define DIB_WIDTHBYTES(bits) ((((bits) + 31)&gt;&gt;5)&lt;&lt;2)

void CNuonImg::Render(HDC hDC, UINT x, UINT y, UINT cx, UINT cy)
{
	// Make sure an image has been loaded
	if (!IsLoaded())
		throw WINCODEC_ERR_WRONGSTATE;

	// Get the WIC factory from the singleton wrapper class
	IWICImagingFactory* pFactory = CWICImagingFactory::GetInstance().GetFactory();
	if (!pFactory)
		throw WINCODEC_ERR_NOTINITIALIZED;

	// Create a WIC image scaler to scale the image to the requested size
	CComPtr&lt;IWICBitmapScaler&gt; pScaler = nullptr;
	IfFailedThrowHR(pFactory-&gt;CreateBitmapScaler(&amp;pScaler));
	IfFailedThrowHR(pScaler-&gt;Initialize(m_pConvertedFrame, cx, cy, WICBitmapInterpolationModeFant));

	// Render the image to a GDI device context
	HBITMAP hDIBBitmap = NULL;
	try
	{
		// Get a DC for the full screen
		HDC hdcScreen = GetDC(NULL);
		if (!hdcScreen)
			throw 1;

		BITMAPINFO bminfo;
		ZeroMemory(&amp;bminfo, sizeof(bminfo));
		bminfo.bmiHeader.biSize         = sizeof(BITMAPINFOHEADER);
		bminfo.bmiHeader.biWidth        = cx;
		bminfo.bmiHeader.biHeight       = -(LONG)cy;
		bminfo.bmiHeader.biPlanes       = 1;
		bminfo.bmiHeader.biBitCount     = 32;
		bminfo.bmiHeader.biCompression  = BI_RGB;		

		void* pvImageBits = nullptr;	// Freed with DeleteObject(hDIBBitmap)
		hDIBBitmap = CreateDIBSection(hdcScreen, &amp;bminfo, DIB_RGB_COLORS, &amp;pvImageBits, NULL, 0);
		if (!hDIBBitmap)
			throw 2;

		ReleaseDC(NULL, hdcScreen);

		// Calculate the number of bytes in 1 scanline
		UINT nStride = DIB_WIDTHBYTES(cx * 32);
		// Calculate the total size of the image
		UINT nImage = nStride * cy;
		// Copy the pixels to the DIB section
		IfFailedThrowHR(pScaler-&gt;CopyPixels(nullptr, nStride, nImage, reinterpret_cast&lt;BYTE*&gt;(pvImageBits)));

		// Copy the bitmap to the target device context
		::SetDIBitsToDevice(hDC, x, y, cx, cy, 0, 0, 0, cy, pvImageBits, &amp;bminfo, DIB_RGB_COLORS);

		DeleteObject(hDIBBitmap);
	}
	catch (...)
	{
		if (hDIBBitmap)
			DeleteObject(hDIBBitmap);
		// Rethrow the exception, so the client code can handle it
		throw;
	}
}</pre>
<p>Here are some links to the MSDN documentation to learn more about the different parameters to the functions used in the above piece of code.</p>
<ul>
<li><a href="http://msdn.microsoft.com/en-us/library/ee690168(VS.85).aspx" target="_blank">IWICBitmapScaler</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ee690296(v=vs.85).aspx" target="_blank">IWICImagingFactory::CreateBitmapScaler()</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/ee690169(v=VS.85).aspx" target="_blank">IWICBitmapScaler::Initialize()</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/dd183494(VS.85).aspx" target="_blank">CreateDIBSection()</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/ee690179(v=VS.85).aspx" target="_blank">IWICBitmapSource::CopyPixels()</a></li>
<li><a href="http://msdn.microsoft.com/en-us/library/dd162974(VS.85).aspx" target="_blank">SetDIBitsToDevice()</a></li>
</ul>
<p>Now you can start using the class to load and render images. The basic flow for rendering an image to a device context (hDC) at position (0,0) with given width and height is as follows:</p>
<pre class="brush: cpp; title: ; notranslate">try
{
	CNuonImg img;
	wchar_t* filename = L&quot;C:\\Users\\Public\\Pictures\\Sample Pictures\\Tulips.jpg&quot;;
	img.Open(filename);
	img.Render(hDC, 0, 0, width, height);
}
catch (HRESULT hr)
{
	// Handle error
}</pre>
<p><a href="http://www.nuonsoft.com/downlds/WICDemo1.zip">Click here</a> to download a small MFC demo application that uses the above class to load an image.</p>
<p>That&#8217;s it for this first introduction to WIC. If you have suggestions for topics for future posts about WIC, let me know in the comments below.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.nuonsoft.com%2Fblog%2F2011%2F10%2F17%2Fintroduction-to-wic-how-to-use-wic-to-load-an-image-and-draw-it-with-gdi%2F&amp;title=Introduction%20to%20WIC%3A%20How%20to%20use%20WIC%20to%20load%20an%20image%2C%20and%20draw%20it%20with%20GDI%3F" id="wpa2a_28"><img src="http://www.nuonsoft.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.nuonsoft.com/blog/2011/10/17/introduction-to-wic-how-to-use-wic-to-load-an-image-and-draw-it-with-gdi/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>C++11 Standard Published by ISO</title>
		<link>http://www.nuonsoft.com/blog/2011/10/11/c11-standard-published-by-iso/</link>
		<comments>http://www.nuonsoft.com/blog/2011/10/11/c11-standard-published-by-iso/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 16:46:22 +0000</pubDate>
		<dc:creator>Marc Gregoire</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[C++0x]]></category>
		<category><![CDATA[C++11]]></category>
		<category><![CDATA[ISO/IEC 14882:2011(E)]]></category>

		<guid isPermaLink="false">http://www.nuonsoft.com/blog/?p=677</guid>
		<description><![CDATA[The ISO International Organization for Standardization has now officialy published the C++11 standard Here is part of the press release: C++, one of the most popular programming languages used in everything from Web browsers to 3D video games, has been fully updated and published as, ISO/IEC 14882:2011, Information technology – Programming languages – C++. ISO/IEC [...]]]></description>
			<content:encoded><![CDATA[<p>The ISO International Organization for Standardization has now officialy published the C++11 standard <img src='http://www.nuonsoft.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
Here is part of the press release:</p>
<blockquote><p>C++, one of the most popular programming languages used in everything from Web browsers to 3D video games, has been fully updated and published as, ISO/IEC 14882:2011, Information technology – Programming languages – C++. </p>
<p>ISO/IEC 14882:2011 defines the programming language and specifies requirements for implementation. Also known as C++11, this is the first major revision of the standard since 1998. Its new features extend C++’s traditional strengths of flexibility and efficiency – for example, lambda functions, move semantics, and variadic templates further enable developers to use powerful expressiveness and strong abstraction to write efficient, high-performance code with full access to the hardware available when needed. Even more, the new C++11 has the convenience and ease of use of other modern languages – from features like auto type deduction and explicit virtual override control, to standard smart pointers that mean never writing delete again. </p></blockquote>
<p>You can read the complete press release <a href="http://www.iso.org/iso/pressrelease.htm?refid=Ref1472" target="_blank">here</a>.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.nuonsoft.com%2Fblog%2F2011%2F10%2F11%2Fc11-standard-published-by-iso%2F&amp;title=C%2B%2B11%20Standard%20Published%20by%20ISO" id="wpa2a_30"><img src="http://www.nuonsoft.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.nuonsoft.com/blog/2011/10/11/c11-standard-published-by-iso/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&#8220;Professional C++, Second Edition&#8221; Featured on the Microsoft VC++ Team Blog</title>
		<link>http://www.nuonsoft.com/blog/2011/10/10/professional-c-second-edition-featured-on-the-microsoft-vc-team-blog/</link>
		<comments>http://www.nuonsoft.com/blog/2011/10/10/professional-c-second-edition-featured-on-the-microsoft-vc-team-blog/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 16:21:12 +0000</pubDate>
		<dc:creator>Marc Gregoire</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[C++0x]]></category>
		<category><![CDATA[C++11]]></category>
		<category><![CDATA[Professional C++]]></category>
		<category><![CDATA[Wiley]]></category>
		<category><![CDATA[Wrox]]></category>

		<guid isPermaLink="false">http://www.nuonsoft.com/blog/?p=671</guid>
		<description><![CDATA[My book &#8220;Professional C++, Second Edition&#8221;, published by Wiley/Wrox, is now featured in a dedicated post on the Microsoft Visual C++ Team Blog Read the VC++ Team Blog post here.]]></description>
			<content:encoded><![CDATA[<p>My book &#8220;Professional C++, Second Edition&#8221;, published by Wiley/Wrox, is now featured in a dedicated post on the Microsoft Visual C++ Team Blog <img src='http://www.nuonsoft.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
<a href="http://blogs.msdn.com/b/vcblog/archive/2011/10/10/10222600.aspx" target="_blank">Read the VC++ Team Blog post here.</a></p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.nuonsoft.com%2Fblog%2F2011%2F10%2F10%2Fprofessional-c-second-edition-featured-on-the-microsoft-vc-team-blog%2F&amp;title=%26%238220%3BProfessional%20C%2B%2B%2C%20Second%20Edition%26%238221%3B%20Featured%20on%20the%20Microsoft%20VC%2B%2B%20Team%20Blog" id="wpa2a_32"><img src="http://www.nuonsoft.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.nuonsoft.com/blog/2011/10/10/professional-c-second-edition-featured-on-the-microsoft-vc-team-blog/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Wallpaper Cycler Development</title>
		<link>http://www.nuonsoft.com/blog/2011/10/04/wallpaper-cycler-development/</link>
		<comments>http://www.nuonsoft.com/blog/2011/10/04/wallpaper-cycler-development/#comments</comments>
		<pubDate>Tue, 04 Oct 2011 17:39:56 +0000</pubDate>
		<dc:creator>Marc Gregoire</dc:creator>
				<category><![CDATA[Software Development Progress]]></category>
		<category><![CDATA[Wallpaper Cycler]]></category>
		<category><![CDATA[WCL]]></category>
		<category><![CDATA[WPC]]></category>

		<guid isPermaLink="false">http://www.nuonsoft.com/blog/?p=655</guid>
		<description><![CDATA[Now that my book is finished, I finally have some time again to work on my development projects, and I re-started development on Wallpaper Cycler. There are a couple of major issues that I have identified with the current released version of Wallpaper Cycler. Because of those issues, my first idea was to start designing [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.nuonsoft.com/wallpapercycler/images/icon.png" border="0" width="48" height="48" hspace="5" vspace="5" align="left">Now that <a href="http://www.nuonsoft.com/blog/2011/09/05/work-on-my-book-professional-c-second-edition-is-finished/">my book is finished</a>, I finally have some time again to work on my development projects, and I re-started development on Wallpaper Cycler.<br />
There are a couple of major issues that I have identified with the current released version of Wallpaper Cycler. Because of those issues, my first idea was to start designing a new version of Wallpaper Cycler from scratch. After thinking a bit about that, I changed my mind. It will be too much work. Instead, I will rewrite parts of the current version of Wallpaper Cycler from scratch to make it more robust.<br />
Right now, I can think of the following major issues. Each item contains a solution that I&#8217;m thinking of implementing to fix the issue.</p>
<ul>
<li><strong>The image loading code is not as robust as I would like it to be.</strong> It&#8217;s error prone, and crashes on certain files. To resolve this issue, I will throw away all current image loading code and rewrite it all. The result should be more robust, more resilient to corrupt image files, and more flexible. It will also support new image formats, but I don&#8217;t know yet exactly which formats. If you have image files that cause Wallpaper Cycler to crash, you can always send them to me.</li>
<li><strong>The current WCL file format often gives problems.</strong> These problems are especially noticable with big wallpaper lists (> 10.000 wallpapers). Because of the issues with the file format, Wallpaper Cycler sometimes corrupts the WCL. To resolve this issue, I will throw away all WCL saving and loading code and replace it with a completely new file format. Just as with the image loading rewrite, the result will be more robust, more flexible, and hopefully more performant.</li>
<li><strong>Too complex/confusing UI.</strong> Wallpaper Cycler has a lot of features. Unfortunately, the result is that the user interface is not always easy to use. Some people simply get lost in the user interface. To start resolving this issue, I&#8217;m thinking of replacing the toolbars with a modern, context-sensitive, ribbon bar. I&#8217;m also thinking of including an option to choose between a Basic UI and an Advanced UI. In the Basic UI, certain less used option are not shown or burried deeper away, as to prevent them from cluttering up the UI.</li>
<li><strong>The layout editor is often cause of frustration.</strong> The current layout editor has a number of usability issues. I don&#8217;t have any concrete solutions yet, but I need to find some solutions to try to make it much more user friendly, at least for basic layouts.</li>
</ul>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.nuonsoft.com%2Fblog%2F2011%2F10%2F04%2Fwallpaper-cycler-development%2F&amp;title=Wallpaper%20Cycler%20Development" id="wpa2a_34"><img src="http://www.nuonsoft.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.nuonsoft.com/blog/2011/10/04/wallpaper-cycler-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pictures of Assembling My New PC</title>
		<link>http://www.nuonsoft.com/blog/2011/09/28/pictures-of-assembling-my-new-pc/</link>
		<comments>http://www.nuonsoft.com/blog/2011/09/28/pictures-of-assembling-my-new-pc/#comments</comments>
		<pubDate>Wed, 28 Sep 2011 21:08:34 +0000</pubDate>
		<dc:creator>Marc Gregoire</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Antec Solo]]></category>
		<category><![CDATA[be quiet Dark Power Pro PSU]]></category>
		<category><![CDATA[corsair vengeance]]></category>
		<category><![CDATA[i7-2600k]]></category>
		<category><![CDATA[Intel 510 SSD]]></category>
		<category><![CDATA[WD RE4]]></category>

		<guid isPermaLink="false">http://www.nuonsoft.com/blog/?p=631</guid>
		<description><![CDATA[In my previous blog post I mentioned I would post some pictures taken during assembling my new PC. Here they are, hit the jump to see them. First, some pictures of the, still empty, case, an Antec Solo: The motherboard is an ASRock H67M-GE/HT: The PSU is a &#8220;be quiet Dark Power Pro PSU&#8221;. It&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p>In my previous blog post I mentioned I would post some pictures taken during assembling my new PC. Here they are, hit the jump to see them. <img src='http://www.nuonsoft.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> <span id="more-631"></span><br />
First, some pictures of the, still empty, case, an Antec Solo:</p>
<p style="text-align: center;"><a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7704.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7704_small.JPG" alt="" width="200" height="150" /></a> <a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7705.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7705_small.JPG" alt="" width="200" height="150" /></a> <a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7706.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7706_small.JPG" alt="" width="150" height="200" /></a></p>
<p>The motherboard is an ASRock H67M-GE/HT:</p>
<p style="text-align: center;"><a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7707.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7707_small.JPG" alt="" width="200" height="150" /></a> <a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7727.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7727_small.JPG" alt="" width="200" height="150" /></a> <a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7728.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7728_small.JPG" alt="" width="200" height="150" /></a></p>
<p>The PSU is a &#8220;be quiet Dark Power Pro PSU&#8221;. It&#8217;s very quiet <img src='http://www.nuonsoft.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style="text-align: center;"><a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7708.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7708_small.JPG" alt="" width="200" height="150" /></a> <a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7709.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7709_small.JPG" alt="" width="200" height="150" /></a> <a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7710.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7710_small.JPG" alt="" width="200" height="150" /></a> <a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7712.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7712_small.JPG" alt="" width="200" height="150" /></a> <a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7715.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7715_small.JPG" alt="" width="200" height="150" /></a></p>
<p>The first thing I assembled into the case was of course the power supply:</p>
<p style="text-align: center;"><a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7717.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7717_small.JPG" alt="" width="150" height="200" /></a></p>
<p>This case has several ways to mount the harddrives. You can mount them using elastic bands, or you can mount them on rubber feet. I chose the rubber feet.</p>
<p style="text-align: center;"><a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7718.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7718_small.JPG" alt="" width="150" height="200" /></a> <a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7719.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7719_small.JPG" alt="" width="200" height="150" /></a> <a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7720.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7720_small.JPG" alt="" width="200" height="150" /></a> <a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7725.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7725_small.JPG" alt="" width="150" height="200" /></a></p>
<p>Next, unboxing and installation of the Intel i7 2600k CPU <img src='http://www.nuonsoft.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style="text-align: center;"><a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7729.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7729_small.JPG" alt="" width="200" height="150" /></a> <a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7730.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7730_small.JPG" alt="" width="200" height="150" /></a> <a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7733.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7733_small.JPG" alt="" width="200" height="150" /></a> <a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7734.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7734_small.JPG" alt="" width="200" height="150" /></a></p>
<p>The 16 GB Corsair Vengeance memory looks pretty nice <img src='http://www.nuonsoft.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p style="text-align: center;"><a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7735.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7735_small.JPG" alt="" width="150" height="200" /></a> <a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7736.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7736_small.JPG" alt="" width="200" height="150" /></a> <a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7737.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7737_small.JPG" alt="" width="200" height="150" /></a></p>
<p>Next up is the little speed daemon, the Intel 510 SSD:</p>
<p style="text-align: center;"><a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7739.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7739_small.JPG" alt="" width="200" height="150" /></a> <a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7740.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7740_small.JPG" alt="" width="200" height="150" /></a></p>
<p>And lastly, the graphics card, a Gigabyte AMD Radeon HD 6850. I chose AMD over NVidia for this machine, because I want more than just dual-monitor, and as far as I know, NVidia cards only support dual-monitor. Note that the card has two very big fans on it. However, since these fans are soo big, they can rotate slower than small fans, which greatly reduces the noise made by this graphics card <img src='http://www.nuonsoft.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style="text-align: center;"><a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7742.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7742_small.JPG" alt="" width="150" height="200" /></a> <a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7743.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7743_small.JPG" alt="" width="200" height="150" /></a> <a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7744.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7744_small.JPG" alt="" width="200" height="150" /></a></p>
<p>And finally some views of the fully assembled PC, which also shows the LG Blu-ray burner at the top:</p>
<p style="text-align: center;"><a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7745.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7745_small.JPG" alt="" width="150" height="200" /></a> <a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7746.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7746_small.JPG" alt="" width="200" height="150" /></a> <a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7747.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7747_small.JPG" alt="" width="150" height="200" /></a> <a href="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7748.JPG"><img src="http://www.nuonsoft.com/images/blog/new_pc_i7_2011/IMG_7748_small.JPG" alt="" width="150" height="200" /></a></p>
<p>All components have been selected with noise in mind. I wanted a silent PC, and I must say that I&#8217;m very satisfied. Sometimes, I really have to listen carefully to hear if the PC is running or not, so I succeeded in my goal of a silent PC <img src='http://www.nuonsoft.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.nuonsoft.com%2Fblog%2F2011%2F09%2F28%2Fpictures-of-assembling-my-new-pc%2F&amp;title=Pictures%20of%20Assembling%20My%20New%20PC" id="wpa2a_36"><img src="http://www.nuonsoft.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.nuonsoft.com/blog/2011/09/28/pictures-of-assembling-my-new-pc/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>New PC :)</title>
		<link>http://www.nuonsoft.com/blog/2011/09/20/new-pc/</link>
		<comments>http://www.nuonsoft.com/blog/2011/09/20/new-pc/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 19:45:41 +0000</pubDate>
		<dc:creator>Marc Gregoire</dc:creator>
				<category><![CDATA[Miscellaneous]]></category>
		<category><![CDATA[Antec Solo]]></category>
		<category><![CDATA[be quiet Dark Power Pro PSU]]></category>
		<category><![CDATA[corsair vengeance]]></category>
		<category><![CDATA[i7-2600k]]></category>
		<category><![CDATA[Intel 510 SSD]]></category>
		<category><![CDATA[WD RE4]]></category>

		<guid isPermaLink="false">http://www.nuonsoft.com/blog/?p=624</guid>
		<description><![CDATA[A couple of weeks ago I finally bought a new PC, and I love it It&#8217;s a nice: Intel i7-2600k 16 GB Corsair Vengeance memory Intel 510 SSD (120GB) 2 x 2TB WD RE4 drives in mirroring RAID be quiet Dark Power Pro PSU (really quiet PSU) Antec Solo (a rather silent case, including some [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.nuonsoft.com/images/blog/ci7_d_rgb_78_com.png" width="78" height="59" align="right" hspace="10">A couple of weeks ago I finally bought a new PC, and I love it <img src='http://www.nuonsoft.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /><br />
It&#8217;s a nice:</p>
<ul>
<li>Intel i7-2600k</li>
<li>16 GB Corsair Vengeance memory</li>
<li>Intel 510 SSD (120GB)</li>
<li>2 x 2TB WD RE4 drives in mirroring RAID</li>
<li>be quiet Dark Power Pro PSU (really quiet PSU)</li>
<li>Antec Solo (a rather silent case, including some sound damping materials)</li>
<li>triple monitors</li>
</ul>
<p>I must say, it&#8217;s very very fast, especially thanks to the SSD. The 16GB RAM come in handy for running virtual machines <img src='http://www.nuonsoft.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /><br />
Once you&#8217;ve worked on a system with an SSD as system drive, you simply don&#8217;t want to go back to using mechanical drives as system drive&#8230;</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.nuonsoft.com%2Fblog%2F2011%2F09%2F20%2Fnew-pc%2F&amp;title=New%20PC%20%3A%29" id="wpa2a_38"><img src="http://www.nuonsoft.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.nuonsoft.com/blog/2011/09/20/new-pc/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Windows 8 Developer Preview</title>
		<link>http://www.nuonsoft.com/blog/2011/09/20/windows-8-developer-preview/</link>
		<comments>http://www.nuonsoft.com/blog/2011/09/20/windows-8-developer-preview/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 17:14:37 +0000</pubDate>
		<dc:creator>Marc Gregoire</dc:creator>
				<category><![CDATA[C++]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Visual C++ 11]]></category>
		<category><![CDATA[Windows 8]]></category>

		<guid isPermaLink="false">http://www.nuonsoft.com/blog/?p=619</guid>
		<description><![CDATA[By now, virtually everyone on this planet heart about the Windows 8 Developer Preview that was launched a couple of days ago on the Microsoft BUILD conference. Everyone can download this developer preview. This will give you the opportunity to play and experiment with the new Metro layout for Windows. The developer preview also includes [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.nuonsoft.com/images/blog/win8_metro.png" width="194" height="109" align="left" hspace="10">By now, virtually everyone on this planet heart about the Windows 8 Developer Preview that was launched a couple of days ago on the Microsoft BUILD conference.<br />
Everyone can download this developer preview. This will give you the opportunity to play and experiment with the new Metro layout for Windows.</p>
<p>The developer preview also includes a preview of Microsoft Visual Studio 11 express edition, which makes it very easy to make Metro style applications in C++, C#, VB.Net, or JavaScript.</p>
<p>Any serious developer should download this preview and learn as much as possible about the new Windows platform.</p>
<p>Go to <a href="http://www.buildwindows.com/" target="_blank">the BUILD website </a>to download the preview and to download interesting video recordings of the sessions on the BUILD conference.</p>
<p><a class="a2a_dd a2a_target addtoany_share_save" href="http://www.addtoany.com/share_save#url=http%3A%2F%2Fwww.nuonsoft.com%2Fblog%2F2011%2F09%2F20%2Fwindows-8-developer-preview%2F&amp;title=Windows%208%20Developer%20Preview" id="wpa2a_40"><img src="http://www.nuonsoft.com/blog/wp-content/plugins/add-to-any/share_save_171_16.png" width="171" height="16" alt="Share"/></a></p>]]></content:encoded>
			<wfw:commentRss>http://www.nuonsoft.com/blog/2011/09/20/windows-8-developer-preview/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

