| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Hi ! Who khow, how to emulate SetCloseEvent function in a new gtwvt(g) terminal version ? I use this function to control "application close" system button. This is source of rtl/gx.c, that doesn't work since march builds. HB_FUNC( SETCLOSEEVENT ) { PHB_ITEM pEvent = hb_param( 1, HB_IT_NUMERIC ); if ( pEvent == NULL ) { hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, "SETCLOSEEVENT", 1, hb_paramError( 1 ) ); } else { hb_gtSetCloseEvent( hb_itemGetNL( pEvent ) ); } } |
|
#2
| |||
| |||
| Hi k_dima, Maybe below info will give you a hint? Regards, Mario #include "hbgtinfo.ch" Hb_GtInfo( HB_GTI_CLOSABLE, .F. ) k_dima wrote: > Hi ! Who khow, how to emulate SetCloseEvent function in a new > gtwvt(g) terminal version ? I use this function to control > "application close" system button. > This is source of rtl/gx.c, that doesn't work since march builds. > > HB_FUNC( SETCLOSEEVENT ) > { > PHB_ITEM pEvent = hb_param( 1, HB_IT_NUMERIC ); > if ( pEvent == NULL ) > { > hb_errRT_BASE_SubstR( EG_ARG, 3012, NULL, "SETCLOSEEVENT", 1, > hb_paramError( 1 ) ); > } > else { > hb_gtSetCloseEvent( hb_itemGetNL( pEvent ) ); > } > } > |
|
#3
| |||
| |||
| On 29 ΑΧΗ, 13:09, "Mario H. Sabado" <mhsab...@gmail.com> wrote: > Hi k_dima, > > Maybe below info will give you a hint? > > Regards, > Mario > > #include "hbgtinfo.ch" > Hb_GtInfo( HB_GTI_CLOSABLE, .F. ) > > > I need a callback event HB_GTE_CLOSE, and see, that it doesn't supported in a current GT version /* Harbour GT callback events - WORK IN PROGRESS */ #define HB_GTE_ACTIVATE 1 #define HB_GTE_SETFOCUS 2 #define HB_GTE_KILLFOCUS 3 #define HB_GTE_CLOSE 4 #define HB_GTE_RESIZED 5 |
|
#4
| |||
| |||
| k_dima, >I need a callback event HB_GTE_CLOSE, and see, that it doesn't >supported in a current GT version >/* Harbour GT callback events - WORK IN PROGRESS */ >#define HB_GTE_ACTIVATE 1 >#define HB_GTE_SETFOCUS 2 >#define HB_GTE_KILLFOCUS 3 >#define HB_GTE_CLOSE 4 >#define HB_GTE_RESIZED 5 Look at sample \tests\wvtext.prg Pay attention on this line: HB_GtInfo( HB_GTI_NOTIFIERBLOCK, {|nEvent| MyNotifier( nEvent ) } ) Best regards, Saulius |
|
#5
| |||
| |||
| I tryed to compile this sample, but it use callback events, that defined as "work in progress" in the hbgtinfo.ch, so it doesn't work in the Xharbour. Anyway, thanks , will see if it will be work in the future. On 1 ΣΕΞΤ, 14:21, "Saulius" <Saul...@NOSPAM.com> wrote: > k_dima, > > >I need a callback event HB_GTE_CLOSE, and see, that it doesn't > >supported in a current GT version > >/* Harbour GT callback events - WORK IN PROGRESS */ > >#define HB_GTE_ACTIVATE 1 > >#define HB_GTE_SETFOCUS 2 > >#define HB_GTE_KILLFOCUS 3 > >#define HB_GTE_CLOSE 4 > >#define HB_GTE_RESIZED 5 > > Look at sample \tests\wvtext.prg > Pay attention on this line: > HB_GtInfo( HB_GTI_NOTIFIERBLOCK, {|nEvent| MyNotifier( nEvent ) } ) > |
|
#6
| |||
| |||
| <<<< I tryed to compile this sample, but it use callback events, that defined as "work in progress" in the hbgtinfo.ch, so it doesn't work in the Xharbour. Anyway, thanks , will see if it will be work in the future. >>>> It works in current CVS also. What you are looking for exactly extra than: FUNCTION Main() Hb_GtInfo( HB_GTI_CLOSABLE, .T. ) HB_GtInfo( HB_GTI_NOTIFIERBLOCK, {|nEvent| MyNotifier( nEvent ) } ) RETURN NIL STATIC FUNCTION MyNotifier( nEvent ) DO CASE CASE nEvent == HB_GTE_CLOSE DispScreen() if Alert( 'Close Application', {'Yes','No' } ) == 2 Return ( 1 ) endif ENDCASE RETURN 0 Regards Pritpal Bedi, INDIA-USA |
|
#7
| |||
| |||
| Hi Pritpal ! I compiled wvtext.prg vai Xhb Builder beta 83 based on CVS 2008-08-28 and wvg.lib I cannot get working MyNotifier function, application close or get focus without any notification.Other features works. Here is my xharbour builder project file CINI = C_OUTPUTFOLDER = DEFFILE = INCLUDEFOLDERS = LAUTORUN = LDEBUG = .F. LGUI = .T. LIBFOLDERS = LMT = .F. LPRG_CLASSICDEBUG = .F. LPRG_DEBUG = .F. LUSEDLL = .F. MAPFILE = MYC_FLAGS = MYDEFINES = MYLINK_FLAGS = MYPRG_FLAGS = MYRC_FLAGS = MYSLY_FLAGS = OUTPUTFOLDER = PRG_OUTPUTFOLDER = RC_OUTPUTFOLDER = RUNARGUMENTS = SLY_OUTPUTFOLDER = STARTIN = TARGETFOLDER = [wvtext.prg] MYC_FLAGS = MYDEFINES = MYPRG_FLAGS = [C:\xHB_new\lib\WVG.lib] and log file Type: C >>>xhb.exe -o"wvtext.c" -m -n -p -q -gc0 -I"C:\xHB_new \include" -I"C:\xHB_new\include\w32" "wvtext.prg"<<< xHarbour Compiler build 1.1.0 (SimpLex) (Rev. 6204) Copyright 1999-2008, http://www.xharbour.org http://www.harbour-project.org/ Generating object output to 'wvtext.obj'... Type: C >>>xlink.exe -NOEXPOBJ -MAP -FORCE:MULTIPLE -NOIMPLIB - subsystem:windows -LIBPATH:"C:\xHB_new\lib" -LIBPATH:"C:\xHB_new \c_lib" -LIBPATH:"C:\xHB_new\c_lib\win" "wvtext.obj" "C:\xHB_new\lib \WVG.lib" "OptG.lib" "xhb.lib" "dbf.lib" "ntx.lib" "cdx.lib" "rmdbfcdx.lib" crt.lib kernel32.lib user32.lib winspool.lib ole32.lib oleaut32.lib odbc32.lib odbccp32.lib uuid.lib wsock32.lib ws2_32.lib wininet.lib advapi32.lib shlwapi.lib msimg32.lib mpr.lib comctl32.lib comdlg32.lib gdi32.lib shell32.lib winmm.lib lz32.lib Netapi32.lib - out:"wvtest.exe"<<< Regards, Dmitri. On 2 ΣΕΞΤ, 00:14, "Pritpal Bedi" <bediprit...@hotmail.com> wrote: > <<<< > I tryed to compile this sample, but it use callback events, that > defined as "work in progress" in the hbgtinfo.ch, so it doesn't work > in the Xharbour. > Anyway, thanks , will see if it will be work in the future. > > > > It works in current CVS also. What you are looking for exactly extra than: > > FUNCTION Main() > Hb_GtInfo( HB_GTI_CLOSABLE, .T. ) > HB_GtInfo( HB_GTI_NOTIFIERBLOCK, {|nEvent| MyNotifier( nEvent ) } ) > > RETURN NIL > > STATIC FUNCTION MyNotifier( nEvent ) > DO CASE > CASE nEvent == HB_GTE_CLOSE > DispScreen() > if Alert( 'Close Application', {'Yes','No' } ) == 2 > Return ( 1 ) > endif > ENDCASE > RETURN 0 > > Regards > Pritpal Bedi, INDIA-USA |
|
#8
| |||
| |||
| Hi <<< I compiled wvtext.prg vai Xhb Builder beta 83 based on CVS 2008-08-28 and wvg.lib I cannot get working MyNotifier function, application close or get focus without any notification.Other features works. >>> I do not know about xHarbour builder process but theoretically it should work. Try comiling with xHarbour org. If it will not work there then I will explore further. Regards Pritpal Bedi, INDIA-USA |
|
#9
| |||
| |||
| Pritpal, > I do not know about xHarbour builder process but theoretically it should > work. > Try comiling with xHarbour org. If it will not work there then I will > explore > further. Sorry, did you even test your sample? How in the world could it work, if there's absolutley no support for HB_GTI_NOTIFIERBLOCK in gtwvt nor gtwvg? pWVT->pGT->pNotifierBlock is NEVER assigned! Once this omission is corrected we can begin to test it. Ron |
|
#10
| |||
| |||
| Ron Sorry, I forget to include it in hbgtcore.c: static BOOL hb_gt_def_Info( PHB_GT pGT, int iType, PHB_GT_INFO pInfo ) case... case HB_GTI_NOTIFIERBLOCK: if( pGT->pNotifierBlock ) { hb_itemRelease( pGT->pNotifierBlock ); pGT->pNotifierBlock = NULL; } if( hb_itemType( pInfo->pNewVal ) & HB_IT_BLOCK ) pGT->pNotifierBlock = hb_itemNew( pInfo->pNewVal ); break; default.. Please insert above lines and commit. Regards Pritpal Bedi "Ron Pinkas" <Ron@xHarbour.com> wrote in message news:ga4pvp$e62$1@aioe.org... > Pritpal, > >> I do not know about xHarbour builder process but theoretically it should >> work. >> Try comiling with xHarbour org. If it will not work there then I will >> explore >> further. > > Sorry, did you even test your sample? > > How in the world could it work, if there's absolutley no support for > HB_GTI_NOTIFIERBLOCK in gtwvt nor gtwvg? > > pWVT->pGT->pNotifierBlock is NEVER assigned! > > Once this omission is corrected we can begin to test it. > > Ron > > > |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.