🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
5 messages
5 total messages Started by nil Tue, 19 Dec 2006 13:19
Set File Name of Open Dialog Box
#2879
Author: nil
Date: Tue, 19 Dec 2006 13:19
13 lines
1117 bytes
Hi There,

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.
I tried  the EnumWindows() and GetWindow,but not got successes.
Please suggest any way to achieve this.

I am using C++ Builder 6.

Thanks,

Nil
Re: Set File Name of Open Dialog Box
#2881
Author: 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
Re: Set File Name of Open Dialog Box
#2885
Author: John van de Geyn
Date: Wed, 20 Dec 2006 08:59
36 lines
2302 bytes
I have used Clientsocket and serversockets before to communicate between 
applications.
They are simple to implement.



"Remy Lebeau (TeamB)" <no.spam@no.spam.com> wrote in message 
news:45883571$1@newsgroups.borland.com...
>
> "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
>
> 
Re: Set File Name of Open Dialog Box
#2886
Author: Alan Bellingham
Date: Wed, 20 Dec 2006 09:07
13 lines
1393 bytes
"John van de Geyn" <j.vandegeyn@uq.net.au> wrote:

>I have used Clientsocket and serversockets before to communicate between 
>applications.
>They are simple to implement.

Not so simple if you only have control of one end, though!

Alan Bellingham
-- 
Team Thai Kingdom
<url:http://www.borland.com/newsgroups/> Borland newsgroup descriptions
<url:http://www.borland.com/newsgroups/netiquette.html>      netiquette
Re: Set File Name of Open Dialog Box
#2787
Author: John van de Geyn
Date: Wed, 20 Dec 2006 09:11
19 lines
1652 bytes
True, I made an assumption...



"Alan Bellingham" <alanb@episys.com> wrote in message 
news:u9vho2ts6ntpl21ef69f2fc1v0s05f7cb0@4ax.com...
> "John van de Geyn" <j.vandegeyn@uq.net.au> wrote:
>
>>I have used Clientsocket and serversockets before to communicate between
>>applications.
>>They are simple to implement.
>
> Not so simple if you only have control of one end, though!
>
> Alan Bellingham
> -- 
> Team Thai Kingdom
> <url:http://www.borland.com/newsgroups/> Borland newsgroup descriptions
> <url:http://www.borland.com/newsgroups/netiquette.html>      netiquette 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads