943,673 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 480
  • C++ RSS
Mar 16th, 2009
0

windows api help

Expand Post »
hello programmers
is there any win32 api or technique by which we can fetch the address of the active window of explorer(not the internet explorer)

please help
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nsvanjani is offline Offline
2 posts
since Nov 2006
Mar 16th, 2009
1

Re: windows api help

Check out FindWindow(). You'll need the Explorer class name, which is "ExploreWClass".
Reputation Points: 76
Solved Threads: 40
Junior Poster
MrSpigot is offline Offline
156 posts
since Mar 2009
Mar 17th, 2009
0

Re: windows api help

god but will it give me the address of files on the desktop
Reputation Points: 10
Solved Threads: 0
Newbie Poster
nsvanjani is offline Offline
2 posts
since Nov 2006
Mar 17th, 2009
0

Re: windows api help

Click to Expand / Collapse  Quote originally posted by nsvanjani ...
god but will it give me the address of files on the desktop
Well no.... it will give you the address of an active File Explorer window as requested.
If you just want to get to files on the desktop you can just look at the contents of C:\WINDOWS\DESKTOP, or better still, as Windows may be installed elsewhere, use the DESKTOP subdir of GetWindowsDirectory().
Or better still use:
c++ Syntax (Toggle Plain Text)
  1. LPITEMIDLIST pidl;
  2. SHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &pidl);
  3. // Convert the item ID list's binary
  4. // representation into a file system path
  5. char szPath[_MAX_PATH];
  6. SHGetPathFromIDList(pidl, szPath);
Reputation Points: 76
Solved Threads: 40
Junior Poster
MrSpigot is offline Offline
156 posts
since Mar 2009

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: Applying heat flux on a tube surface
Next Thread in C++ Forum Timeline: windows.h error





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC