|
Hi,
for a brand new, full featured version, visit
SoftwareHive[^]
This page tries to give something back to the famous CodeProject site!
|
|
|
|
|
Your this program is full of creation!
However, I have a question to ask you:
If there are 2 desktops: A, B; If I startup program P in Desktop A,then the icon of P will appear on the Taskbar of Desktop A; but when I switch to Desktop B, How can I enable the icon of program P appear on the taskbar of desktop B?
I want to change and improve my programming skill
|
|
|
|
|
There is no easy task to perform this. Because the program manager (explorer, who owns the icon of your app) will only be informed about programs launched on the desktop its running on.
So from my point of view there is no (known by me) possibility to perform the stuff you are planning.
Sorry.
|
|
|
|
|
|
I can add hot-key to new desktops but I found I can not switch back to default. Any suggestion?
|
|
|
|
|
Hi,
just try pressing <ctrl><alt><f1>.
It is set per default to swich back to the default desktop.
Calling the program with /c parameter will also work (but this also wipes existing configuration settings)
|
|
|
|
|
Don't know if anyone has the same problem? How to resolve it? Thanks.
|
|
|
|
|
Hi,
well, the Adobe plug in (sometimes) opens a new window asking you to check for updates. This window will be opened mostly on the "default" desktop. So if you call the Adobe from a different desktop, there is a modal window on the default desktop and your app will not respond any loger. BTW: The same behaviour happens also if you pressed <alt><tab> to switch away from Adobe and the primary Adobe window lays now in front of the message box.
Hope that helps...
|
|
|
|
|
dual monitors!
Very good work, you got my 5!
Trying to make bits uncopyable is like trying to make water not wet.
-- Bruce Schneier
By the way, dog_spawn isn't a nickname - it is my name with an underscore instead of a space. -- dog_spawn
|
|
|
|
|
You mentioned, Linux and Unix platforms. Is there a way to allow a new desktop to be created with a RunAs or something to allow another user run concurrently on the machine with VNC or something?
Hmmm.... Could be a marketable app...
Info sponge
|
|
|
|
|
;P
First I must say it is a very usefull tool.
I think I will use it often in future, but there
is one thing I can mention, which you can improve.
In my first test I gave a new desktop a silly (test)-name
an now this name is in the list and can not be removed.
I tried a look in the registry but didn't find this
name in the prgram section.
So it would be very useful to know how to delete the
desktop names.
|
|
|
|
|
Thanks for the wonderfull tool. I would use it very much.
I second on the opinion that there should be a delete option to delete the unwanted desktops and free up all the resources that are being used by the unwanted desktop..
Cheers
Alpesh
|
|
|
|
|
Well, the deletion of the desktops is a little bit tricky...
Havent found out how to manage this (the platform SDK says, freeing up all the windows attached to the new desktop will also free up the desktop itself, have tried it, but it does not work. Maybe it depends on some hidden windows created by processes started at the new desktop).
Maybe someone of you can solve the problem and post it in this section.
To be honest, I also do not have the need to free up the desktops, because i am always using them...
Maybe Blake Coverett (posted comments on this article) can tell us something about?
|
|
|
|
|
Well if I cant't delete the entry, what's about renaming.
In the first test of this program I named the new desktop "xyz"
what isn't a really self-documenting name.
But once again, a really nice tool.
Rüdiger
|
|
|
|
|
About renaming:
Just select the Desktop of your interest, press RIGHT mouse button and select modify.
Dont forget to safe configuration later. At next start of this tool, the modifications should be stored and executed.
|
|
|
|
|
... at least for XP users you've re-invented the wheel:
http://www.microsoft.com/windowsxp/pro/downloads/powertoys.asp
|
|
|
|
|
Thanks, well havent seen it. Nevertheless, i need this tool on 2k and XP.
|
|
|
|
|
These aren't really the same thing. The desktop manager toy that comes with current versions of the powertools doesn't use the real desktop API's at all. It just moves/hides windows around on the default desktop to simulate things. This has the advantage of letting you move running applications from one desktop to another, but the disadvantage of not working with applications that aren't pumping messages, not supporting different resolutions on the different desktops, and less complete separation. One of the older NT resource kits had a tool that actually used the desktop API, it was called 'vdesk'.
-Blake
|
|
|
|
|
There is another application by Hummingbird that implements a virtual desktop.. It comes with the exceed package that allows one to display Unix Xwindows on a Windows platform.
info sponge
|
|
|
|
|
I created a new desktop and switched to it and hit windows-E to get a new explorer window twice and they never showed up. I switched to my original window and both the exprorer window were there.
Ray
|
|
|
|
|
This is unavoidable. Registered hotkeys are a global thing across all desktops and the first instance of Explorer on your default desktop registered Win+E and all the other standard shell hotkeys. Unless the application is explicitly multi-desktop aware, when it gets the WM_HOTKEY it will take action on the desktop where it's message pump is running.
It isn't hard to make an application of your own multi-desktop aware, you just have to use OpenInputDesktop when you get that hotkey and be sure you act on the resulting desktop. Unfortunate Explorer does not do this. (Nor to most applications.)
-Blake
|
|
|
|
|
Glad to see there are a few others who use the real desktop support in the NT based versions of Windows. I keep meaning to post an article about the tool I wrote do to this back around the NT 3.51 era; I can't stand using a machine without it.
Some feedback, in no particular order:
~ There is no need to run an instance of your application on every desktop. A process is bound to a specific WindowStation, but each thread can be attached to a different desktop. It would be both more efficient, and easier to code, if you just created a thread per desktop instead of a whole process.
~ You shouldn't use an 'sz' hungarian prefix on both LPTSTRs and CStrings.
~ Seems you missed the API function ExpandEnvironmentStrings(), no need to reimplement it.
~ Why force a big heavy shell on each new desktop? You are already hooking hotkeys, how about letting them launch apps that way. (Explorer used to have some issues with being run in multiple instances, btw, it likely still does.)
~ I'm unclear why you are wrapping a mutex around your desktop enumeration. What purpose does this serve?
regards,
-Blake
|
|
|
|
|
Yepp, you are right, but as i said before, this is a "quick and dirty" fast implementation.
The topic about launching a new instance of the program:
Well, yes, thats right, just implementing different threads would help, but i was too putridly to do it. Shame on me....
The mutex: Well, this mutex was just designed for (further) multithreaded application (as mentioned by you).
|
|
|
|
|
Thanks again for input.
Most of the requests are covered in the latest version.
regards
|
|
|
|
|
This looks like good stuff, unfortunately, does not build on my machine. Is this WinXP only or something? It does not build on Win2k, VC6 SP5, looks like a different api. Am I missing something totally obvious? Here is some of the build log to save explanation, any reply appreciated in advance :
Compiling...
MFConfigurationDlg.cpp
C:\Program Files\VirtualDesk\MFConfigurationDlg.cpp(362) : error C2065: 'TPM_HORNEGANIMATION' : undeclared identifier
MFDeskTopHelper.cpp
C:\Program Files\VirtualDesk\MFDeskTopHelper.cpp(664) : error C2039: 'dwState' : is not a member of '_NOTIFYICONDATAA'
c:\program files\microsoft visual studio\vc98\include\shellapi.h(500) : see declaration of '_NOTIFYICONDATAA'
C:\Program Files\VirtualDesk\MFDeskTopHelper.cpp(664) : error C2065: 'NIS_HIDDEN' : undeclared identifier
C:\Program Files\VirtualDesk\MFDeskTopHelper.cpp(991) : error C2664: 'OpenDesktopA' : cannot convert parameter 1 from 'class CString' to 'char *'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
MFDesktopSwitcherDlg.cpp
C:\Program Files\VirtualDesk\MFDesktopSwitcherDlg.cpp(283) : error C2039: 'dwState' : is not a member of '_NOTIFYICONDATAA'
c:\program files\microsoft visual studio\vc98\include\shellapi.h(500) : see declaration of '_NOTIFYICONDATAA'
C:\Program Files\VirtualDesk\MFDesktopSwitcherDlg.cpp(283) : error C2065: 'NIS_HIDDEN' : undeclared identifier
C:\Program Files\VirtualDesk\MFDesktopSwitcherDlg.cpp(389) : error C2065: 'TPM_HORNEGANIMATION' : undeclared identifier
MFKeyTranslator.cpp
C:\Program Files\VirtualDesk\MFKeyTranslator.cpp(76) : error C2065: 'VK_XBUTTON1' : undeclared identifier
C:\Program Files\VirtualDesk\MFKeyTranslator.cpp(76) : warning C4018: '==' : signed/unsigned mismatch
C:\Program Files\VirtualDesk\MFKeyTranslator.cpp(77) : error C2065: 'VK_XBUTTON2' : undeclared identifier
C:\Program Files\VirtualDesk\MFKeyTranslator.cpp(77) : warning C4018: '==' : signed/unsigned mismatch
tor.cpp(391) : error C2051: case expression not constantC:\Program Files\VirtualDesk\MFKeyTranslator.cpp(120) : error C2065: 'VK_SLEEP' : undeclared identifier
C:\Program Files\VirtualDesk\MFKeyTranslator.cpp(120) : warning C4018: '==' : signed/unsigned mismatch
C:\Program Files\VirtualDesk\MFKeyTranslator.cpp(163) : error C2065: 'VK_OEM_NEC_EQUAL' : undeclared identifier
C:\Program Files\VirtualDesk\MFKeyTranslator.cpp(163) : warning C4018: '==' : signed/unsigned mismatch
........
.........
C:\Program Files\VirtualDesk\MFKeyTranslator.cpp(236) : error C2065: 'VK_OEM_BACKTAB' : undeclared identifier
C:\Program Files\VirtualDesk\MFKeyTranslator.cpp(236) : warning C4018: '==' : signed/unsigned mismatch
C:\Program Files\VirtualDesk\MFKeyTranslator.cpp(263) : error C2051: case expression not constant
.....
.....
C:\Program Files\VirtualDesk\MFKeyTranslator.cpp(401) : error C2051: case expression not constant
C:\Program Files\VirtualDesk\MFKeyTranslator.cpp(401) : fatal error C1003: error count exceeds 100; stopping compilation
Generating Code...
Error executing cl.exe.
MFDesktopSwitcher.exe - 109 error(s), 58 warning(s)
"Life begins at 140"
|
|
|
|