Đang Thực Hiện

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]'

Kỹ năng: Lập trình C, Lập trình C++

Xem thêm: 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

Về Bên Thuê:
( 22 nhận xét ) Seoul, Korea, Republic of

Mã Dự Án: #1057371

Đã trao cho:

simonchen

put initial bid here.

$500 USD trong 3 ngày
(54 Đánh Giá)
6.5

9 freelancer đang chào giá trung bình $481 cho công việc này

waterwood

please check PM. Thanks.

$400 USD trong 1 ngày
(24 Đánh Giá)
6.2
usamacpp

Please check PMB

$400 USD trong 5 ngày
(22 Đánh Giá)
5.4
oddSchool

Please check PM.

$400 USD trong 2 ngày
(2 Đánh Giá)
4.4
Algotrade

Please see your PM.

$650 USD trong 7 ngày
(18 Đánh Giá)
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 trong 1 ngày
(8 Đánh Giá)
4.1
ankasoftware

Please have a look at PMB

$750 USD trong 3 ngày
(0 Đánh Giá)
0.0
DhapareAbhi

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

$500 USD trong 10 ngày
(0 Đánh Giá)
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], Thêm

$430 USD trong 1 ngày
(0 Đánh Giá)
0.0