Assert in CXTShellListCtrlEx::OnLButtonDblClk |
Post Reply |
Author | |
larryp
Groupie Joined: 15 January 2005 Location: United States Status: Offline Points: 61 |
Post Options
Thanks(0)
Posted: 30 January 2007 at 7:41pm |
uploads/20070130_193936_ShellListTest.zip
Version 10.4.2
I am attaching source for a simple program that has a CXTShellTreeCtrl, a CXTShellListCtrlEx, and a CEdit control all on a CFormView. If you double-click on folders in the list control you will get an ASSERT (in debug mode of course) within a few clicks because the m_strItemPath variable is empty. Note that I am not using the View versions of the controls, like most of the CodeJock sample programs.
Also, I have the following questions,
Thanks,
Larry
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi,
Use
CXTShellListCtrl instread of CXTShellListCtrlEx.
Use tree.GetSelectedFolderPath(CString& strFolderPath); to get current path Call SetRootFolder to change root folder.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
larryp
Groupie Joined: 15 January 2005 Location: United States Status: Offline Points: 61 |
Post Options
Thanks(0)
|
Thanks. Changing from CXTShellListCtrlEx to CXTShellListCtrl does eliminate the ASSERT. However, the call to SetRootFolder (CSIDL_DRIVES) has its own problems. First, I had to call it before the tree was initialized, otherwise nothing happened. Second, all of the icons in the tree are lost by doing this. That is not a big deal for me because I want the desktop to be the root, which is the default. I just need to figure out how to programmatically expand and select "Computer" so that the contents of "Computer" are initially displayed in the list control. I don't want to rely on the string "Computer" since my program may be executed on machines using different languages. Any ideas. |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |