🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #2881

Re: Set File Name of Open Dialog Box

#2881
From: Remy Lebeau (TeamB)
Date: Tue, 19 Dec 2006 18:55
21 lines
1849 bytes
"nil" <nilesh.gawali@gmail.com> wrote in message
news:4587e6f1$1@newsgroups.borland.com...

> My application is opening the Open Dialog Box Of another
> application. Now,How to set file name of this Open Dialog Box,
> Which is a child of another application.

You cannot set the filename programmably from an external process.  To do so
would require the use of the CDM_SETCONTROLTEXT message, which has a string
parameter.  You cannot pass strings across process boundaries because of the
use of different address spaces.  So you would have to put your code into a
DLL and then use a hook via SetWindowsHookEx() to inject the DLL into the
target process.  Only then will the DLL code run in the context of the
target process instead of your application, so the message can be used.  You
also have the added problem of being ble to find the proper dialog HWND
after it has been opened so that you can send messages to it.  That is not
easy to do from an external process, either.


Gambit
Technical Details
Message-ID: <45883571$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <4587e6f1$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,2ba2d5dfbe86851c
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <4587e6f1$1@newsgroups.borland.com>
Subject: Re: Set File Name of Open Dialog Box
Date: Tue, 19 Dec 2006 10:55:34 -0800
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 75.83.34.171
Message-ID: <45883571$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1166554481 75.83.34.171 (19 Dec 2006 10:54:41 -0800)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news1.google.com!news3.google.com!news.glorb.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail