title: Common Dialogboxes Win32
body: <p>I have a common color dialog box that I want to activate on a menu press.
  Unfortunately, every time I press on the item, the window loses focus, as if a dialog box is coming up, but the dialog box never shows up.</p>
  
  <p>The code I'm using right now is below:</p>
  
  <pre><code>case ID_TOOL_CHOOSECOLOR:
  //show colour dialog
  ChooseColor(&amp;cc);
  </code></pre>
  
  <p>and I've initialized my CHOOSECOLOR structure like this:</p>
  
  <pre><code> cc.lStructSize    = sizeof (CHOOSECOLOR) ;
   cc.hwndOwner      = NULL ;
   cc.hInstance      = NULL ;
   cc.rgbResult      = RGB (0x80, 0x80, 0x80) ;
   cc.lpCustColors   = crCustColor ;
   cc.Flags          = CC_RGBINIT | CC_FULLOPEN ;
   cc.lCustData      = 0 ;
   cc.lpfnHook       = NULL ;
   cc.lpTemplateName = NULL ;
  </code></pre>
  
  <p>What's weird is, the dialog box only shows up after I press the "ALT" key (and only the alt key). Any tips?</p>
  
  <p>I'm trying to do this in an MDI document by the way.</p>
  
  <p>Thanks</p>