////////////////////////////////////////////////////////////////////////////////
//
// slidefrm.cpp -   
//
////////////////////////////////////////////////////////////////////////////////
#include <vcl.h>
#pragma hdrstop

#include "SlideFrm.h"

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

#pragma package(smart_init)
#pragma resource "*.dfm"
TSlideForm *SlideForm;


//-------------------------------------------------------------------------------
//
// ---
__fastcall TSlideForm::TSlideForm(TComponent* Owner)
  : TForm(Owner)
{
}


//-------------------------------------------------------------------------------
//  
// ---
void __fastcall TSlideForm::pPreviewBoxPaint(TObject *Sender)
{
  char fName[_MAX_PATH];
  ::GetModuleFileName( Application, fName, _MAX_PATH);
  char *c = ::strrchr( fName, '\\' );
  if ( c )
    *( c + 1 ) = '\0';
  ::strcat( fName, "Example.rc" );

  ::ksDrawSlideFromFile( pPreviewPanel->Handle, fName );
}


//-------------------------------------------------------------------------------
// ,       
//-------------------------------------------------------------------------------
void TestShowDialog() 
{
	TSlideForm* pDialog = new TSlideForm( Application );
  if( pDialog )
  {
    EnableTaskAccess( 0 ); //       
	  pDialog->ShowModal();
    EnableTaskAccess( 1 ); //       

   	delete pDialog;
  }
}
