Howdy,
Well, there are a couple of ways you can do it.
if the cubes are editable objects, you can use the Axis tool to position the cubes' axes so that they're located at the proper pivot points of the leg. Then make sure the Z axis of each one is pointing to the next child object down. Then you can apply the IK directly to the cubes:
http://www.cactus3d.com/IKOnCubes.mov
Or, you can setup the IK on joints, and then piggyback the cubes to the joints by making them children of the joints. But, make sure they're made "second" children of their respective joint so you don't break up the flow of the IK calculation:
http://www.cactus3d.com/CubesOnJoints.mov
I hope that helps.
Adios,
Cactus Dan
Cinema 4D R10 XL Bundle, BodyPaint, Dynamics
www.cactus3d.com
www.cactus3d.com/Plugins.html