udfClipGetIDForCustomFormat
int udfClipGetIDForCustomFormat (str)
;------------------------------------------------------------------------------------------------------------------------------------------
#DefineFunction udfClipGetIDForCustomFormat (strFormatName)
intFormatID = DllCall ("USER32.DLL", long:"RegisterClipboardFormatA", lpstr:strFormatName)
If intFormatID < 49152 Then intFormatID = 0
Return intFormatID
;..........................................................................................................................................
; The RegisterClipboardFormat function registers a new clipboard format.
; Registered clipboard formats are identified by values in the range 0xC000 (49152) through 0xFFFF (65535).
; This format can then be used as a valid clipboard format.
;
; If the function succeeds, the return value identifies the registered clipboard format.
; If the function fails, the return value is zero.
;
; If a registered format with the specified name already exists,
; then a new format is not registered and the return value identifies the existing format.
; This enables more than one application to copy and paste data using the same registered clipboard format.
; Note that the format name comparison is case-insensitive.
;..........................................................................................................................................
; Detlev Dalitz.20030119
;..........................................................................................................................................
#EndFunction
;------------------------------------------------------------------------------------------------------------------------------------------


; Test.

intFormatID1 = udfClipGetIDForCustomFormat ("CF_TEXT")          ; ==> 57379
intFormatID2 = udfClipGetIDForCustomFormat ("CF_LOCALE")        ; ==> 57432
intFormatID3 = udfClipGetIDForCustomFormat ("Rich Text Format") ; ==> 52096
intFormatID4 = udfClipGetIDForCustomFormat ("xxxxxxxx")         ; ==> 57489
intFormatID5 = udfClipGetIDForCustomFormat ("XXXXXXXX")         ; ==> 57489
intFormatID6 = udfClipGetIDForCustomFormat ("xxx")              ; ==> 57485

Exit
;------------------------------------------------------------------------------------------------------------------------------------------