Copyright (C)2000-2009 AI Internet Solutions Created April 21, 2009 CSE HTML Validator supports flags that can control groups of messages. For example, there are deprecation messages grouped under flag 9. These messages will begin with the text "[9]" to indicate that the messages can be turned off by turning off flag 9. Flags are available to be enabled or disabled in the standard and professional editions and are not supported in the lite edition. First, the flag of the message is needed. A valid flag is an integer that is >0 (greater than zero). The flag can be obtained with a validation results handle (valresults) and code like the following: // To get the flag of a message // valresults is a handle to the validation results obtained after validating a document // i is a zero-based looping variable in a "for" loop that is used to read through the validation messages after a validation (since it is zero-based, add 1 to it when calling CSEGetInteger2EZ()) msgflag=CSEGetInteger2EZ(valresults, CSERESULTMSGFLAG, i+1); // supported by v4.00+ (all DLLs) // A few (limited) number of messages may support a 2nd flag which also controls the message (this can be optionally supported) if (CSEGetInteger3EZ(CSEPROGRAMVERSIONINT)>=50000) { // supported by v5.00+ msgflag2=CSEGetInteger2EZ(valresults, CSERESULTMSGFLAG2, i+1); // CSE v5.00+ only } else { msgflag2=-1; } We recommend that this be implemented through the context menu that appears when a user selects a validator message and accesses the context menu for that message. You can then provide options for the user to enable or disable the relevant flag (and thus affect the group of messages that the flag controls). If the flag is <1 (less than one) then these options should be disabled. If the user is not using a compatible version of the validator, then these messages should always be disabled. All DLL versions support CSERESULTMSGFLAG, but only v5.00 and above support a second flag using CSERESULTMSGFLAG2. // To find out if flag msgflag is enabled int ismsgflagenabled=CSEGetFlag(confighandle, CSECFGTAGNAMEPROGRAMFLAGS, msgflag); // returns 1 if enabled or 0 if not // To disable or enable flag msgflag // value should be nonzero to enable the flag or zero to disable it CSESetFlag(confighandle, CSECFGTAGNAMEPROGRAMFLAGS, msgflag, value); // To open CSE HTML Validator Help to the place where a specific flag (msgflag) is documented if (CSEGetInteger3EZ(CSEPROGRAMVERSIONINT)>=60000) { // supported by v6.00+ CSEDisplayHelp(hwnd, CSEDISPLAYHELPFLAG, msgflag, 0); // CSE v6.00+ only }