Groups | Search | Server Info | Login | Register


Groups > comp.sys.acorn.programmer > #6577

Re: End Drag and Wimp_SendMessage 18 DataSave

From Matthew Phillips <spam2011m@yahoo.co.uk>
Newsgroups comp.sys.acorn.programmer
Subject Re: End Drag and Wimp_SendMessage 18 DataSave
Date 2025-12-21 21:58 +0000
Organization A noiseless patient Spider
Message-ID <272ae48e5c.Matthew@sinenomine.co.uk> (permalink)
References <a772638e5c.Paul@phorefaux> <33b8e38e5c.Matthew@sinenomine.co.uk>

Show all headers | View raw


In message <33b8e38e5c.Matthew@sinenomine.co.uk>
 on 21 Dec 2025 Matthew Phillips  wrote:

> In message <a772638e5c.Paul@phorefaux>
>  on 20 Dec 2025 Paul Stewart  wrote:

>> DEF PROCmouse_drag_end
>>     SYS "Wimp_GetPointerInfo",,b%
>>     b%!20=b%!12:REM destination window handle
>>     b%!24=b%!16:REM destination icon handle
>>     b%!28=b%!0:REM destination x coordinate
>>     b%!32=b%!4:REM destination y coordinate
>>     b%!36=1024
>>     b%!40=&DFE
>>     a$=$savestr%+CHR$0:REM get leafname
>>     $(b%+44)=a$:REM leafname of file
>>     !b%=44+((LEN a$) DIV 4)*4:REM length of block
>>     IF LEN a$ MOD 4<>0 THEN !b%+=4
>>     b%!12=0:REM your_ref for original message
>>     b%!16=1:REM Message_DataSave
>>     b%!8=0
>>     b%!4=task%
>>     SYS"Wimp_SendMessage",18,b%,b%!20,b%!24
>> ENDPROC

> I cannot see anything immediately wrong with your code, but it's possible
> that the replies are not being passed back to you because of how you have
> registered with the Wimp.

P.S. you may want to consider whether you want the application to send a 
message to itself, if the user drops the icon back on the save window or 
on another window belonging to your application.  Sometimes it is 
perfectly justified sending a message to yourself: it can make handling 
things like saving from an editor window and dropping the content into 
another editor window easier.  But there are likely to be cases where you 
do not want to generate a message to your own application.  Just something 
to think about, and, indeed, to test.

-- 
Matthew Phillips
Durham

Back to comp.sys.acorn.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

End Drag and Wimp_SendMessage 18 DataSave Paul Stewart <phorefaux@gmail.com> - 2025-12-20 22:32 +0000
  Re: End Drag and Wimp_SendMessage 18 DataSave Matthew Phillips <spam2011m@yahoo.co.uk> - 2025-12-21 21:53 +0000
    Re: End Drag and Wimp_SendMessage 18 DataSave Matthew Phillips <spam2011m@yahoo.co.uk> - 2025-12-21 21:58 +0000
    Re: End Drag and Wimp_SendMessage 18 DataSave Paul Stewart <phorefaux@gmail.com> - 2025-12-29 15:53 +0000

csiph-web