473,769 Members | 2,143 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Double-click a folder browser dialog?

I'm trying to implement some fairly standard behavior (or so I thought) on a
FolderBrowserDi alog component. double-clicking a folder in the dialog should
have the same effect as selecting the folder and clicking the dialog's OK
button. But the FolderBrowserDi alog component doesn't implement that
behavior, and it doesn't have a double-click event that would allow me to
implement it.

Is there a simple way to implement this behavior? Thanks.
Oct 5 '07 #1
5 6007
David,

Unfortunately, this isn't made available to you. It's not even
available through the API call SHBrowseForFold er (which is what the
FolderBrowserDi alog calls, ultimately). You could try and derive from
FolderBrowserDi alog, and replace the hook procedure (HookProc) as well as
the RunDialog procedure and then get the window handle for the tree view,
but that's VERY implementation specific, and I wouldn't depend on it.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"David Veeneman" <da****@nospam. comwrote in message
news:%2******** *******@TK2MSFT NGP06.phx.gbl.. .
I'm trying to implement some fairly standard behavior (or so I thought) on
a FolderBrowserDi alog component. double-clicking a folder in the dialog
should have the same effect as selecting the folder and clicking the
dialog's OK button. But the FolderBrowserDi alog component doesn't
implement that behavior, and it doesn't have a double-click event that
would allow me to implement it.

Is there a simple way to implement this behavior? Thanks.

Oct 5 '07 #2
Hi,

"David Veeneman" <da****@nospam. comwrote in message
news:%2******** *******@TK2MSFT NGP06.phx.gbl.. .
I'm trying to implement some fairly standard behavior (or so I thought) on
a FolderBrowserDi alog component. double-clicking a folder in the dialog
should have the same effect as selecting the folder and clicking the
dialog's OK button. But the FolderBrowserDi alog component doesn't
implement that behavior, and it doesn't have a double-click event that
would allow me to implement it.
Unfortunatelly that feature is not available, not only that but
FolderBrowserDi alog is a sealed class, so you cannot inherit from it.

You either implement your own FolderBrowserDi alog from the scratch or look
around for a third party implementation
Oct 5 '07 #3

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c omwrote in
message news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
David,

Unfortunately, this isn't made available to you. It's not even
available through the API call SHBrowseForFold er (which is what the
FolderBrowserDi alog calls, ultimately). You could try and derive from
FolderBrowserDi alog,
IIRC FolderBrowserDi alog is a sealed class.

Yep, it says so in the MSDN:
http://msdn2.microsoft.com/en-us/lib...serdialog.aspx
Oct 5 '07 #4
That sucks. In that case, the OP should extend CommonDialog and call
SHBrowseForFold er, and try to find the tree view window, or like you said,
get a third party implementation.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"Ignacio Machin ( .NET/ C# MVP )" <machin TA laceupsolutions .comwrote in
message news:uZ******** ******@TK2MSFTN GP03.phx.gbl...
>
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c omwrote
in message news:%2******** ********@TK2MSF TNGP02.phx.gbl. ..
>David,

Unfortunately, this isn't made available to you. It's not even
available through the API call SHBrowseForFold er (which is what the
FolderBrowserD ialog calls, ultimately). You could try and derive from
FolderBrowserD ialog,

IIRC FolderBrowserDi alog is a sealed class.

Yep, it says so in the MSDN:
http://msdn2.microsoft.com/en-us/lib...serdialog.aspx

Oct 5 '07 #5
>>or look around for a third party implementation

Take a look at Shell MegaPack controls from http://www.ssware.com

G Himangi
"Ignacio Machin ( .NET/ C# MVP )" <machin TA laceupsolutions .comwrote in
message news:ux******** ********@TK2MSF TNGP02.phx.gbl. ..
Hi,

"David Veeneman" <da****@nospam. comwrote in message
news:%2******** *******@TK2MSFT NGP06.phx.gbl.. .
>I'm trying to implement some fairly standard behavior (or so I thought)
on a FolderBrowserDi alog component. double-clicking a folder in the
dialog should have the same effect as selecting the folder and clicking
the dialog's OK button. But the FolderBrowserDi alog component doesn't
implement that behavior, and it doesn't have a double-click event that
would allow me to implement it.

Unfortunatelly that feature is not available, not only that but
FolderBrowserDi alog is a sealed class, so you cannot inherit from it.

You either implement your own FolderBrowserDi alog from the scratch or
look around for a third party implementation

Oct 6 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
9890
by: Sydex | last post by:
When I compile code I get error C2664: 'Integration::qgaus' : cannot convert parameter 1 from 'double (double)' to 'double (__cdecl *)(double)' in this part : double Integration::quad2d(double (*func)(double,double)) { nfunc = func ; return qgaus(f1,x1,x2);//error there
20
17834
by: Anonymous | last post by:
Is there a non-brute force method of doing this? transform() looked likely but had no predefined function object. std::vector<double> src; std::vector<int> dest; std::vector<double>::size_type size = src.size(); dest.reserve(size); for (std::vector<int>::size_type i = 0;
31
6649
by: Bjørn Augestad | last post by:
Below is a program which converts a double to an integer in two different ways, giving me two different values for the int. The basic expression is 1.0 / (1.0 * 365.0) which should be 365, but one variable becomes 364 and the other one becomes 365. Does anyone have any insight to what the problem is? Thanks in advance. Bjørn
10
8660
by: Robert Palma | last post by:
I'm having trouble figuring out how to pass a pointer to a double array (1 dimensional) to a C function. Declaring array as: double xx; Declaring func. int process( double *input ) Calling func. as one of the following:
10
18772
by: Bryan Parkoff | last post by:
The guideline says to use %f in printf() function using the keyword float and double. For example float a = 1.2345; double b = 5.166666667; printf("%.2f\n %f\n", a, b);
3
2884
by: BlueTrin | last post by:
I am using a DLL written in C, it uses some pointers on functions, I have defined a wrapper around it in C# which uses some delegates: #region Delegates and Marshalling to call solvopt public delegate double funCallback(double x); public delegate double funcCallback(double x); public delegate void gradCallback(double x, double v); public delegate void gradcCallback(double x, double v);
67
9924
by: lcw1964 | last post by:
This may be in the category of bush-league rudimentary, but I am quite perplexed on this and diligent Googling has not provided me with a clear straight answer--perhaps I don't know how to ask the quesion. I have begun to familiarize myself here with the gcc compiler in a win32 environment, in the form of MinGW using both Dev C++ and MSYS as interfaces. I have recompiled some old math code that uses long double types throughout and...
1
8227
by: JWest46088 | last post by:
I keep getting these error messages: area(double,double) in Rectangle cannot be applied to () return "Area: " + Rectangle.area() + "\tCircumference: " + Rectangle.perimeter(); ^ perimeter(double,double) in Rectangle cannot be applied to () return "Area: " + Rectangle.area() + "\tCircumference: " + Rectangle.perimeter(); ^ setSides(double,double) in Rectangle cannot be applied to (double)...
2
5596
by: dj10fld | last post by:
I am getting a (cannot convert double to double in assignment errors) here is a part of my code #include <iostream> #include <iomanip> #include <cmath> using namespace std; #define MaxSize 1000 double loancalc (double *months, double *intrat, double *princ, double calcprnc, double calcpay, double calcbal, double calcnew, double calcInt); double display (double *months, double calcprnc, double calcpay, double calcbal, double...
2
5802
by: Genro | last post by:
#include<stdio.h> #include<TX/graphics.h> #include<time.h> // I need help! struct Krug{ double _x; double _y; double _skox; double _skoy; double _granx1;
0
9579
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10208
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10038
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9987
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8867
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6662
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5294
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5444
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3952
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.