Página 2 de 2

disparar um processo

Enviado: 09 Mar 2018 20:55
por asimoes
Use

SET TYPEAHEAD TO 0

Comigo funcionou com HwGui

disparar um processo

Enviado: 09 Mar 2018 21:03
por asimoes
Poka

Tenta isso:

InKeyGui(1) // colocar na saída do sua função de tecla

Código: Selecionar todos

#pragma BEGINDUMP

#include <windows.h>

#include "hbapi.h"

#include <olectl.h>

#include <time.h>

HB_FUNC( INKEYGUI )  
{                                                                      
    MSG Msg; 
    BOOL lNoLoop=FALSE; 
    UINT dwTimer, nRet=0, uTimeout=1, uMilisec=1000;   

    if( HB_ISNUM(1) ) uTimeout = hb_parni(1); 

    if( HB_ISNUM(2) ) uMilisec = hb_parni(2); 

    if( uTimeout==0 ) uTimeout = 0x0FFFFFFF; 

    if( uTimeout>0 ) uTimeout = uTimeout * uMilisec; 

    dwTimer = SetTimer( NULL, 0, uTimeout, NULL); 

    while( GetMessage(&Msg, NULL, 0, 0) ) 
    { 

       switch( Msg.message ) 
       { 
          case WM_KEYDOWN    : 
          case WM_SYSKEYDOWN : { nRet    = Msg.wParam; lNoLoop = TRUE; break; } 
          case WM_TIMER      : { lNoLoop = Msg.wParam == dwTimer;      break; } 
       } 
  
       if( lNoLoop ) 
       { 
          KillTimer( NULL, dwTimer ); 
          hb_retni( nRet ); 
          return ; 
       } 
       else  
       { 
          TranslateMessage( &Msg );  // Translates virtual key codes 
          DispatchMessage( &Msg );   // Dispatches message to window 
       }  
    } 
} 

#pragma ENDDUMP

disparar um processo

Enviado: 09 Mar 2018 21:10
por asimoes
Poka

Tem também um exemplo feito pelo Dr. Claudio Soto na pasta:
Talvez te dê uma ideia

\MiniGUI\SAMPLES\Advanced\ReadKey