En cours

Get Open File Name from window handle (not file handle)

Hi. All

I want to get C-function about Get opened file path from window handle.

(not file handle and not executable path)

for example,

If c:/abc/[url removed, login to view] is opened using [url removed, login to view], and if we know winword's main window handle,

I want to get 'c:/abc/[url removed, login to view]'.

caution :

1) it is support that when read-only file is opened, and if we know window handle.

we get opened file path from window handle

2) it is support MDI Child window (like excel or powerpnt...)

3) Win XP, WIn 7, WIn VISTA support (32 bits)

4) I need source file and project files

target function :

Bool GetOpenFilePath(HWND, wchar *filepathvar)

if true, opened file path is saved to filepathvar, and return true.

if false, return false

test scenario.

1. create c:/test/[url removed, login to view], and open c:/test/[url removed, login to view] using [url removed, login to view],

if winword's window handle is 0x1234,

We get opened file path using below function

==> GetOpenFilePath(0x1234, filepathvar)

if true, filepathvar is 'c:/test/[url removed, login to view];

2. create c:/test/[url removed, login to view], and set c:/test/[url removed, login to view] file as readonly,

and open c:/test/[url removed, login to view] using [url removed, login to view],

if winword's window handle is 0x5678,

We get opened file(read only file) path using below function

==> GetOpenFilePath(0x5678, filepathvar)

if true, filepathvar is 'c:/test/[url removed, login to view]'

3. create c:/test/[url removed, login to view], c:/test/[url removed, login to view] 2 files. (c:/test/[url removed, login to view] is normal file, and c:/test/[url removed, login to view] is readonly file)

and open c:/test/[url removed, login to view], c:/test/[url removed, login to view] (using [url removed, login to view])

Now, Excel window have 2 child windows ([url removed, login to view], [url removed, login to view])

assume that we know child window handle

([url removed, login to view] => 0x1000 child window handle, [url removed, login to view] => 0x2000 child window handle)

if we use GetOpenFilePath(0x1000, filepathvar)

if true, filepathvar is 'c:/test/[url removed, login to view]'

if we use GetOpenFilePath(0x2000, filepathvar)

if true, filepathvar is 'c:/test/[url removed, login to view]'

Compétences : Programmation C, Programmation C++

Voir plus : getopenfilepath, open file handle, file name handle, file name handle windows, handle open file windows, windows handle file, handle opened file, file name window handle, test scenario, set bits, return path, open source programming, get c programming, c programming get, cplusplus set, all bits, abc programming, abc 11, 0 bits, file name handle window, exe name window handle, windows open file handle name, window handle, file handle window handle, window handle file name

Concernant l'employeur :
( 22 commentaires ) Seoul, Korea, Republic of

N° du projet : #1057371

Décerné à :

simonchen

put initial bid here.

500 $ USD en 3 jours
(54 Commentaires)
6.5

9 freelance ont fait une offre moyenne de 481 $ pour ce travail

waterwood

please check PM. Thanks.

400 $ USD en 1 jour
(24 Commentaires)
6.2
usamacpp

Please check PMB

400 $ USD en 5 jours
(22 Commentaires)
5.4
oddSchool

Please check PM.

400 $ USD en 2 jours
(2 Commentaires)
4.4
Algotrade

Please see your PM.

650 $ USD en 7 jours
(18 Commentaires)
4.3
jasminjx

I have already made this fuction basically. Because there are some communitions between us, I think you remember me. Looking forward to your response. Thanks.

300 $ USD en 1 jour
(8 Commentaires)
4.1
ankasoftware

Please have a look at PMB

750 $ USD en 3 jours
(0 Commentaires)
0.0
DhapareAbhi

Your job is so easy. I know learn c programming. I give you this in Max 10 days.

500 $ USD en 10 jours
(0 Commentaires)
0.0
coding4passion

There is a problem with your requirement. Any process can have 100s of files opened - and in this case we will have to guess the actual file that you are looking for based on the file extension(.xls for [url removed, login to view], Plus

430 $ USD en 1 jour
(0 Commentaires)
0.0