Estimado Antonio:
para limpiar el buffer del teclado tenemos en FWH algo parecido a "Clear Typeahead" de Clipper??
estuve buscando en \Samples\ pero no vi nada al respecto y en el foro nadie responde.
Mil gracias, maestro.
LORENZO
Estimado Antonio:
para limpiar el buffer del teclado tenemos en FWH algo parecido a "Clear Typeahead" de Clipper??
estuve buscando en \Samples\ pero no vi nada al respecto y en el foro nadie responde.
Mil gracias, maestro.
LORENZO
Lorenzo,
Actualmente no proporcionamos dicha función, pero es fácil de construir, ya que su funcionamiento sería parecido a SysRefresh() pero para eliminar los mensajes de teclado pendientes
Vamos a construir un prototipo y lo publicaremos cuanto antes
Hay alguna novedad respecto del mandato CLEAR TYPEAHEAD.
Necesito vaciar la memoria intermedia del teclado y no sé como hacerlo.
gdeteran wrote:Hay alguna novedad respecto del mandato CLEAR TYPEAHEAD.
Necesito vaciar la memoria intermedia del teclado y no sé como hacerlo.
#pragma BEGINDUMP
#include <hbapi.h>
#include <windows.h>
BOOL IsModelessDialog( MSG * pMsg );
BOOL bWRunning( void );
HWND GetWndApp( void );
LPACCEL _SetAcceleratorTable( LPACCEL hNewAccelTable );
BOOL ClearKeyboard( void )
{
LPACCEL hAccel = _SetAcceleratorTable( NULL );
MSG msg;
msg.message = 1;
while( PeekMessage( &msg, 0, 0, 0, PM_REMOVE ) && msg.message != WM_QUIT )
{
if( ! IsModelessDialog( &msg ) &&
!( hAccel && GetWndApp() &&
TranslateAccelerator( ( HWND ) GetWndApp(), ( HACCEL ) hAccel, ( LPMSG ) &msg ) ) )
{
if( msg.message != WM_CHAR )
{
TranslateMessage( &msg );
DispatchMessage( &msg );
}
}
}
if( bWRunning() && ( msg.message == WM_QUIT ) )
PostQuitMessage( 0 );
_SetAcceleratorTable( hAccel );
return ( msg.message != WM_QUIT );
HB_FUNC( CLEARKEYBOARD )
{
hb_retl( ClearKeyboard() );
}
#pragma ENDDUMPGracias Antonio y Daniel, probaré....
que tal Antonio,
Tengo la necesidad de esta funcion..
la agregue a mi .prg al final y la mando llamar ClearKeyboard(),, pero me envia estos errores al compilar...
Declaration not allowed here in function ClearKeyboard
Declaration syntax error in function ClearKeyboard
Declaration missing in function ClearKeyboard
Compound statement missing } in function ClearKeyboard
uso xmate y xharbour
gracias
paco
Paco,
Por favor copia aqui el reporte de error completo del compilador de C, gracias
[1]:Harbour.Exe Source\TAuditoria.prg /m /n0 /gc0 /es2 /ip:\32bits\xHarbour_TEST\INCLUDE;P:\32BITS\FWH_TEST\INCLUDE;INCLUDE;P:\32bits\Borland\bcc582\Include /ip:\32bits\XHABFE~1\Include /dHB_API_MACROS /dHB_FM_STATISTICS_OFF /dHB_STACK_MACROS /ip:\32bits\XHABFE~1\Contrib\What32\Include /oObj\TAuditoria.c
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6717)
Copyright 1999-2010, http://www.xharbour.org <!-- m --><a class="postlink" href="http://www.harbour-project.org/">http://www.harbour-project.org/</a><!-- m -->
Compiling 'Source\TAuditoria.prg'...
_stddef.h(38) Error E0030 Syntax error: "syntax error at 'INT'"
_stddef.h(56) Error E0025 Error in #if expression
_stddef.h(63) Error E0030 Syntax error: "syntax error at 'UNSIGNED'"
_stddef.h(82) Error E0030 Syntax error: "syntax error at 'INT'"
_stddef.h(91) Error E0030 Syntax error: "syntax error at 'UNSIGNED'"
_stddef.h(101) Error E0030 Syntax error: "syntax error at 'WCHAR_T'"
_stddef.h(110) Error E0030 Syntax error: "syntax error at 'WCHAR_T'"
_stddef.h(117) Error E0030 Syntax error: "syntax error at 'LONG'"
hbapi.h(570) Error E0025 Error in #if expression
9 errors
No code generatedHola paco:
Me gustaría saber si pudiste solucionar los errores y si limpiaba el buffer de teclado. Y si es así como.
Un saludo
Carlos