Trip to Prague Photo Album

In June 2009 I went to Prague for a city trip with a few friends. I already posted a few pictures on my blog in this post.

I finally uploaded a few more pictures to a photo album. See them here. Enjoy 🙂

Share

Windows 7 breaks all pre-order records at Amazon

Apparently the pre-order of Windows 7 went extremely well. According to Amazon UK, they sold more Windows 7 pre-orders in the first 8 hours of its release than Vista did during it’s entire pre-order period.

According to Brian McBride, Amazon UK MD:

“The launch of Windows 7 has superseded everyone’s expectations, storming ahead of Harry Potter and the Deathly Hallows as the biggest grossing pre-order product of all-time at Amazon.co.uk, and demand is still going strong. Over the past three months, only Dan Brown’s The Lost Symbol has sold more copies than Windows 7, which is an incredible achievement for a software product.”.

Tomorrow is the official launch date of Windows 7 🙂

Share

Visual Studio 2010 and .NET Framework 4 Beta 2

Visual Studio 2010 and .NET Framework 4 Beta 2 are now available. The final version is scheduled for 22nd of March 2010. I’m looking forward to it 🙂

For Visual C++ developers there are lots of new things to look forward to, like parallel programming, MFC ribbon resource editor, easy application local deployment model etc etc…

When you use the .NET Framework you will apparently be able to have deployments with up to 81% reduction in the framework size by using the Client Profile.

According to the press release:

“The company also outlined a simplified product lineup and pricing options for Visual Studio 2010 as well as new benefits for MSDN subscribers, including the Ultimate Offer, available to all active MSDN Premium subscribers at the official product launch on March 22, 2010.”

The product lineup is simplified with the following versions:

  • Microsoft Visual Studio 2010 Ultimate with MSDN. The comprehensive suite of application life-cycle management tools for software teams to help ensure quality results from design to deployment
  • Microsoft Visual Studio 2010 Premium with MSDN. A complete toolset to help developers deliver scalable, high-quality applications
  • Microsoft Visual Studio 2010 Professional with MSDN. The essential tool for basic development tasks to assist developers in implementing their ideas easily

Download Beta 2 now.

Read the full Microsoft press release.

Share

Access Hidden Regional Themes in Windows 7

I just came across an interesting blog post.

Apparently, Windows 7 comes with several regional themes which include wallpapers from Canada, Australia, South Africa, and Great Britain. You can easily activate those themes following the procedure in the following blog post.

Access Hidden Regional Themes in Windows 7

Share

Windows 7 E Cancelled

It seems Microsoft will not release a Windows 7 E for the European Union after all. Windows 7 E was planned for the EU to be a Windows 7 version without Internet Explorer. Now, Microsoft will implement a ballot screen that will be shown the first time a user starts Internet Explorer. That ballot screen gives the user the option to select a different browser like Firefox, Safari, Chrome, Opera and so on.

Share

More Pictures of Miami 2009 Trip

In March 2009, my brother and me went to Miami on holiday.
I had already posted some pictures on my blog in the “Back from Miami, Steak and Whiskey” and “Holiday in Miami 🙂” posts.
We now have uploaded a lot more pictures. See them here. Enjoy 🙂

Share

Wallpaper Cycler 3.6.0.180 Released

Finally, Wallpaper Cycler 3.6.0.180 has been released today 🙂

Wallpaper Cycler 3.6.0.180 has a lot of new features and bug-fixes. Some of the major new features include:

  • Full High DPI support.
  • Support for Windows 7.
  • Support for 64 bit Windows.
  • Automatically rotate JPEG images based on camera orientation.
  • Option to manually rotate individual wallpapers.
  • Automatically assign a default tag to new wallpapers.
  • Option to automatically rerender the wallpaper on resuming from standby or hibernate.
  • New option “Cycle wallpaper when display settings changed”.
  • Folder synchronization will detect new folders.
  • More advanced Preview Window.
  • New Wallpaper Cycler Controller tool.
  • New Info Panel replaces the old Information Bar.
  • Align images inside wallpaper objects on layouts.
  • Layout objects now have an option ‘visible’.
  • High color toolbar images and menu images.
  • Multithreaded rendering.
  • New HTML renderer for text objects in layouts.
  • Option to generate only sensible aspect ratio tags.
  • Layout changes in the editor can now be discarded.

Get a full list of all the changes.

Share

Trip to Prague

A few pictures from my city trip to Prague in the Czech Republic. The last picture is taken in KutnĂĄ Hora, a small town near Prague and a UNESCO World Heritage site.

(Note: all pictures are copyrighted by me, Marc Gregoire. Please contact me if you want to use one.)

Share

Wallpaper Cycler: Bug Fixes and New Features

The following new features have been implemented in Wallpaper Cycler:

  • The text editors now have an extra button to insert a line break without a visible horizontal line.
  • The Info Panel now contains a “Set As Wallpaper” button in the upper right corner to make it easier to render the selected wallpaper to the desktop.
  • Wallpaper Cycler will now by default store the rendered wallpaper in “C:\Users\<username>\AppData\Roaming\NuonSoft\WallpaperCycler” or similar depending on the language of your Windows and whether you are running XP, Vista or Windows 7. Previously WPC would store the image in the user temp folder, but some tools cleanup the temp folder causing a plain colored background to appear on the next reboot of Windows.
  • An “Options…” menu item in the Wallpaper Cycler notification icon menu.
  • The fullscreen preview now shows a ‘(Image x of y)’ in the lower left wallpaper information block.

I made the following bug fixes for Wallpaper Cycler:

  • libexif.dll would sometimes crash with certain jpg files.
  • The yellow error message that appeared in the screensaver when WPC was not running was not moving around the screen anymore.
  • When folder synchronization adds new folders (= new categories) to disabled categories, the new categories are also disabled.
  • Rerendering of the wallpaper in the Lite version of Wallpaper Cycler would not always happen in a low priority thread.
  • When all categories were disabled, the “Start Cycling” button would be disabled, now it’s enabled and a warning will be shown when you press it to explain why cycling cannot start.
  • When a cycle was skipped due to CPU usage (when CPU monitoring is enabled), the timer would freeze.
  • Screensaver didn’t work on some systems.
  • When cycling to the next file based wallpaper, WPC will first check if the file still exist. If it doesn’t exist it will automatically cycle again. It will try this for 10 times after which an error message is shown with a suggestion on how to cleanup the list.
  • When the WPC screensaver was enabled, opening the Windows Screensaver control panel was pretty slow.
  • WPC will remember the old screensaver and when disabling the WPC screensaver it will restore this old screensaver. Previously, it also happened that WPC would remove any screensaver that was configured in Windows, this should also not happen anymore.
  • The option regarding hand-cursors in Options > Program Settings > Desktop has been rewritten a bit to make it more clear what is meant.
  • In the startup settings delay times for <Rerender on startup delay> and <Delay load last WCL at startup> now clearly mention that those are in seconds.
  • The words “tray icon” and “system tray” have been changed to descriptions based on “notification area” according to the Windows UI guidelines.
  • The main window could be resized too small when running in very high DPI (150%).
  • “error while create DIBSection in CWCL::RenderWallpaperWithLayout” appeared when Windows was waiting on the Switch User screen and WPC wanted to cycle the wallpaper.
  • After returning from screensaver or locked desktop, the timer of Wallpaper Cycler sometimes didn’t count down anymore.
  • Windows Gadget was not displaying correctly on Windows 7.
  • Height of new tray icon has been increased with 1 pixel.
  • The hotspots in the Info Panel kept working even when no wallpaper was selected in the main list.
  • When you have a ‘Give Tags’ hotkey assigned to open the tags menu for the selected wallpapers, it will now show a thumbnail in the menu when only 1 wallpaper is selected. This also works in the fullscreen preview window.
  • When the Give Tags menu opened, the main window or fullscreen preview doesn’t lose focus anymore.

I’m also happy to announce that I’m currently working on updating the website and preparing for finally releasing the 3.6 release 🙂

Share

Windows API Code Pack for Microsoft .NET Framework

I just stumbled upon the Windows API Code Pack for the Microsoft .NET Framework. It’s a code pack that allows .NET developers to take advantage of some of the new Windows 7 features.

Features supported by version 0.9 of the code pack are:

  • Windows 7 Taskbar Jump Lists, Icon Overlay, Progress Bar, Tabbed Thumbnails, and Thumbnail Toolbars.
  • Known Folders, Windows 7 Libraries, non-file system containers, and a hierarchy of Shell Namespace entities.
  • Windows 7 Explorer Browser Control.
  • Shell property system.
  • Windows Vista and Windows 7 Common File Dialogs, including custom controls.
  • Windows Vista and Windows 7 Task Dialogs.
  • Direct3D 11.0, Direct3D 10.1/10.0, DXGI 1.0/1.1, Direct2D 1.0, DirectWrite, Windows Imaging Component (WIC) APIs. (DirectWrite and WIC have partial support)
  • Sensor Platform APIs
  • Extended Linguistic Services APIs
  • Power Management APIs
  • Application Restart and Recovery APIs
  • Network List Manager APIs
  • Command Link control and System defined Shell icons.

Requirements:

  • .NET Framework 3.5 or later.
  • This library targets the Windows 7 RC version, though some of the features will work on the older versions of Windows operating system.
  • DirectX features have dependency on Windows SDK for Windows 7 RC and March 2009 release of DirectX SDK.

There are also a few short 2-minute videos available to show you how easy it is to use some of the above features.

Share

KulenDayz Presentation “What’s new in Visual C++ 2010?”

On saturday 13th of June I gave a presentation on KulenDayz titled “What’s new in Visual C++ 2010?”. The presentation consisted of quite a few demos. This post contains links to the source code for all demos including articles giving some more details.

Share

Parallel Pattern Library (PPL) in Visual C++ 2010

Visual C++ 2010 comes with a brand new library called the Parallel Pattern Library or PPL. It is a powerful library that makes writing parallel code easier which is getting more and more important with the current and upcoming multicore CPUs. This article will give an overview of the PPL. Read the rest of this entry »

Share

MFC Restart Manager Support in Visual C++ 2010

Windows Vista introduced the restart manager. It is used to automatically restart an application after it crashes. It can also be used to restart application after a reboot by a Windows Installer or update. If you create a new MFC application using the project wizard in Visual C++ 2010, you will automatically get support for the restart manager. If you want to add support to an existing MFC application, you only need to add 1 line of code to the constructor of your CWinApp or CWinAppEx derived class. Read the rest of this entry »

Share

CTaskDialog in MFC in Visual C++ 2010

Windows Vista introduced the concept of Task Dialogs. Those are a powerful replacement for the standard message boxes. Read the rest of this entry »

Share

Kulendayz Microsoft Community Event 2009

From 12th till 14th of June, the Microsoft Community Osijek (Croatia) is organizing the Kulendayz event. I will be giving a lecture titled “What is new in Visual C++ 2010?”. If you want to participate in the event, please register on the Kulendayz website.

Share

SafeInt in Visual C++ 2010

The SafeInt library is a new addition to Visual C++ 2010. It allows you to safely perform arithmetic operations on integers ranging from 8-bit to 64-bit. The SafeInt library will automatically detect arithmetic overflow or divide by zero. Using the SafeInt library is pretty easy. The following piece of code uses the SafeInt library to safely calculate the addition of two 8-bit integers. Read the rest of this entry »

Share

‘auto’ Keyword in Visual C++ 2010

Starting with Visual C++ 2010, the ‘auto’ keyword has a different meaning. Auto is now used as a variable type and it instructs the compiler to figure out the exact type itself. This makes it much easier to define function pointers or to iterate over vectors for example. This post will give a brief overview of how to use the ‘auto’ keyword. Read the rest of this entry »

Share

The ‘Move Constructor’ in Visual C++ 2010

A new feature in Visual C++ 2010 is called Rvalue References. This is a feature from the C++0x standard. One thing that Rvalue References can be used for is to implement move semantics for objects. To add move semantics to a class, we need to implement a move constructor and a move assignment operator (optional). This article will briefly explain the benefits of move constructors and how to write them. Read the rest of this entry »

Share

Introduction to DirectWrite

Microsoft has added two interesting new API’s to Windows 7: Direct2D and DirectWrite. Direct2D replaces GDI and GDI+. It can render more accurate results and has support for hardware acceleration on your graphics hardware. DirectWrite is a new API to render text. It makes it easy to render paragraphs of text that can contain different formatting, coloring, fonts etc. It supports horizontal and vertical alignments, even vertical centering of a paragraph with multiple lines which was not possible with the old text API, etc. This article will give an introduction to the new DirectWrite API. Read the rest of this entry »

Share

How To Use UpdateLayeredWindow

In this post I will briefly explain how to use layered windows and specifically how to use UpdateLayeredWindow.

The first thing you need to do is add the WS_EX_LAYERED style to your window. This can for example be done with a call to CreateWindowEx:

hWnd = CreateWindowEx(WS_EX_LAYERED, szWindowClass, szTitle, 0,
         CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hInstance, NULL);

After your window is created we will load a PNG file with an alpha channel and use UpdateLayeredWindow to render the PNG on the window using the alpha channel of the PNG file as the transparency level for the window. This is done as follows:

// Load our PNG image
CImage img;
img.Load("circle.png");
// Get dimensions
int iWidth = img.GetWidth();
int iHeight = img.GetHeight();
// Make mem DC + mem  bitmap
HDC hdcScreen = GetDC(NULL);
HDC hDC = CreateCompatibleDC(hdcScreen);
HBITMAP hBmp = CreateCompatibleBitmap(hdcScreen, iWidth, iHeight);
HBITMAP hBmpOld = (HBITMAP)SelectObject(hDC, hBmp);
// Draw image to memory DC
img.Draw(hDC, 0, 0, iWidth, iHeight, 0, 0, iWidth, iHeight);

// Call UpdateLayeredWindow
BLENDFUNCTION blend = {0};
blend.BlendOp = AC_SRC_OVER;
blend.SourceConstantAlpha = 255;
blend.AlphaFormat = AC_SRC_ALPHA;
POINT ptPos = {0, 0};
SIZE sizeWnd = {iWidth, iHeight};
POINT ptSrc = {0, 0};
UpdateLayeredWindow(hWnd, hdcScreen, &ptPos, &sizeWnd, hDC, &ptSrc, 0, &blend, ULW_ALPHA);

SelectObject(hDC, hBmpOld);
DeleteObject(hBmp);
DeleteDC(hDC);
ReleaseDC(NULL, hdcScreen);

Because I’m using CImage, you need to include the atlimage.h header.

That’s all that is required for the basics of UpdateLayeredWindow.

NOTE: The example above does not include any error checking. That is left for the reader as an excercise.

Share