Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.sys.acorn.programmer > #583
| From | Chris Johnson <chrisjohnson+news@spamcop.net> |
|---|---|
| Subject | Toolbox textarea and associated window handle |
| Newsgroups | comp.sys.acorn.programmer |
| Date | 2011-08-11 10:57 +0100 |
| Message-ID | <520106dbdechrisjohnson+news@spamcop.net> (permalink) |
| Organization | None |
Is there any general way of getting at the window handle of the window that textgadgets/textarea creates to implement a text area? The problem is compounded by the different versions of textgadgets out there. Scenario: In a window there is a large textarea gadget which is used to display user editable text, and which is intended to also accept text files dragged to it. When the file is dropped, the data transfer wimp message received contains a window handle which is that of the textarea gadget and not the containing window. I have found no way of confirming that this handle belongs to the app. The SWI 'Window_WimpToToolbox' returns 0 as it is not known to the toolbox. The toolbox IDblock at the time contains 0 and -1 for the 'this_obj' and 'this_cmp' since it is a wimp event and not a toolbox event. I know (a) later versions of Select implement a 'Textarea_GetWindowID' method, and (b) some versions of textgadgets have their own load capability. However others do not. I suppose the fudge would be to ignore the window handle and load any text file offered into the textarea (if the window is actually showing), perhaps with the additional check of comparing the pointer position with the textarea bounding box. Are there any suggestions for a better way? -- Chris Johnson
Back to comp.sys.acorn.programmer | Previous | Next — Next in thread | Find similar | Unroll thread
Toolbox textarea and associated window handle Chris Johnson <chrisjohnson+news@spamcop.net> - 2011-08-11 10:57 +0100
Re: Toolbox textarea and associated window handle druck <news@druck.org.uk> - 2011-08-13 15:01 +0100
Re: Toolbox textarea and associated window handle Chris Johnson <chrisjohnson+news@spamcop.net> - 2011-08-13 15:33 +0100
csiph-web