Search this site


Metadata

Articles

Projects

Presentations

Windows window management

My first real dive into any real windows programming was last week. There was much to learn: winapi, managed c++, wpf, and visual studio. Despite all the learning hurdles, I finally have a somewhat-working first-feature of a window management tool I'm working on - the first feature is being able to find an open window and jump to it.

For fun, it uses WPF's easy gradients and easy transparency. WPF's coolest feature is it's item templating, where you can easily represent a data object (say, a window structure) in the UI. The behavior of the tool right now is similar in behavior of my firefox tabsearch extension, where it shows only items matching input words (each word is treated as a regex, etc).

If you are curious, download winmgr.exe. When you run it, nothing happens - it registers the hotkey 'alt+space'. Press alt+space and then start typing the name of the window you want to switch to. Press enter to select the first window in the list.

I worked around VS Express' limitation around resource editing (it's not allowed) by telling VS to compile my UI files (XAML) with a custom ruby script that turned each into string-escaped #define (eg; #define FOO_XAML "<.....").