I've tons of list controls on an mfc dialog, For some of these controls I named IDs that have same prefix. I see (NAME) attribute in the properties window that has the same name as the ID value. I wanted to extract the name of these list controls and perform certain operations based on prefix.
This is where I am stuck. I need a function like GetCntrlName that returns me those IDs as strings. Am I thinking correct?
HWND hwnd = ::GetTopWindow(this->GetSafeHwnd());
while(hwnd){
UINT nID = ::GetDlgCtrlID(hwnd);
//::GetCntrlName(hwnd, nID, buffer, bufferLength);
hwnd = ::GetNextWindow(hwnd, GW_HWNDNEXT);
}