//////////////////////////////////////////////////////////////////////////////// 
// 
// step11.cpp -    
// 
//////////////////////////////////////////////////////////////////////////////// 
#ifndef __WINDOWS_
#include <windows.h>
#endif

#ifndef __STDIO_H
#include <stdio.h>
#endif

#ifndef __LIBTOOL_H
#include "libtool.h"
#endif

#ifndef __STEP11_RH
#include "step11.rh"
#endif


//-------------------------------------------------------------------------------
//   
// ---
extern "C" unsigned int __export __pascal LIBRARYID()
{
  return IDR_LIBID;
}


//------------------------------------------------------------------------------
//   
// ---
int far __export pascal CallBackCommand( int command, RequestInfo *info  )
{
  char buf[255];
  sprintf( buf, "  %d", command );
  Message( buf );

  //        
  //       
  sprintf( buf, "   %d", command );
  info->title = buf;
 
  //   ,       :
  // ( TRUE - , FALSE -     )
  return command == ID_COMMAND_3 ? FALSE : TRUE;
}


//-------------------------------------------------------------------------------
//   
// ---
extern "C" void __export __pascal LIBRARYENTRY( unsigned int )
{
  //           .
  //        NULL, 
  //    CommandWindow  , 
  //        .
  //      .
  //     ,    
  //      FALSE,    -1.
  
  //     
  RequestInfo info;
  memset( &info, 0, sizeof( info ) );
  info.commands = ( char * )ID_TREE_CONTENTS;  //      
  info.title    = " ";             //   
  info.callBack = CallBackCommand;             //   
 
  //     
  int command = CommandWindow( &info );
  char buf[255];
  sprintf( buf, "  - CommandWindow %d", command );
  Message( buf );
}
