
Obtaining Resource ID from a CDocTemplate
Given an instance of a CDocTemplate-derived class, how can I get the
associated resource ID? It seems that the m_nIDResource member is protected
and unaccessable.
I need to access this member for the following reason (maybe someone could
suggest something else?):
I have an array of CDocTemplate pointers my application supports. I have
overridden CWnd::OnFileNew() and display my own dialog box. This dialog
contains a list view control that I want to fill with the description of
each template in the array (using the document string
CDocTemplate::regFileTypeName) and its associated small (16x16) icon. I'd
like to just pass my array of CDocTemplate pointers to the dialog, not an
additional array of resource identifiers, as well.
It seems that there should be a way of obtaining the icon (or any other
resource) associated with a CDocTemplate when given the CDocTemplate object.
Thanks,
--
Steve