Hi Saulius,

>> Oh yes, so you are using GTWIN.
>> No, for this GT "Close -> X" button cannot be manipulated.
> 
> It can, through API SetConsoleCtrlHandler(). Handles events:
> CTRL_C_EVENT
> CTRL_BREAK_EVENT
> CTRL_CLOSE_EVENT             <<<===
> CTRL_LOGOFF_EVENT
> CTRL_SHUTDOWN_EVENT

Can you show an example for that using current gtwin.c code?

We're already handling these events, so if doable, it should 
be implemented here:
---
static BOOL WINAPI hb_gt_win_CtrlHandler( DWORD dwCtrlType )
{
   BOOL bHandled;

   HB_TRACE(HB_TR_DEBUG, ("hb_gt_win_CtrlHandler(%lu)", ( HB_ULONG ) 
dwCtrlType));

   switch( dwCtrlType )
   {
      case CTRL_C_EVENT:
         bHandled = FALSE;
         break;

      case CTRL_CLOSE_EVENT:
      case CTRL_BREAK_EVENT:
         s_bBreak = HB_TRUE;
         bHandled = TRUE;
         break;

      case CTRL_LOGOFF_EVENT:
      case CTRL_SHUTDOWN_EVENT:
      default:
         bHandled = FALSE;
   }

   return bHandled;
}
---

Brgds,
Viktor

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

Reply via email to