Original Post
I am having trouble with a method which accepts a reference to a const RECT. It looks like this: I am trying to use this function but I am not sure how to do it! I tried this but it doesn't work because the RECT is not const. Then I tried this: But obviously this won't work because I can't assign to a const RECT, so what do I do? I know this obviously seems like a stupid question, but I don't really use const at all in my programming (before you start to flame, just stop). Thanks for any help. Mark Coleman
void SetPrintRect(const RECT& RPrint) { DoSetPrintRect(RPrint); }
RECT CustomRect.
CustomRect.top = 10;
etc etc
SetPrintRect(&CustomRect);
const RECT CustomRect;
// assignments here
SetPrintRect(&CustomRect);