title: MenuRef GetControl32BitValue always return 0
body: <p>Hello i' need to use a pop-up menu, witch is created dynamically.</p>
  
  <pre><code>
  OSErr err = GetBevelButtonMenuHandle(m_pRecallAOptionalButton, &m_pRecallAMenuRef);
  
  for (countitem)
  {
   String szItem (List.GetAt(i));
   CFStringRef sz = ToCFStringRef(szItem);
   AppendMenuItemTextWithCFString(m_pRecallAMenuRef, sz, 0, 0, 0);
  }
  
  short  sCount = CountMenuItems(m_pRecallAMenuRef);
  SetControl32BitMaximum(m_pRecallAOptionalButton, sCount);
  </code></pre>
  
  <p>This is ok, menu show the correct number of items. I set maximum value.</p>
  
  <p>My problem occur when i want to get the selected item index.
  For this, i use the kEventClassMenu event &amp; kEventMenuClosed kind</p>
  
  <pre><code>
  case kEventClassMenu:
  {
      MenuRef Menu;
      GetEventParameter( inEvent, kEventParamDirectObject, typeMenuRef, NULL, sizeof(Menu), NULL, &Menu );
  
      if (Menu && (Menu == pMainForm->m_pRecallAMenuRef))
      {
        SInt32 nIndex = GetControl32BitMaximum(m_pRecallAOptionalButton); // return the correct items count
        nIndex = GetControl32BitValue(m_pRecallAOptionalButton); // always return 0 !!!!!
      }
  }
  </code></pre>
  
  <p>Did i missed something ? is it the right event to attach ?</p>
  
  <p>Many thanks for help.</p>