OPT_HANDLE

Previous  Next

 

OPT_HANDLE( handle, default )

 


 

Retrieve an optional HANDLE.  Return the default value if the parameter wasn't present.

 

Example

 

/////////////////////////////////////////////////////////////////////////////

//

int _NTGraph_Create( mb_interpreter_t* s, void** l )

  {

  AFX_MANAGE_STATE( AfxGetStaticModuleState() );

  //////////////////////////////////////////////////////////////////////////

 

  BEGIN_PARSE( s, l )

     POP_STRING( pName )

     OPT_INT( dwStyle, WS_VISIBLE )

     OPT_INT( nLeft, 0 )

     OPT_INT( nTop, 0 )

     OPT_INT( nRight, 640 )

     OPT_INT( nBottom, 480 )

     OPT_HANDLE( hParent, NULL )

     OPT_INT( nID, 0 )

  END_PARSE

 

  int nRet = g_this->Create( pName, dwStyle, CRect( nLeft, nTop, nRight, nBottom ), (CWnd*)hParent, nID );

 

  RETURN_INT( nRet );

  }

endfunc