How do I find out which edge the Windows Taskbar is on?

Simple. You use the SHAppBarMessage api with the ABM_GETTASKBARPOS flag, like this:

#include "shellapi.h"

APPBARDATA abd;
abd.cbSize = sizeof(abd);
SHAppBarMessage (ABM_GETTASKBARPOS, &abd);
switch (abd.uEdge)
{
   case ABE_TOP:
      AfxMessageBox ("Taskbar is at top");
      break;

   case ABE_BOTTOM:
      AfxMessageBox ("Taskbar is at bottom");
      break;

   case ABE_LEFT:
      AfxMessageBox ("Taskbar is at left");
      break;

   case ABE_RIGHT:
      AfxMessageBox ("Taskbar is at right");
      break;
}
Download