home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 16 / CD_ASCQ_16_0994.iso / news / 4611 / fw16d.ins / IDE / SOURCE / WINAPI.PRG < prev   
Text File  |  1994-06-04  |  2KB  |  59 lines

  1. // FiveWin IDE - Windows API messages Inspector
  2.  
  3. #include "FiveWin.ch"
  4.  
  5. static oWnd
  6. static aMsgs := { { "STOP", 0, 0, 0, 0 } }
  7. static nMsgs := 80
  8.  
  9. //----------------------------------------------------------------------------//
  10.  
  11. function ApiInspect()
  12.  
  13.    local oBrw
  14.  
  15.    if oWnd != nil
  16.       return nil
  17.    endif
  18.  
  19.    DEFINE WINDOW oWnd FROM 1, 1 TO 23, 33 ;
  20.       TITLE "Windows API Inspector" MDICHILD
  21.  
  22.    @ 0, 0 LISTBOX oBrw FIELDS "" ;
  23.       HEADERS    "hWnd", "Windows Message", "nWParam", "nLParam" ;
  24.       COLSIZES       80,               200,       100,      100  ;
  25.       SIZE 400, 400  OF oWnd
  26.  
  27.    oBrw:bLine = { || { cValToChar( aMsgs[ oBrw:nAt ][ 1 ] ),;
  28.                        LoadValue(  aMsgs[ oBrw:nAt ][ 2 ] ),;
  29.                        cValToChar( aMsgs[ oBrw:nAt ][ 3 ] ),;
  30.                        cValToChar( aMsgs[ oBrw:nAt ][ 4 ] ) } }
  31.    oBrw:SetArray( aMsgs )
  32.    oWnd:SetControl( oBrw )
  33.  
  34.    ACTIVATE WINDOW oWnd ;
  35.       VALID ( oWnd := nil, .t. )
  36.  
  37.    // VALID ( SetMsgInspector(), oWnd := nil, .t. )
  38.  
  39.    // SetMsgInspector( "SHOWMSGS" )
  40.  
  41. return nil
  42.  
  43. //---------------------------------------------------------------------------//
  44.  
  45. function ShowMsgs( hWnd, nMsg, nWParam, nLParam )
  46.  
  47.    if Len( aMsgs ) == nMsgs
  48.       // SetMsgInspector()
  49.       return nil
  50.    endif
  51.  
  52.    if oWnd != nil .and. hWnd != oWnd:hWnd
  53.       AAdd( aMsgs, { hWnd, nMsg, nWParam, nLParam } )
  54.    endif
  55.  
  56. return nil
  57.  
  58. //---------------------------------------------------------------------------//
  59.