title: Creating a ComboBox with one or more separator items?
body: <p>I'm using Delphi7 and I'd like to have a ComboBox with separator items (Just like in popup menus).</p>
  
  <p>I've seen this beautifully implemented in Mozilla Sunbird (I know, it's not Delphi...) the following way:</p>
  
  <ol>
  <li><p>The separator item is a simple gray line
  drawn in the center of the item</p></li>
  <li><p>If you hover over the separator with
  the mouse, the selection doesn't
  appear</p></li>
  <li><p>If the user clicks the separator,
  it's not selected either AND the
  combobox doesn't closeup.</p></li>
  </ol>
  
  <p>No. 1 could be implemented using DrawItem. I could live without No. 2 because I have no idea about that.</p>
  
  <p>For No. 3 I'm asking for your help. I've figured out that straight after closing up a CBN_CLOSEUP message is sent to the combobox.</p>
  
  <p>I thought about hooking the window proc and if CBN_CLOSEUP is sent to a certain combobox then countering it. But I'm unsure if this is the best solution, or maybe there are other, more elegant ways?</p>
  
  <p>Whatever the solution is, I'd like to have a standard ComboBox which supports WinXP/Vista/7 theming properly.</p>
  
  <p>Thanks!</p>
  
  <hr>
  
  <p><strong>Edit:</strong> For a working component please see this thread:</p>
  
  <p><a href="https://stackoverflow.com/questions/4356364/can-you-help-translating-this-very-small-c-component-to-delphi">Can you help translating this very small C++ component to Delphi?</a></p>