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
Re: Controlling folder views programitically
Quote:
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.
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.
Re: Controlling folder views programitically
Quote:
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"?
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.
Re: Controlling folder views programitically
My program will have keyboard shortcut when pressed will change the folder views.
Re: Controlling folder views programitically
Re: Controlling folder views programitically
Quote:
Originally Posted by
reachb4
My program will have keyboard shortcut when pressed will change the folder views.
Quote:
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!
:eek: :rolleyes:
Re: Controlling folder views programitically
Quote:
Originally Posted by
VictorN
But the worse problem is: you couldn't (or didn't want to) explain what you need and why!
:eek: :rolleyes:
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.
Re: Controlling folder views programitically
Quote:
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!? :rolleyes:
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...
Quote:
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!
Re: Controlling folder views programitically
Quote:
Originally Posted by VictorN
But if you explained me what "view" in windows explorer you needed to change
here is the answer
Quote:
Originally Posted by reachb4
(View means list,thumbnails,icon)
Quote:
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
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);
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)
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
Re: Controlling folder views programitically