Пример #1
0
//----------------------------------------------------------------------------
// NPP_StreamAsFile:
//----------------------------------------------------------------------------
void NP_LOADDS
NPP_StreamAsFile(NPP instance, NPStream *stream, const char* fname) {
  if ( instance == 0 ) return;
  PluginInstance* This = (PluginInstance*) instance->pdata;
  if ( This ) {
    HAB hab=WinQueryAnchorBlock( This->hWnd );
    HMF hmf=GpiLoadMetaFile( hab, fname );
    if ( hmf ) {
      SelectMetaFile( This, hmf );
    } else pprintf( szPPR, "GpiLoadMetaFile( %s ) failed\n\r", fname );
  }
}
Пример #2
0
#define INCL_GPIMETAFILES       /* Metafile functions           */

#include <os2.h>



HAB hab;                /* anchor block handle                  */

HMF hmf;                /* metafile handle                      */



/* loads metafile from disk */

hmf = GpiLoadMetaFile(hab, "sample.met");

    .

    .

    .

GpiDeleteMetaFile(hmf);             /* deletes metafile         */