Thanks guys. I'll look at your suggestions, later today. In the meantime, I thought of an alternative approach. Does anybody understand the mechanism whereby CString (a class) can represent itself as though it was a LPCTSTR?
Ideally, that's what I need. A class that can "disguise itself" as though it were an integer - but whose operators (+, -, = etc) could all be overloaded to simulate 24 bit arithmetic. If CString can pretend to be a const TCHAR*, it must be possible for other classes to do something similar.
"A problem well stated is a problem half solved.” - Charles F. Kettering