As long as you're willing to redraw the entire title-bar contents, then you can use the DWM API's DwmExtendFrameIntoClientArea method, which involves setting your window to have no titlebar, allowing the DWM to draw its glass into your usable area to create a new space that looks like the titlebar but is in fact in your client area, so that you can draw buttons onto it.
The downside of this method is that you'll have to make the standard buttons if you want them. Minimize, Maximize and Close are no problem to recreate (though you'll find that the maximize button is a togglebutton with appearance based on the state), but you might find you have issue with recreating the top-left corner button. You'll also have to redraw your title, of course, but I can't imagine you'll have any issue with that.
As for reading the current theme's data back to restyle your buttons as theirs, I'm sorry but I don't know anything about that. My suggestion would be to use transparency when building your buttons onto the titlebar, and to use translucent glow-effects, etcetera. That way you'll be able to retain the glass background, and simply modify its appearance by overlaying a translucent colour. Also, if you do it this way, then the shifting specular highlights on the glass will move naturally, whereas if you simply got their theme colours you'd find either that you didn't get access to their reflections or that they recreated afresh within the space of your buttons. Just my two cents, of course - if you can find a way to do your theme colours etcetera, by all means.
There's one caveat to this though - there's another StackOverflow thread (http://stackoverflow.com/questions/2666979/net-framework-4-0-and-drawing-on-aero-glass-issue/4656182#4656182) which is describing an issue with the DWM API DwmExtendFrameIntoClientArea method, so if I were you, I'd read through that before trying this solution.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…