i think if you were to use 1 or 1.5 inch pvc, the black stuff, you'd be fine for strength....the canopy isn't going to weigh too much you know?
i was for some reason driving the other day thinking about how you could connect a wooden frame the the bed....well i came up with this...
if you were to use the pvc concept, you could make the whole cage to the size/height you wanted then attach by using multiple things (this is all of course theory ideas):
1. use a 4-post connection to each bed ring inside the bed with muffler clamps (the U shaped ones you can pick up for a couple bucks)
2. simple cable connection either tie each on individually or go to somewhere like harbor freight and pick up one/two cheap 1" tow cables with the simple rope lock mechanism (can't think of the actual name but i'm sure you understand what i'm talking about---similar to a ratchet cable but you just pull it to tighten it) also to each of the 4 rings in the bed corners
3. drill and bolt it into the bed with as many posts as you'd like
4. use 1" pvc and a rubber mallet and jam it into the square holes near the cab and just tie it down like above near the tail gate
5. make it a little bigger than the bed width and jam it into the bed
6. use a pvc cap. mount the cap where you would want the posts to be, drill through the bed, bolt the cap down, assemble the posts and cage.
these are of course just some random thoughts i had when driving back from work...haha
to attach the canopy, i would just use small hooks with bungees and drill holes (1/4 - 1/2 inch tall) into the pvc so everything can stay nice and snug. making your own holes in whatever type of material is easy with a grommet kit (walmart sells them or get them online cheap). so, in theory, it would be tarp with grommet, bungee, hook connected to hole in pvc.
hope this all can someone...if not...well at least i got to throw out my randomness thinking