After generating unique item ID, you can use SubclassDlgItem, which effectively calls SubclassWindow. You can call SubclassWindow without item ID, as I suggested in my first post.Code:// from wincore.cpp BOOL CWnd::SubclassDlgItem(UINT nID, CWnd* pParent) { HWND hWndControl = ::GetDlgItem(pParent->m_hWnd, nID); if (hWndControl != NULL) return SubclassWindow(hWndControl); ... }




Reply With Quote