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

Perdrix24
Atari maniac
Atari maniac
Posts: 98
Joined: Mon Feb 26, 2018 1:47 pm

Send message to owner of window

Postby Perdrix24 » Sun Jun 23, 2019 12:33 pm

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 Super Hero
Atari Super Hero
Posts: 829
Joined: Sun Aug 03, 2014 5:54 pm

Re: Send message to owner of window

Postby ThorstenOtto » Sun Jun 23, 2019 3:06 pm

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: 221
Joined: Sun Mar 02, 2003 11:16 pm
Location: Sweden
Contact:

Re: Send message to owner of window

Postby GokMasE » Sun Jun 23, 2019 3:15 pm

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
Atari maniac
Atari maniac
Posts: 98
Joined: Mon Feb 26, 2018 1:47 pm

Re: Send message to owner of window

Postby Perdrix24 » Mon Jun 24, 2019 2:29 am

Thanks, that should be suitable to my problem.


Social Media

     

Return to “C / PASCAL etc.”

Who is online

Users browsing this forum: No registered users and 4 guests