DrgVerifyNativeRMF
Appearance
Determines if the native rendering mechanism and format of an object match any supplied by the application.
Syntax
DrgVerifyNativeRMF(pDragitem, pRMF)
Parameters
- pDragitem (PDRAGITEM) - input
- Pointer to the DRAGITEM structure whose native rendering mechanism and format are to be verified.
- pRMF (PSZ) - input
- 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:
- <mechanism(1),format(1)>
- (mechanism(1)[,mechanism(n)...]), (format(1)[,format(n)...])
- where mechfmt can be in either of these formats:
Returns
- rc (BOOL) - returns
- Validity indicator.
- TRUE - Successful completion.
- FALSE - Error occurred.
Remarks
This function determines if the native rendering mechanism and format of a dragged object are understood by the target. If TRUE is returned, the target may be able to carry out the action indicated by the direct manipulation itself, or it can select the native rendering mechanism and format as those to be used for the data exchange.
Example Code
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> #include <string.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 */ }