|
-
July 7th, 2009, 02:57 AM
#1
Controlling folder views programitically
Hi,
In my application I need to control current the view of the folder opened in windows explorer.
User will start my application....He will also open a folder in the windows explorer. When he clicks a button in my application the view of the folder will change.(View means list,thumbnails,icon)
Please let me know where should i start?
Regards and thanx,
J
-
July 7th, 2009, 03:49 AM
#2
Re: Controlling folder views programitically
 Originally Posted by reachb4
...
Please let me know where should i start?
Start to explain more clear what you want and what the problem is.
Victor Nijegorodov
-
July 7th, 2009, 04:21 AM
#3
Re: Controlling folder views programitically
I think @reachb4 has explained it good enough, he just wants to control a windows explorer's window (particularly the view) with his application. I'm also curious how it can be done.
win7 x86, VS 2008 & 2010, C++/CLI, C#, .NET 3.5 & 4.0, VB.NET, VBA... WPF is comming
remeber to give feedback  you think my response deserves recognition? perhaps you may want to click the Rate this post link/button and add to my reputation
private lessons are not an option so please don't ask for help in private, I won't replay
if you use Opera and you'd like to have the tab-button functionality for the texteditor take a look at my Opera Tab-UserScirpt; and if you know how to stop firefox from jumping to the next control when you hit tab let me know
-
July 7th, 2009, 04:33 AM
#4
Re: Controlling folder views programitically
 Originally Posted by memeloo
I think @reachb4 has explained it good enough, he just wants to control a windows explorer's window ...
Well, it is not an answer...
My question is: why does OP think that he/she needs to "control a windows explorer's window"?
Victor Nijegorodov
-
July 7th, 2009, 04:39 AM
#5
Re: Controlling folder views programitically
it's not important why, but how, I think. it could be interesting to know why but for me it's irrelevant here.
win7 x86, VS 2008 & 2010, C++/CLI, C#, .NET 3.5 & 4.0, VB.NET, VBA... WPF is comming
remeber to give feedback  you think my response deserves recognition? perhaps you may want to click the Rate this post link/button and add to my reputation
private lessons are not an option so please don't ask for help in private, I won't replay
if you use Opera and you'd like to have the tab-button functionality for the texteditor take a look at my Opera Tab-UserScirpt; and if you know how to stop firefox from jumping to the next control when you hit tab let me know
-
July 7th, 2009, 06:35 AM
#6
Re: Controlling folder views programitically
My program will have keyboard shortcut when pressed will change the folder views.
-
July 8th, 2009, 03:08 AM
#7
Re: Controlling folder views programitically
-
July 8th, 2009, 03:13 AM
#8
Re: Controlling folder views programitically
 Originally Posted by reachb4
My program will have keyboard shortcut when pressed will change the folder views.
 Originally Posted by reachb4
any takers?
Well, since the last 24 hours you could write not so many words....
But the worse problem is: you couldn't (or didn't want to) explain what you need and why!
Victor Nijegorodov
-
July 8th, 2009, 05:30 AM
#9
Re: Controlling folder views programitically
 Originally Posted by VictorN
But the worse problem is: you couldn't (or didn't want to) explain what you need and why!

I still don't understand what part of his question is unclear to you. maybe he writes some utility program for manipulating windows explorer's window. as I've already said, it's irrelevant why he is doing this.
if I only new how to help him I would have already done it but unfortunetally I have now idea (yet) how I one can change views in windows explorer from another application and I'm also awaiting answers because it's interesing.
win7 x86, VS 2008 & 2010, C++/CLI, C#, .NET 3.5 & 4.0, VB.NET, VBA... WPF is comming
remeber to give feedback  you think my response deserves recognition? perhaps you may want to click the Rate this post link/button and add to my reputation
private lessons are not an option so please don't ask for help in private, I won't replay
if you use Opera and you'd like to have the tab-button functionality for the texteditor take a look at my Opera Tab-UserScirpt; and if you know how to stop firefox from jumping to the next control when you hit tab let me know
-
July 8th, 2009, 05:46 AM
#10
Re: Controlling folder views programitically
 Originally Posted by memeloo
I still don't understand what part of his question is unclear to you. maybe he writes some utility program for manipulating windows explorer's window. as I've already said, it's irrelevant why he is doing this.
If it is "irrelevant" for you - then help him!
For me it is NOT "irrelevant".
If what OP needs were "some utility program for manipulating windows explorer's window" then I'd just give up!
But I guess OP might need something else!? 
And what to do when there are more than one windows explorer's window opened?
And what to do if user closed windows explorer's window just after starting the Application?
And so on...
 Originally Posted by memeloo
... unfortunetally I have now idea (yet) how I one can change views in windows explorer from another application and I'm also awaiting answers because it's interesing.
Well, I have no idea either!
But if you explained me what "view" in windows explorer you needed to change, what you meant by "change", and why you need to "change" I (or someone else), perhaps, would be able to suggest some (may be copletely different!) way to do it or, at least point out where to look for such a way!
Victor Nijegorodov
-
July 8th, 2009, 05:58 AM
#11
Re: Controlling folder views programitically
 Originally Posted by VictorN
But if you explained me what "view" in windows explorer you needed to change
here is the answer
 Originally Posted by reachb4
(View means list,thumbnails,icon)
 Originally Posted by VictorN
And what to do when there are more than one windows explorer's window opened?
And what to do if user closed windows explorer's window just after starting the Application?
And so on...
these are different topics, like how to pick a window or how to protect a picked window but they have nothing in common with changing explorer views
win7 x86, VS 2008 & 2010, C++/CLI, C#, .NET 3.5 & 4.0, VB.NET, VBA... WPF is comming
remeber to give feedback  you think my response deserves recognition? perhaps you may want to click the Rate this post link/button and add to my reputation
private lessons are not an option so please don't ask for help in private, I won't replay
if you use Opera and you'd like to have the tab-button functionality for the texteditor take a look at my Opera Tab-UserScirpt; and if you know how to stop firefox from jumping to the next control when you hit tab let me know
-
July 8th, 2009, 08:06 AM
#12
Re: Controlling folder views programitically
>Please let me know where should i start?
You can use PostMessage to send WM_COMMANDS to a window, so if you can get the handle of the Window you are interested in, you can send it a command.
For example, on my PC this will find a Windows Explorer window, and set the view to "list":
Code:
#define ICONS 28713
#define LIST 28715
#define DETAILS 28716
#define THUMB 28717
#define TILES 28718
HWND hWnd = FindWindow("ExploreWClass",NULL);
PostMessage(hWnd,WM_COMMAND,MAKEWPARAM(LIST ,0),0);
-
July 8th, 2009, 08:31 AM
#13
Re: Controlling folder views programitically
@alanjhd08: could you tell us please where did you find the messages that can be send to a explorer window. I was not able to locate this part in msdn. (I know it's some header file but it's always magic to me how people come across this values)
Last edited by memeloo; July 8th, 2009 at 08:39 AM.
win7 x86, VS 2008 & 2010, C++/CLI, C#, .NET 3.5 & 4.0, VB.NET, VBA... WPF is comming
remeber to give feedback  you think my response deserves recognition? perhaps you may want to click the Rate this post link/button and add to my reputation
private lessons are not an option so please don't ask for help in private, I won't replay
if you use Opera and you'd like to have the tab-button functionality for the texteditor take a look at my Opera Tab-UserScirpt; and if you know how to stop firefox from jumping to the next control when you hit tab let me know
-
July 8th, 2009, 08:46 AM
#14
Re: Controlling folder views programitically
Hi,
Use Windows Spy++, find the window you are interested in, and use the menu to send it the command you are interested in.
As far as I know these are "magic" values, I don't think they are documented by MS, which is why I specify that they work on my PC. On different versions of Windows Explorer, maybe they are different.
Alan
-
July 8th, 2009, 09:19 AM
#15
Re: Controlling folder views programitically
Victor Nijegorodov
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|