Print Page | Close Window

CXTBrowseEdit hangs when Browsing for Directory

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Command Bars
Forum Description: Topics Related to Codejock Command Bars
URL: http://forum.codejock.com/forum_posts.asp?TID=17549
Printed Date: 01 May 2025 at 6:01pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CXTBrowseEdit hangs when Browsing for Directory
Posted By: grudy
Subject: CXTBrowseEdit hangs when Browsing for Directory
Date Posted: 10 November 2010 at 8:32am

If you use a CXTBrowseEdit with BES_XT_CHOOSEDIR set to choose a directory in the pane of a Customize dialog, and then you press the browse button, when you choose the directory and press OK, the application hangs. This is easily demonstrated by the CommandBars Customize Dialog sample (on the Tools pane of the Customize dialog). It worked fine in 13.2.1, but hangs in 13.3.1.

Any ideas how to fix this?



Replies:
Posted By: grudy
Date Posted: 10 November 2010 at 9:27am
I just found the thread on CXTBrowseDialog hanging in v13.3.1 that seems to answer this problem by reverting XTBrowseDialog.cpp and .h back to v13.2.1.  I just tried doing that an it also seems to work for me. Haven't yet confirmed that there are no other side effects of this change.


Posted By: Michl
Date Posted: 13 January 2011 at 7:46am
http://msdn.microsoft.com/en-us/library/bb762115%28VS.85%29.aspx

Note
  If COM is initialized using http://msdn.microsoft.com/en-us/library/ms695279%28VS.85%29.aspx - CoInitializeEx with the COINIT_MULTITHREADED flag, SHBrowseForFolder fails if the calling application uses the BIF_USENEWUI or BIF_NEWDIALOGSTYLE flag in the http://msdn.microsoft.com/en-us/library/bb773205%28VS.85%29.aspx - BROWSEINFO structure.


Codejock set BIF_NEWDIALOGSTYLE as default.
Delete flag in your code if you need COINIT_MULTITHREADED.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net