One possibility is to put all ID's of buttons in an array:
or create a struct/classCode:UINT aButtons[10] = { IDC_BUTTON1, IDC_BUTTON2, ....};
and put these class objects in an array. If necessary derive from your base class and use a different implementation for MyFunction() in the derived classes.Code:class CMyClass { UINT m_id; int m_iChannelNr; virtual void MyFunction(); };
Hope this helps.





Reply With Quote