Adding new column dynamically in CXListCtrl adds progress control and check boxs...
-
Hello All I am using "CXListCtrl" in my application. I want to hide and show columns depending on the user selection, with some data (5 rows of data) present in the list control. I am using "DeleteColumn" and "InsertColumn" to remove and add column When I do "InsertColumn" a new column is added in the Header Control, in the location what i specify. When I tried to update the data for newly inserted column, progress bar is displayed and not my data. If I try to insert 2 new columns, Columns are getting added in Header Control but in the Column values "Progress Bar" and "Check Box" are shown. When I debugged I see the code where I update the data to corresponding new columns are getting executed correctly. After this code the following fucntion is getting called
CXListCtrl::OnCustomDraw(NMHDR* pNMHDR, LRESULT* pResult)
inside the function "(pXLCD && (pXLCD[nSubItem].bShowProgress))" is true so the following portion of the code gets executed, so Progress control is displayed!if (pXLCD && (pXLCD[nSubItem].bShowProgress)) { DrawProgress(nItem, nSubItem, pDC, crText, crBkgnd, rect, pXLCD); *pResult = CDRF_SKIPDEFAULT; // We've painted everything. }
Any Idea what is the problem? Thanks in advance - Ravi