Hi Viktor,

Remember my Fixing about this .-

2010-03-01 14:45 UTC+0100 Viktor Szakats (harbour.01 syenar.hu)
  ...

  * src/rtl/gtwvt/gtwvt.c
    ! Reverted close/SETCANCEL/HB_GTI_CLOSABLE behavior to
      match the old one and that of other GTs.
      Also see:
        2008-06-25 11:49 UTC+0200 Viktor Szakats (harbour.01 syenar.hu)
      Please use HB_GTI_CLOSABLE and HB_GTI_NOTIFIERBLOCK
      to control GUI window close behavior.

...

2010-03-01 04:05 UTC+0100 Xavi (jarabal/at/gmail.com)
  * harbour/src/rtl/gtwvt/gtwvt.c
    ! Fixing WM_CLOSE event (Clicked 'X' on system menu)
      to avoid irregular shutdown with SETCANCEL( .F. )

      REQUEST HB_GT_WVT_DEFAULT
      ANNOUNCE HB_GTSYS
      PROCEDURE Main()
         SetCancel(.F.)
         ? "Click [X] Not close windows"
         while( LastKey() != 27 )
            Inkey( 1 )
         enddo
      RETURN

Best regars,
Xavi

El 06/04/2010 11:29, Viktor Szakáts escribió:
On Tue, Apr 6, 2010 at 10:40 AM, Xavi<jara...@gmail.com>  wrote:
El 06/04/2010 9:33, Viktor Szakáts escribió:

False. In GTWVT it will only do it if callback says to do so,
and it instantly exists the application (that's why it modifies
this flag internally - I guess).

GTWVT do this without callback, you need to program a express callback to
not do so return 1 i.e.
if not exist NotifierBlock "callback" hb_gt_wvt_FireEvent return 0 and do
so.

static int hb_gt_wvt_FireEvent( PHB_GTWVT pWVT, int nEvent )
{
   int nResult = 0; /* Unhandled */

   if( pWVT->pGT->pNotifierBlock )
   {
        ...
   }

   return nResult;
}
...
      case WM_CLOSE:  /* Clicked 'X' on system menu */
         if( hb_gt_wvt_FireEvent( pWVT, HB_GTE_CLOSE ) == 0 )
         {
            PHB_ITEM pItem = hb_itemPutL( NULL, HB_TRUE );
            hb_setSetItem( HB_SET_CANCEL, pItem );...
...

In GTWIN, it just sets the SETCANCEL flag and lets the
app continue to run.

This is wrong solution. SETCANCEL is not something
the app sets. SETCANCEL is a way to let app developers
_control_ the behavior of Ctrl+C. Nothing more. What you
committed just creates a hidden extension plus incompatible
to Clipper behavior (since in Clipper SETCANCEL flag was
never modified by window closure).

Brgds,
Viktor
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to