This example determines if the native rendering mechanism and format of an object match any supplied by the application.
#define INCL_WINSTDDRAG /* Direct Manipulation (Drag) Functions */ #include <os2.h> DRAGITEM Dragitem; /* DRAGITEM structure whose native */ /* rendering mechanism and format are */ /* to be verified */ char pszRMF[25]; /* A string specifying the rendering */ /* mechanism and format. The string is */ /* of the form: */ /* */ /* mechfmt[,mechfmt,mechfmt,...], */ /* */ /* where 'mechfmt' can be in either of */ /* these formats: */ /* */ /* o <mechanism(1),format(1)> */ /* o (mechanism(1)[,mechanism(n)...]), */ /* (format(1)[,format(n)...]) */ strcpy(pszRMF,"<DRM_OS2FILE,DRF_TEXT>"); /* Mechanism is an OS/2 file and format */ /* is a null-terminated string. See */ /* the DRAGITEM structure for valid */ /* formats. */ if(DrgVerifyNativeRMF(&Dragitem, pszRMF)) { /* Code block */ }