Board index » cppbuilder » Re: a form with no assocation to TApplication

Re: a form with no assocation to TApplication


2003-07-07 08:30:53 PM
cppbuilder7
That's what I figured since I've been running into so many roadblocks with
VCL. Using Win32 API calls is my last resort. I've been toying with the idea
of launching a seperate program and passing it an address so that it can
terminate all instructions external of my main app. Is there a clean way to
pass a pointer or unsigned int via the commandline?
"Remy Lebeau (TeamB)" < XXXX@XXXXX.COM >wrote in message
"Robert Hoover" <not.a.real.address@anywhere...sorry>wrote in message
Quote
Is it possible to create a form with no association to Application?
Not a VCL form, no. You would have to create a raw window manually and all
of its contents using only Win32 API calls directly, name CreateWindow/Ex(),
using no VCL at all.
Gambit
 
 

Re:Re: a form with no assocation to TApplication

"Robert Hoover" <not.a.real.address@anywhere...sorry>wrote in message
Quote
I've been toying with the idea of launching a seperate
program and passing it an address so that it can
terminate all instructions external of my main app.
What do you mean exactly? Please elaborate.
Quote
Is there a clean way to pass a pointer or unsigned
int via the commandline?
Passing such a value is easy. Passing a *meaningful* value, on the other
and, is a different matter. Pointers are only meaningful to the address
space they belong to. Separate processes have their own address spaces, so
simply passing a pointer value from one process to another will usually not
work as the pointer will most likely be invalid within the second process.
But then, it does depend on what exactly you are wanting to pass in the
first place, as some pointers can be passed between processes, such as
window handles, global memory, etc.
Gambit
 

Re:Re: a form with no assocation to TApplication

Ah... that explains why it's not working...
Well, in order to take advantage of the RAD function of Builder, I am
creating a second application to serve as my 'panic' button. If I get backed
into a corner, I'll end up writing my own window code in the thread which
you suggested earlier.
My app talks across a serial port. So, I'd like to make a panic button that
will stop all activity in my hardware through the port. I've made a 2nd app
and I'd like to pass it a pointer to the port object. I've verified that the
values are identical as I'm passing them through an ini file for now. But, I
get an error when I try to access the pointer, probably for the reason you
just said.
It would be easy if I could open a port that is already open and send out my
ABORT command, but my object doesn't allow for that. :(
Thanks for the info...
Rob
"Remy Lebeau (TeamB)" < XXXX@XXXXX.COM >wrote in message
"Robert Hoover" <not.a.real.address@anywhere...sorry>wrote in message
Quote
I've been toying with the idea of launching a seperate
program and passing it an address so that it can
terminate all instructions external of my main app.
What do you mean exactly? Please elaborate.
Quote
Is there a clean way to pass a pointer or unsigned
int via the commandline?
Passing such a value is easy. Passing a *meaningful* value, on the other
and, is a different matter. Pointers are only meaningful to the address
space they belong to. Separate processes have their own address spaces, so
simply passing a pointer value from one process to another will usually not
work as the pointer will most likely be invalid within the second process.
But then, it does depend on what exactly you are wanting to pass in the
first place, as some pointers can be passed between processes, such as
window handles, global memory, etc.
Gambit
 

{smallsort}