in reply to Can this be done?

Check out the Inline modules. Inline:CPP may be of use for your current problem, but they're all fun to work with :).