Update of /cvsroot/perl-win32-gui/Win32-GUI
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27491

Modified Files:
        CHANGELOG GUI_Helpers.cpp 
Log Message:
Restore Original WndProc

Index: GUI_Helpers.cpp
===================================================================
RCS file: /cvsroot/perl-win32-gui/Win32-GUI/GUI_Helpers.cpp,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -d -r1.23 -r1.24
*** GUI_Helpers.cpp     20 Jan 2007 17:09:22 -0000      1.23
--- GUI_Helpers.cpp     20 Jan 2007 19:45:44 -0000      1.24
***************
*** 66,69 ****
--- 66,70 ----
      // Check perlpud
      if (perlud != NULL) {
+         HWND hwnd_self = handle_From(NOTXSCALL perlud->svSelf);
  
          // Free event hash
***************
*** 89,93 ****
              /* Free into parent */
              if(SvOK(perlud->svSelf)) {
!                 HWND parent = GetParent(handle_From(NOTXSCALL 
perlud->svSelf));
                  if (parent != NULL && *perlud->szWindowName != '\0')  {
                      SV* SvParent = SV_SELF_FROM_WINDOW(parent);
--- 90,94 ----
              /* Free into parent */
              if(SvOK(perlud->svSelf)) {
!                 HWND parent = GetParent(hwnd_self);
                  if (parent != NULL && *perlud->szWindowName != '\0')  {
                      SV* SvParent = SV_SELF_FROM_WINDOW(parent);
***************
*** 124,127 ****
--- 125,134 ----
          }
          
+         // If we stored an original wndproc, then restore it so that
+         // WM_NCDESTORY messages get there.
+         if (perlud->WndProc) {
+             SetWindowLong(hwnd_self, GWL_WNDPROC, (LONG)(perlud->WndProc));
+         }
+         
          // Free perlpud
          safefree (perlud);

Index: CHANGELOG
===================================================================
RCS file: /cvsroot/perl-win32-gui/Win32-GUI/CHANGELOG,v
retrieving revision 1.107
retrieving revision 1.108
diff -C2 -d -r1.107 -r1.108
*** CHANGELOG   20 Jan 2007 17:09:22 -0000      1.107
--- CHANGELOG   20 Jan 2007 19:45:44 -0000      1.108
***************
*** 6,9 ****
--- 6,14 ----
  Win32-GUI ChangeLog
  ===================
+ + [Robert May] : 20 January 2007 - Restore Original WndProc
+     - GUI_Helpers.cpp - restore the window's original wndproc
+       when freeing PERLUD, so that WM_NCDESTROY messages get
+       to the original wndproc, rather than DefwindowProc
+ 
  + [Robert May] : 20 January 2007 - Bug Fixes
      - Tooltip.xs - SetTitle method had warning and info icons
***************
*** 13,17 ****
      - Textfield.xs - re-write GetLine() to fix truncation caused by
        line number being used as a character index, and to correctly
!       return zero lenght lines
  
  + [Robert May] : 5 November 2006 - 1.05 Release
--- 18,22 ----
      - Textfield.xs - re-write GetLine() to fix truncation caused by
        line number being used as a character index, and to correctly
!       return zero length lines
  
  + [Robert May] : 5 November 2006 - 1.05 Release


Reply via email to