EDN Admin
Well-known member
I have a comctl32.dll version 6.00 on my development computer (winxp) and version 6.10 on my test computer(win7). I am adding additional columns to the list view using LVM_INSERTCOLUMN and the columns get mixed up using version 6.10. This works fine at first
but I when I call the same code (below) again I get mixed up columns i.e the initial 2 columns shift and the columns that I want to add after the initial 2 columns becomes the first 2 columns. E.g.
Column A| Column B //these are the initial columns
Column A| Column B |Column C|Column D |Column E //on first call the columns appear the way I want them.
Column C|Column D|Column A|Column B|Column E //this happens on the same call to the code below when using comctl32.dll version 6.10 but it does not happen in version 6.00
<br/>
<pre class="prettyprint HWND ch = (HWND)SendMessage(HsysList, LVM_GETHEADER,0,0);
if (ch != NULL)
{
int hc = SendMessage(ch, HDM_GETITEMCOUNT,0,0);
TCHAR *colhead[3] = {L"COLUMN C", L"COLUMN D", L"COLUMN E", };
for(int l=0; l < 3; l++)
{
LVCOLUMN lvc= {0};
lvc.cx =100;
lvc.pszText = colhead[l];
lvc.mask = LVCF_WIDTH | LVCF_TEXT;
SendMessage(HsysList,LVM_INSERTCOLUMN,hc++,(LPARAM)&lvc);
}
}
[/code]
<br/>
Is this revelant http://support.microsoft.com/kb/151897 ?<hr class="sig Signature series
View the full article
but I when I call the same code (below) again I get mixed up columns i.e the initial 2 columns shift and the columns that I want to add after the initial 2 columns becomes the first 2 columns. E.g.
Column A| Column B //these are the initial columns
Column A| Column B |Column C|Column D |Column E //on first call the columns appear the way I want them.
Column C|Column D|Column A|Column B|Column E //this happens on the same call to the code below when using comctl32.dll version 6.10 but it does not happen in version 6.00
<br/>
<pre class="prettyprint HWND ch = (HWND)SendMessage(HsysList, LVM_GETHEADER,0,0);
if (ch != NULL)
{
int hc = SendMessage(ch, HDM_GETITEMCOUNT,0,0);
TCHAR *colhead[3] = {L"COLUMN C", L"COLUMN D", L"COLUMN E", };
for(int l=0; l < 3; l++)
{
LVCOLUMN lvc= {0};
lvc.cx =100;
lvc.pszText = colhead[l];
lvc.mask = LVCF_WIDTH | LVCF_TEXT;
SendMessage(HsysList,LVM_INSERTCOLUMN,hc++,(LPARAM)&lvc);
}
}
[/code]
<br/>
Is this revelant http://support.microsoft.com/kb/151897 ?<hr class="sig Signature series
View the full article