I have a third party 'EXE' that contains a number of windows in it. By
sending a message to the EXE I can get it open any screen. But I need this
screen to be created in *my* windows app ! or at least to set the parent of
the created form equal to my MDI ? Is this possible at all ?


In short , what I am trying to achieve is to create something like a notepad
window within my MDI. Is this possible ?

Re: Do you think this is possible? by Simon

Simon
Thu Feb 24 10:25:28 CST 2005

"Nice Chap" <NiceChap@PlasmaDyne.com> wrote in message
news:Or%23NOgoGFHA.3376@TK2MSFTNGP14.phx.gbl...
> I have a third party 'EXE' that contains a number of windows in it. By
> sending a message to the EXE I can get it open any screen. But I need this
> screen to be created in *my* windows app ! or at least to set the parent
of
> the created form equal to my MDI ? Is this possible at all ?
>
>
> In short , what I am trying to achieve is to create something like a
notepad
> window within my MDI. Is this possible ?

If the windows are available as ActiveX controls, it might be possible to
reuse them. (But they'll probably implement functionality via special
interfaces that you don't know about.) Otherwise, probably not.



Re: Do you think this is possible? by William

William
Thu Feb 24 10:28:12 CST 2005

"Nice Chap" <NiceChap@PlasmaDyne.com> wrote in message
news:Or%23NOgoGFHA.3376@TK2MSFTNGP14.phx.gbl...
>I have a third party 'EXE' that contains a number of windows in it. By
>sending a message to the EXE I can get it open any screen.

What does "open any screen mean"? Open anywhere on the screen?

> But I need this screen to be created in *my* windows app ! or at least to
> set the parent of the created form equal to my MDI ? Is this possible at
> all ?

The docs warn against cross process SetParent() calls.

> In short , what I am trying to achieve is to create something like a
> notepad window within my MDI. Is this possible ?

Trying to use something as a component that is not really a component is
likely only to work marginally well. That said, you may be able to get the
appearance of what you want by postioning the windows and then moving them
in tandem.

Your own window would need to use SetWindowPos() or some such on the third
party window in response to the WM_WINDOWPOSCHANGED notifications that it
receives. In addition, you'd need to subclass the third party window either
to inhibit movement or, if you allow it, to move your window to the
corresponding position.

Regards,
Will



Re: Do you think this is possible? by Simon

Simon
Thu Feb 24 10:36:26 CST 2005

> Trying to use something as a component that is not really a component is
> likely only to work marginally well. That said, you may be able to get the
> appearance of what you want by postioning the windows and then moving them
> in tandem.

I thought of that, but wouldn't the frame rather get in the way? (Assuming
one didn't "really" reparent the window).



Re: Do you think this is possible? by William

William
Thu Feb 24 11:04:20 CST 2005

"Simon Trew" <noneofyour@business.guv> wrote in message
news:eqYT$7oGFHA.3076@tk2msftngp13.phx.gbl...
> I thought of that, but wouldn't the frame rather get in the way?
> (Assuming
> one didn't "really" reparent the window).

It's a good question. :-)

For some windows it is possible to modify the style bits and then tell
Windows that the frame has changed with a call to SetWindowPos() with the
SWP_FRAMECHANGED and SWP_DRAWFRAME options set. Still, it's a gross hack.

Regards,
Will



Re: Do you think this is possible? by Norman

Norman
Sat Feb 26 17:45:26 CST 2005

Nice Chap wrote:

> I have a third party 'EXE' that contains a number of windows in it. By
> sending a message to the EXE I can get it open any screen. But I need this
> screen to be created in *my* windows app ! or at least to set the parent of
> the created form equal to my MDI ? Is this possible at all ?
>
>
> In short , what I am trying to achieve is to create something like a notepad
> window within my MDI. Is this possible ?
>
>
Notepad is a fairly thin wrapper around a multi-line EDIT control.

Norm

--
--
To reply, change domain to an adult feline.