home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
VSCPPv8.zip
/
VACPP
/
IBMCPP
/
samples
/
IOC
/
DRAG1
/
DMSAMP1.CPP
< prev
next >
Wrap
Text File
|
1995-05-01
|
2KB
|
53 lines
#ifndef _IBASE_ //Make sure ibase.hpp is included
#include <ibase.hpp> // since that is where IC_<environ>
#endif // is defined.
#include <iframe.hpp>
#include <ientryfd.hpp>
#include <idmefit.hpp>
#include <idmhndlr.hpp>
#include "dmsamp1.h"
/*------------------------------------------------------------------------------
| main |
------------------------------------------------------------------------------*/
int main()
{
/***********************************************************************/
/* Create a generic frame window. */
/***********************************************************************/
IFrameWindow
frame( "Direct Manipulation Sample 1", WND_MAIN );
/***********************************************************************/
/* Create 2 entry fields for the client area. */
/***********************************************************************/
IEntryField
client( 1000, &frame, &frame ),
ext ( 1001, &frame, &frame );
/***********************************************************************/
/* Enable source and target direct manipulation support for both */
/* entry fields. */
/***********************************************************************/
IDMHandler::enableDragDropFor( &client );
IDMHandler::enableDragDropFor( &ext );
/***********************************************************************/
/* Frame setup - Put both entry fields in the client area, with one */
/* added as an extension. */
/***********************************************************************/
frame
.setIcon( frame.id() )
.setClient( &client )
.addExtension( &ext, IFrameWindow::belowClient, 0.5 )
.setFocus()
.show();
/***********************************************************************/
/* Run Direct Manipulation Sample 1 */
/***********************************************************************/
IApplication::current().run();
return 0;
}