For anyone with the ability to compile Win32-GUI, that has been annoyed
that the double-headed arrows don't show up to provide feedback to the
user that clicking and dragging at this point will resize a window, like
I have been, help is at hand-- I found the bug.

In the CommonMsgLoop function in GUI_MessageLoops.cpp, change case
WM_SETCURSOR to read as follows (white space reformatted somewhat from
the original):

case WM_SETCURSOR:
  {
    LPPERLWIN32GUI_USERDATA perlud;
    perlud = (LPPERLWIN32GUI_USERDATA) GetWindowLong((HWND) wParam,

      GWL_USERDATA);
    WORD nHitTest = LOWORD( lParam );
    // WORD wMouseMsg = HIWORD( lParam );
    if( nHitTest == HTCLIENT ) {  // only diddle cursor in client areas
      if( ValidUserData(perlud) ) {
        if( perlud->hCursor != NULL) {
          SetCursor( perlud->hCursor );
          return TRUE;
        } else {
          return FALSE;
        }
      }
      return FALSE;
    }
  }
  break;

Explanation: the prior code for WM_SETCURSOR was not sensitive to
whether or not the cursor was located in a window's client area or in
the window's non-client area.  Therefore, same cursor was used
throughout both areas, based on the cursor defined for the window, or
the cursor defined for the window class.  By only executing that logic
when the cursor is within the window's client area (see the check for
HTCLIENT in the code above) the cursor in the window's non-client areas
is handled by the DefWindowProc, which displays the double-headed arrows
when given the chance!

If there is still a maintainer of Win32::GUI, feel free to apply this as
a patch to the original source code. This bug was referred to as Topic 4 in the message entitled "Win32::GUI bug fix, info, etc." dated 6/24/2003 5:10 PM PT, and which was written in response to the Call for Bugs for the never delivered Easter release of Win32::GUI, summarizing a number of problems after it became clear that the Easter release didn't happen in that time frame. The referenced message contains a different bug fix, which hasn't yet resulted in a new release of Win32::GUI, so that is why I wonder if there is still a maintainer.

--
Glenn -- http://nevcal.com/
===========================
Like almost everyone, I receive a lot of spam every day, much of it
offering to help me get out of debt or get rich quick.  It's ridiculous.
-- Bill Gates


Reply via email to