Hi,

I'm trying to write a simple Hello World app that does something like a
WAIT command and maybe calls a function if I click the X button for a
GTWIN app.

Yes, you're right.
I have another patch to fix this, IMHO a issue, but I don't have right to commit it, there are two differents points of view and few opinions. Please note that GTWIN behavior is the same as a Clipper program under NTVDM.

===================================================================

* harbour/src/rtl/gtwin/gtwin.c
 ! Fixing CTRL_BREAK_EVENT, and CTRL_CLOSE_EVENT
   (Clicked 'X' on system menu) to avoid irregular
   shutdown with SETCANCEL( .F. )

   REQUEST HB_GT_WIN_DEFAULT
   ANNOUNCE HB_GTSYS
   PROCEDURE Main()
      SetCancel(.F.)
      ? "Click [X] Not close windows"
      WAIT
   RETURN

Modified Paths:
--------------
    trunk/harbour/src/rtl/gtwin/gtwin.c

--- .patch
Index: gtwin.c
===================================================================
--- gtwin.c     (revision 14052)
+++ gtwin.c     (working copy)
@@ -563,7 +563,9 @@

       case CTRL_CLOSE_EVENT:
       case CTRL_BREAK_EVENT:
-         s_bBreak = HB_TRUE;
+         /* Avoid irregular shutdown if SetCancel( .F. ) [jarabal] */
+         if( hb_setGetCancel() )
+            s_bBreak = HB_TRUE;
          bHandled = TRUE;
          break;

---

--
Xavi

El 03/03/2010 23:09, smu johnson escribió:
Hi,

I'm trying to write a simple Hello World app that does something like a
WAIT command and maybe calls a function if I click the X button for a
GTWIN app.  I have no idea if this is even possible, as I have grepped
the entire harbour src .zip file contents for some hints.  In the few
results for CTRL_CLOSE_EVENT I don't really see anything relevant that
can like.. set up a call hook function or anything.  I'm totally lost.

Any hints greatly appreciated.

--
smu johnson <smujohn...@gmail.com <mailto:smujohn...@gmail.com>>

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

Reply via email to