Uses for SHCOLSTATE_HIDDEN

The docs say, Not displayed in the user interface. So what’s the point?

Well… consider InfoTips, which I revisited today. Normally they are useful for a specific file type for which you would implement IQueryInfo. But what to do when you want to add to the default set of InfoTips for a generic type or set of types? The only available option is to use the {FORMATID}PROPID syntax with IColumnProvider but still, you don’t get headings for the tips if you do that.

The trick is to add duplicate columns and mark them as hidden to the UI using SHCOLSTATE_HIDDEN. The shell will then enumerate them, but not give the user the option of adding them as columns. Then when the shell calls GetItemData() for one of the hidden PROPIDs, you can prefix the output with whatever heading you choose.

Advertisements
This entry was posted in Programming. Bookmark the permalink.

One Response to Uses for SHCOLSTATE_HIDDEN

  1. javed says:

    Using SHCOLSTATE_HIDDEN does not make any difference. the column is still showing in the dialog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s