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

Visual C++ 2010 Beta 1 and the Windows 7 RC SDK

The Visual C++ 2010 Beta 1 release contains the Windows 7 Beta SDK. For Direct2D and DirectWrite there were some breaking changes between the beta version of the SDK and the RC version of the SDK. So if you want to use those new Direct2D and DirectWrite APIs, you definitely need the latest Windows 7 RC SDK. There are some manual steps involved in getting that to work with Visual C++ 2010. For detailed explanation please check out Using the Windows 7 RC SDK in Visual C++ 2010 Beta 1 on the Visual C++ Team Blog.

Share

Visual Studio 2010 and .NET FX 4 Beta 1 Released :)

Visual Studio 2010 Beta 1 and .NET FX 4 Beta 1 have been released and is available for download if you have an MSDN subscription. The beta 1 will be publicly released very soon. Check out http://www.microsoft.com/visualstudio/en-us/products/2010/default.mspx for more information.

Share

Preview of Upcoming Direct2D/DirectWrite Article

I’m working on a new article to be published on Codeguru. The new article will be about using Direct2D and DirectWrite on Windows 7 from C++. 

I was really impressed while playing with those new APIs. The two APIs combined are pretty powerful and allow you to easily render complicated formatted text. The screenshot below shows what the demo application that will be included with the article is capable of rendering. The code behind everything you see in the screenshot is pretty simple.

The demo will show rendering paragraphs of text with different fonts, font sizes, styles (bold, italic, underlined…), font colors, text alignment and so on. It also shows that mixing left-to-right and right-to-left text is not a problem and how to render fancy text using special typgraphic features that are present in certain fonts. Hit testing will also be included which can for example be used to embed interactive hyperlinks into DirectWrite rendered text. Click on the screenshot to see a full sized version 🙂

 

NOTE: I have no idea what the Arabic piece of text is saying, so do not blame me if it says something wrong. It’s just for demonstration purposes.

Share

Windows 7 on Track for Holiday Season

It seems that Microsoft Windows 7 is on track to be released in time for the holiday season of 2009. At the TechEd North America 2009 in Los Angeles, Bill Veghte said:

Microsoft is committed to ensuring that IT professionals and developers continue to have the platform and technologies to drive maximum value and business results. Getting the most out of IT investments is even more important in today’s economy.

and

With early RC testing and extensive partner feedback we’ve received, Windows 7 is tracking well for holiday availability.

Read the full press release.

Share