🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

2 total messages Started by Keith Bennett Fri, 28 Feb 1997 00:00
Can't get VX-Rexx's WinPostMsg to work! Need help.
#4908
Author: Keith Bennett
Date: Fri, 28 Feb 1997 00:00
25 lines
1605 bytes
I am trying to use VX-Rexx's WinPostMsg function to post a message to
a window in another process.  This other process is not a VX-Rexx
app, but a C++ app also written in-house.

I seem to successfully get the window handle of the target window,
but when I call WinPostMsg using that handle, it returns 0
(indicating failure if I understand the docs correctly).

I pass the window handle to WinPostMsg in the form of an 8-digit hex
number, by itself and then prefaced by "?HWND" as listed in the docs.
Neither way appears to work.

I log VRError() to a file, but it's blank.

Is there something I'm doing wrong?  Or is this an impossible task?

Thanks for any help.
- Keith

-- 
--------------------------------------------------------------------------
Keith Bennett                             Bennett Business Solutions, Inc.
Silver Spring, MD USA                     C++ Software Development
kbennett@cpcug.org                        (301) 871-7696
Re: Can't get VX-Rexx's WinPostMsg to work! Need help.
#4906
Author: Randy McGinin
Date: Sat, 01 Mar 1997 00:00
33 lines
1738 bytes
Keith Bennett wrote:
> 
> I am trying to use VX-Rexx's WinPostMsg function to post a message to
> a window in another process.  This other process is not a VX-Rexx
> app, but a C++ app also written in-house.
> 
> I seem to successfully get the window handle of the target window,
> but when I call WinPostMsg using that handle, it returns 0
> (indicating failure if I understand the docs correctly).
> 
> I pass the window handle to WinPostMsg in the form of an 8-digit hex
> number, by itself and then prefaced by "?HWND" as listed in the docs.
> Neither way appears to work.
> 
> I log VRError() to a file, but it's blank.
> 
> Is there something I'm doing wrong?  Or is this an impossible task?
> 


First of all, there is an excellent sample provided by Watcom
that illustrates this called (Window Controller).

Secondly, use SendKeyString Method instead of WinPostMsg

ok = VRMethod( "Application", "SendKeyString", w, data )

Thirdly, set focus to the window prior to issuing either
the SendKeyString, or the WinPostMsg, by using the SetFocus
method.

Hope this helps
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