what i wanted todo is export a door from 3dsmax to directx and make that animation play, i have it working for characters but not models such as doors,windows,garages etc, are you suppose to rig these with bones?, can anyone shed some light on the situtation , thanks
Ah, this happens to be my area of specialization. There are different approaches. The easiest way that fits the same pattern that you have in place for characters would be to export the garage door, building door, etc as a sort of character. You create one or two bones in the rig and weight all vertices for the door, or each panel of a garage door to a single bone. Then each piece won't deform when the bone is transformed. If you ever need to dislodge the thing, it effectively becomes a ragdoll problem. If you ever need to "dismember" individual bones then it becomes more problematic, but not unsolvable.
At work we use a couple of different approaches. For weapons with moving parts we do the above. Our vehicles are built from individual components that can be broken off and simulated. So we have a special MAX tool that walks the component hierarchy and builds a special vehicle rig. Then we can animate that rig, and feed the transforms in to the physics system. So we are effectively animating physics until physical forces need to take over. This allows the components to become "dismembered" without extra systems.
For garage doors we have a pretty complex tool that does something similar as above, but you can drag and drop different components - such as garage door panels or whatever else onto the rig, then play animations on it.
If I was doing this for my personal project I would probably choose the method that is the most generic so there is less maintenance. I would go with the first option unless dismemberment was a requirement, then I would go with the second.
While I realize my suggestion probably isn't a nice thing to change since you already have .X working, I'll still give my thoughts on this. I'll also say I don't know much about the X format, but i'm assuming there are limitations from your post.
When a file format doesn't do what I want, I stop using the format instead of trying to shove things into it. I've always preferred to work with tools that can treat geometry as a nodes or bones and have both rigid and skinned parts. I'd think that window or door should be two nodes with the moving part as a child of the frame. This is obviously something you can do in 3dsmax and it's fairly easy to support in your own code.
In this case I'd either write my own exporter for max (ugh) or use some other export format. I've done both before and once it's working properly it can be very nice. You get exactly what you want, and you can extend it because you wrote it. You could export FBX, and use the fbxsdk to import the data. Either an exporter or fbx isn't a super quick thing to get working, especially with vertex weighting, proper hierarchy, and animation data. It can be challenging and frustrating until it works, but I think it's worth it in the end.