<br><br><div class="gmail_quote">On Fri, Jan 6, 2012 at 8:13 AM, Bert Freudenberg <span dir="ltr">&lt;<a href="mailto:bert@freudenbergs.de">bert@freudenbergs.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im"><br>
On 06.01.2012, at 16:55, John McKeon wrote:<br>
<br>
&gt; I thought I would help out and test it on Windows.<br>
&gt; For some reason the mouse events from the HostWindow never reflect the button press. evt at: 5 always returns 0.<br>
<br>
</div>That&#39;s strange. HostWindowPlugin uses the same code to record mouse events as the regular window ...<br>
<div class="im"><br>
&gt; One other thing I noticed is the main Squeak window title changes to &quot;Paint Test&quot; and the host window title is &quot;Squeak!&quot;.<br>
&gt; Tested on Win7 and XP with the cog vm v2522 13 Dec 2011<br>
<br>
</div>Hehe. Okay, that one is obviously a bug in the VM. It should really use SetWindowTextW(hwnd, ...:<br>
<br>
sqInt ioSetTitleOfWindow(sqInt windowIndex, char * newTitle, sqInt sizeOfTitle) {<br>
  HWND hwnd = (windowIndex == 1 ? stWindow : ((HWND)windowIndex));<br>
  char titleString[1024];<br>
  WCHAR wideTitle[1024];<br>
<br>
  if(!IsWindow(hwnd)) return 0;<br>
  if (sizeOfTitle &gt; 1023) sizeOfTitle = 1023;<br>
  strncpy(titleString, newTitle, sizeOfTitle);<br>
  titleString[sizeOfTitle] = 0;<br>
  MultiByteToWideChar(CP_UTF8, 0, titleString, -1, wideTitle, 1024);<br>
  if(SetWindowTextW(stWindow, wideTitle) == 0) return -1;<br>
  return sizeOfTitle;<br>
}<br></blockquote><div><br></div><div>But the code in platforms/win32/plugins/HostWindowPlugin/sqWin32HostWindowPlugin.c in the Cog sources looks to be exactly that, and the code hasn&#39;t changed since April 2010...  Which version of the sources contains the bug?</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<font color="#888888"><br>
<br>
<br>
- Bert -<br>
<br>
<br>
<br>
</font></blockquote></div><br><br clear="all"><div><br></div>-- <br>best,<div>Eliot</div><br>