[squeak-dev] Host Window Support

John McKeon p3anoman at gmail.com
Sat Jan 7 14:37:41 UTC 2012


I was able to get the sketching to work in Windows using Levente's
interpreter image located at:
http://leves.web.elte.hu/squeak/SqueakVM-Win32-4.4.9-2358-non-official-bin.zip

and referenced in:  http://forum.world.st/Prebuilt-windows-VM-tt3392603.html


On Fri, Jan 6, 2012 at 4:04 PM, Eliot Miranda <eliot.miranda at gmail.com>wrote:

>
>
> On Fri, Jan 6, 2012 at 10:56 AM, Bert Freudenberg <bert at freudenbergs.de>wrote:
>
>>
>> On 06.01.2012, at 19:43, Eliot Miranda wrote:
>>
>>
>>
>> On Fri, Jan 6, 2012 at 8:13 AM, Bert Freudenberg <bert at freudenbergs.de>wrote:
>>
>>>
>>> On 06.01.2012, at 16:55, John McKeon wrote:
>>>
>>> > I thought I would help out and test it on Windows.
>>> > For some reason the mouse events from the HostWindow never reflect the
>>> button press. evt at: 5 always returns 0.
>>>
>>> That's strange. HostWindowPlugin uses the same code to record mouse
>>> events as the regular window ...
>>>
>>> > One other thing I noticed is the main Squeak window title changes to
>>> "Paint Test" and the host window title is "Squeak!".
>>> > Tested on Win7 and XP with the cog vm v2522 13 Dec 2011
>>>
>>> Hehe. Okay, that one is obviously a bug in the VM. It should really use
>>> SetWindowTextW(hwnd, ...:
>>>
>>> sqInt ioSetTitleOfWindow(sqInt windowIndex, char * newTitle, sqInt
>>> sizeOfTitle) {
>>>  HWND hwnd = (windowIndex == 1 ? stWindow : ((HWND)windowIndex));
>>>  char titleString[1024];
>>>  WCHAR wideTitle[1024];
>>>
>>>  if(!IsWindow(hwnd)) return 0;
>>>  if (sizeOfTitle > 1023) sizeOfTitle = 1023;
>>>  strncpy(titleString, newTitle, sizeOfTitle);
>>>  titleString[sizeOfTitle] = 0;
>>>  MultiByteToWideChar(CP_UTF8, 0, titleString, -1, wideTitle, 1024);
>>>  if(SetWindowTextW(stWindow, wideTitle) == 0) return -1;
>>>  return sizeOfTitle;
>>> }
>>>
>>
>> But the code in
>> platforms/win32/plugins/HostWindowPlugin/sqWin32HostWindowPlugin.c in the
>> Cog sources looks to be exactly that, and the code hasn't changed since
>> April 2010...  Which version of the sources contains the bug?
>>
>>
>> That version. It needs to say this instead:
>>
>> SetWindowTextW(hwnd, ...
>>
>>
>> It should use hwnd instead of stWindow.
>>
>
> Thanks!  So much for eye-ball diff tools...
>
>
>>
>>  - Bert -
>>
>>
>>
>>
>>
>
>
> --
> best,
> Eliot
>
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20120107/613c6365/attachment.htm


More information about the Squeak-dev mailing list