I am trying to use CDC::EnumObjects method just like this:

Code:
	CDC dc;
	dc.Attach(hDC);
	dc.EnumObjects(OBJ_PEN, EnumObjectHandler, 0);
from here: https://msdn.microsoft.com/en-us/lib...or=-2147217396

and

Code:
BOOL CALLBACK EnumObjectHandler(LPVOID lpLogObject, LPARAM lpData)
{
	return TRUE;
}
and it works.

My question is, can I move this function, in an class, as member function (method), but, most important, without changing as static ? Yes, I can put here my trials, but none of them had worked ... perhaps it is not possible what I am trying to do