Creating and Switching to Different Desktops | CodeGuru

Creating and Switching to Different Desktops

Click here for a larger image. Environment: VC6, Win2k, WinXP After working with systems such as Linux, I was surprised about the missing feature of virtual desktops under Windows systems. Nevertheless, they are supported by MS, but there is currently no tool to work with them. All tools (such as Stardocks tools and NVidia tools) […]

Written By
CodeGuru Staff
CodeGuru Staff
Nov 10, 2003
1 minute read
CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More



Click here for a larger image.

Environment: VC6, Win2k, WinXP

After working with systems such as Linux, I was surprised about the missing feature of virtual desktops under Windows systems.

Nevertheless, they are supported by MS, but there is currently no tool to work with them. All tools (such as Stardocks tools and NVidia tools) are limited by one very important feature: If an application on an active screen is blocking, the whole switch is impossible. Son I wrote a little program to handle virtual desktops.

There is also a configuration dialog, used to configure the default shell of an desktop. Normally, this is the explorer.exe, but you can also define other programs. Just select the executable and possible parameters used on starting up the shell process.

The sources are not well documented (and not completely new; the Platform SDK also provides a similar program, btw), and also full of crappy code, but you can use it as a base code to develop your own application.

The main class handling all the related stuff is encapsulated in CMFDeskTopHelper. Also, there are some helper classes for:

  • Creating a single input window

  • Processing the Registry

  • Parsing input keys, and

  • Getting hotkey values

Downloads


Download demo project binaries – 28 Kb


Download source – 73 Kb

CodeGuru Logo

CodeGuru covers topics related to Microsoft-related software development, mobile development, database management, and web application programming. In addition to tutorials and how-tos that teach programmers how to code in Microsoft-related languages and frameworks like C# and .Net, we also publish articles on software development tools, the latest in developer news, and advice for project managers. Cloud services such as Microsoft Azure and database options including SQL Server and MSSQL are also frequently covered.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.