Is a call to CBrush::DeleteObject a good/bad/neutral idea in this case
Posted on 2006-11-06
I am using a function that draws text on the screen, and, based on mouse input, some portion of the screen needs to be highlighted by the use of a user selected(previously) background color. This function also decides what color the text will be.
My specific question: is the cb.DeleteObject line necessary, prohibited, or otherwise?
Secondary Questions: Is there a significantly better way to accomplish what I want to accomplish?
Is there a dead solid way to determine when a DeleteObject is required?
static COLORREF StdBK;
else if (Index>(SCH_COLOR_COUNT-1))Index=SCH_COLOR_COUNT-1;
I should add that this function is called probably 100 times on a typical OnDraw();
thanks in advance, Rick