Most of that sample is actually how to deal with the Window API to get a window that redraws itself when resized. All that has nothing to do with Direct2D. Drawing the rectangle is just three lines, actually.
The files on that page wouldn't load for me-- the podcast that's being drawn from is here, and the Direct2D portion is around the 1 hour mark: