Selection is gray in a CListCtrl
-
Oh, um, are you using a manifest under VC6? I know when you use manifests (to get the XP style look), imagelists behave differently. I think, but not certain by any means, that the newer compilers handle this without problems, but I'm fairly sure VC6 won't. I've found CImageList won't work quite right, I had to use the macros like ImageList_Create for it to work right.
-
VC7 has an option during project creation for including a manifest for C++ apps that defaults to "ON". Check your project or project/res directory for a .manifest file. If you have one, then its probably being used. Try turning it off.
-
VC7 has an option during project creation for including a manifest for C++ apps that defaults to "ON". Check your project or project/res directory for a .manifest file. If you have one, then its probably being used. Try turning it off.
How do I do that? My test app project has a manifest file, but my real project does not. With both projects exhibiting the same behavior, one has a manifest and the other does not, I can't believe that is the problem. Anyway, I can't find a setting in the project configuration for turning it on or off. I also searched the vcproj file for a hidden setting.
-
How do I do that? My test app project has a manifest file, but my real project does not. With both projects exhibiting the same behavior, one has a manifest and the other does not, I can't believe that is the problem. Anyway, I can't find a setting in the project configuration for turning it on or off. I also searched the vcproj file for a hidden setting.
Ah, sorry, too many different compilers/languages on my system. It'll be in the resources of the project, you'd have to delete it from there.
-
Ah, sorry, too many different compilers/languages on my system. It'll be in the resources of the project, you'd have to delete it from there.
-
Bummer. I'm fresh out of ideas. I'm sorry I couldn't figure it out for you. Hope something clicks and it works out.
-
Bummer. I'm fresh out of ideas. I'm sorry I couldn't figure it out for you. Hope something clicks and it works out.
-
Thanks, I appreciate your efforts on my behalf. When I get a fix, I will post it here. I have asked Microsoft for help on this one. Royce
I have found a fix for this problem, but I can't as yet explain why it works the way that it does. I am now creating my ListCtrl like so:
DWORD dwStyle = WS_CHILD | WS_TABSTOP; dwStyle |= LVS_ALIGNTOP | LVS_AUTOARRANGE | LVS_ICON | LVS_SHOWSELALWAYS | LVS_SINGLESEL; if ( bVisible ) dwStyle |= WS_VISIBLE; HWND hWnd = ::CreateWindow( "SysListView32", NULL, dwStyle, rcTree.left, rcTree.top, rcTree.Width(), rcTree.Height(), m_hWnd, NULL, AfxGetInstanceHandle(), NULL ); m_ctlComponents.Attach( hWnd );
Problem is fixed.