Click here to Skip to main content
15,881,850 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am creating a listview control using WTL as below
XML
hwnd = CWindowImpl<ListView, CListViewCtrl>::Create(0, rcDefault, _T("Parameters"),
        WS_VISIBLE|LVS_REPORT|LVS_SHOWSELALWAYS|TVS_TRACKSELECT, WS_EX_TOOLWINDOW);


Background: I am having one MFC executable application containing various dll. This piece of code is a part of the dll having totally written using WTL support. This dll is having one window containing one TreeViewCtrl and one ListViewCtrl.
This piece of code was working fine on windows7 and winXP both machines earlier. Recently we upgraded our project with the latest version of MFC bundled with visual studio 2010 and which is having Office Ribbon support.

Now after these changes my application is running properly on Windows7 but failing on Winodws XP. I debugged and figured out stackoverflow exception in one of ATL file. Importantly if i am creating this listview control without LVS_REPORT view. its launching and working properly.

So far i am not getting any clue why is it happening? Any clue any idea will be appreciated.

Thanks in advance.
Posted

The style tag TVS_TRACKSELECT is 0x0200 which equates to LVS_EX_REGIONAL as described in http://msdn.microsoft.com/en-gb/library/windows/desktop/bb774732(v=vs.85).aspx[^].
 
Share this answer
 
Thanks Richard for your solution. But I have tried all the possible combination one by one. Even I have tried creating this listview only with LVS_REPORT and this was also failing.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900