Send message to owner of window

C and PASCAL (or any other high-level languages) in here please

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

Post Reply
Perdrix24
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 127
Joined: Mon Feb 26, 2018 1:47 pm

Send message to owner of window

Post by Perdrix24 »

In C, if I have a window handle from another app, obtained by wind_find(), and I want to send a message (WM_ARROWED in this case) to that window, how can I proceed?

appl_write() needs the the app id. I cannot use appl_find() to get it because I don't know the filename. Using appl_write(0, ...) works for the desktop windows only. Using shel_write(7, ...) broadcasts the message to all processes, that works as I want, but requires AES 4.0.
ThorstenOtto
Atari God
Atari God
Posts: 1192
Joined: Sun Aug 03, 2014 5:54 pm

Re: Send message to owner of window

Post by ThorstenOtto »

You can try wind_get(WF_OWNER,....) but that is also not always available. But it should be available in most multi-tasking AES, and for single-tasking os there will no other app to send messages to ;) (except maybe DAs)
User avatar
GokMasE
Captain Atari
Captain Atari
Posts: 225
Joined: Sun Mar 02, 2003 11:16 pm
Location: Sweden
Contact:

Re: Send message to owner of window

Post by GokMasE »

Thorsten beat me to it with a few minutes ;-)
And indeed, the availability of this feature should better be verified by calling appl_getinfo() before it is issued.


Regards,

/Joakim
Perdrix24
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
Posts: 127
Joined: Mon Feb 26, 2018 1:47 pm

Re: Send message to owner of window

Post by Perdrix24 »

Thanks, that should be suitable to my problem.
Post Reply

Return to “C / PASCAL etc.”