don's blog

XUL: How to implement a multi-line flex-capable text-selectable element

The Issue

XUL description elements are not text-selectable and do not support the right-click edit menu.  However, they handle the flex attribute nicely by wrapping at the maximum width, and expanding the container box vertically.

For text selection, what you typically want to use is a textbox with class="plain", multiline="true", and readonly="true".  This emulates a description element fairly well. 

IE extensions: Manipulating any request or viewing any response

Summary

A common requirement for an IE extension (BHO or toolbar) is for it to be able to manipulate any request that is made by the browser.  Another common requirement is for it to be able to view any response that the browser recieves.  For example, perhaps you need to add a header to every request that is sent.  Or you wish to view httponly cookies.  Unfortunately, this is no easy task.

PassThroughAPP

Creating Processes: Sessions and Integrity Levels

Changing Integrity Levels 

There are times when you might want to create a process with a different integrity level than your current process.  For example, you might want to launch IE at medium or low integrity from an installer that is running at high integrity.  If you just call CreateProcess, then IE would be launched at high integrity instead of low, and would not run in protected mode.

Drawing disabled images / icons / buttons

If you've ever needed to draw images or icons as if they are disabled ("grayed out"), you will find the Win32 API to be a disappointment.  DrawState with DST_ICON | DSS_DISABLED works but the images look much worse than the standard disabled images on Vista.  And DrawThemeIcon with PBS_DISABLED does nothing special.

Course editor for PPC version of Pin Distance

A new tool is available that will allow you to create your own course files (only for the PPC version).  It integrates with Google Maps to allow you to find your course, navigate the map to the center of the green, and automatically extract the coordinates:

http://blackfishsoftware.com/sites/default/files/PinDistanceCourseEditorSetup110.exe

Thanks to Jacob Madsen for creating this tool and sharing it with other Pin Distance users.

Thanks Jacob!

 

Visual Studio Watch Window: Viewing structures when out of type definition context

I was debugging a release project, where I was in disassembly, and I needed to trace back up the callstack to look at some of the parameters.  The callstack context was jscript.dll, and it was making an IDispatch::Invoke call.  I wanted to look at the DISPPARAMS argument.

If you try (tagDISPPARAMS) 0x01fe3894, it won't work because in the context you are in, the tagDISPARAMS structure is not available.

TortoiseSVN: How to supply a port number

The Problem 

I had to access a client's SVN repository through SSH but on a port other than port 22.  I tried specifying the port number at the end of the server name, like the following:

svn+ssh://don@www.theserver.com:20021/rest/of/path

I received the misleading error "no repository found in 'svn+ssh://don@www.theserver.com:20021/rest/of/path'"

How to make it work

IE Toolbar crashes in IE 8 Beta 2

The problem: A client's IE toolbar was crashing on the beta 2 version of IE 8 as soon as IE started up. This was an easily reproducible crash. The end of the story is that IE 8 has a feature called LCIE which runs each tab in its own process. The toolbar was sending messages to the parent rebar control which as of IE 8 beta 2 is now resulting in a cross-process SendMessage. If the message is not marshalled (more on that later), and contains pointers to memory space, then this could easily crash the receiving process.

Below is an analysis of the discovery process for this bug:

Site converted to Drupal

I have been investigating various CMS systems.  The previous site was running on DotNetNuke.  I decided to switch to Drupal (after experimenting with PHPNuke and investigating Joomla briefly), and am so far pretty happy with the Drupal architecture, although I've had some difficulty getting Panels / Panes to work exactly right.

I've documented the experience in case someone could benefit from some of the tips, tricks, or gotchas that I encountered along the way:

Building and running Shindig (the OpenSocial container)

Shindig is an open source project that provides the base implementation for an Open Social container.  I'm exploring a potential Open Social opportunity that will require me to host my own Shindig server, so today was my day to get my hands dirty with a Shindig server.