Restoring lost icons on Windows 7 Task Bar

September 21, 2010

For the last few days I’ve been annoyed that some of my application icons have been ‘lost’, reverting to some default system icon.

This was particularily prevalent for applications pinned to the Windows 7 Taskbar.

Most detail I found involves rebooting the computer, but I tried a slightly different approach just now and it has worked fine, without the need for rebooting. My applications icons are now restored :)

To restore the application icons using the same process, do the following:

  1. Press and Hold the “Window Key” and press “R” (and then release both!)
  2. type “cmd” and press “Enter”
  3. type “taskkill /IM explorer.exe /F” [ Warning, may cause problems although it was fine for me. Also, if you are not worried about rebooting your system, you may skip this step and reboot after step 6 instead ]
  4. type “del /a %userprofile%\AppData\Local\IconCache.db
  5. type “explorer.exe
  6. type “exit

You’re icons should now be restored. If anything goes wrong - and it hasn’t for me – then just reboot.

You can press “CTRL_ALT_DEL” to get a task manager, and from there you can either reboot, or again try to run explorer.exe


Snap windows to an area of the screen in XP, Vista just like on Windows 7

September 15, 2010

On Windows 7 I very quickly got used to use the widow snap feature.

You can hold the windows-key and then use the direction keys to snap the window to the side of the screen, and it takes up half of your real-estate. I am ofter comparing window content so I find being easily able to quickly have each window take up half the screen to be very useful.

Back on my XP machine I missed this a lot, but thanks to one of the guys at work, I found out about Winsplit Revolution [ http://www.winsplit-revolution.com ] which he uses on Vista.

This little app offers a lot more options for snapping your windows not just to a side of the screen taking up 1/2 of it each, but also to the corners (1/4 screen use) and even into two rows of three small windows. This all in seconds, with a nice use of the numpad/arrows to easily and quickly select where in the screen you want the window to go (7 for top left, 3 for bottom right, etc).

It starts automatically on boot, and sits nice and quietly in the system tray, out of the way.

It really is the little things that make the big differences, and once you start using this app you’ll wonder how you ever lived without it.

Check out their demo video at http://www.winsplit-revolution.com/screenshots/videos-demos


Building direct show filters in Visual Studio 2008

September 9, 2010

First off, make sure you have the latest windows sdk.

The direct show base classes are in there now and not directx sdk.

There are required headers in direct show base classes in the samples directory of the sdk.

Thus, you need to reference the header files in

C:\Program Files\Microsoft SDKs\Windows\v7.0\Samples\multimedia\directshow\baseclasses

You will also to build that solution and link the lib file:

  1. Drop down the Tools menu, and select Options [ from http://www.lavishsoft.com/wiki/index.php/Visual_Studio_Paths ]
  2. In the box on the left is a list of option categories. Select “Projects and Solutions” and then the sub-category “VC++ Directories”
  3. In the upper right hand corner is a drop-down box that selects a particular set of default directories, including “Executable files”, “Include files”, “Reference files”, “Library files”, and “Source files”. Generally, you only want to add to the “Include files” or “Library files” lists. Select “Include files”
  4. In the middle of the right hand side of the window is a list of directories.
    1. Add the include path by pressing the “New Line” button above the window, or by pressing “Ctrl-Insert” or clicking under the last entry.
    2. A blank entry appears for you to either type the path or navigate by clicking the “…” button.
    3. Generally the final path you want will end with a folder called “include”. Enter the path now (e.g., c:\program files\isxdk\include)
      1. For direct show base classes, enter C:\Program Files\Microsoft SDKs\Windows\v7.0\Samples\multimedia\directshow\baseclasses
  5. Select “Library files” in the drop-down box
  6. In the same fashion as done for the include file path, add the path to the library files. (e.g., c:\program files\isxdk\lib\vs80)
    1. Add the direct show path C:\Program Files\Microsoft SDKs\Windows\v7.0\Samples\multimedia\directshow\baseclasses\release_mbcs
  7. You’re done, click OK

These includes need to be before the windows sdk includes, or you will have issues with definitions in refclock.h as there is another header of this name in the sdk.

I ran into this too. I found that you need to have the baseclasses directory (samples/multimedia/directshow) *before* the sdk include directory, since they both have a schedule.h file and refclock.h uses <> not ” for the include. I was slightly surprised to see that no-one else had mentioned this. [ http://social.msdn.microsoft.com/Forums/en/windowsdirectshowdevelopment/thread/5da8f0b8-d2a9-4caf-81e1-7f5788fa1c00 ]

The exact error reads as follows:

WIN32

c1xx : fatal error C1083: Cannot open source file: ‘WIN32′: No such file or directory

 

After I get this error once, I can recompile again, and since the changed file has now been compiled, it goes directly to linking and doesn’t spit this error out again.

I also found reference to other potential causes for this error online:

  • -Make sure the compiler sees /D “WIN32″, without /D it will try to compile WIN32.  Project + properties, C/C++, Command line.
  • -/I “” is your problem, it swallows the next /D.  I tried it and got the same error message. Not sure how you got it, there’s probably something wrong with Project + properties, C/C++, Additional include directories.
  • - I’d added an environment variable which had now been removed, thus creating an empty /I “”.

And that’s about all I took note of.


Follow

Get every new post delivered to your Inbox.