<div class="gmail_quote">2012/9/6 Martin <span dir="ltr"><<a href="mailto:lazarus@mfriebe.de" target="_blank">lazarus@mfriebe.de</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

  
    
  
  <div bgcolor="#FFFFFF" text="#000000"><div class="im">
    <div>On 06/09/2012 20:21, Roberto P. wrote:<br>
    </div>
    </div><blockquote type="cite"><br>
      <div class="gmail_quote">2012/9/6 Mattias Gaertner <span dir="ltr"><<a href="mailto:nc-gaertnma@netcologne.de" target="_blank">nc-gaertnma@netcologne.de</a>></span><br>
        <blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
          <div>
            <div><div class="im">On Thu, 6 Sep 2012 16:15:03 +0200<br>
              "Roberto P." <<a href="mailto:padovani.r@gmail.com" target="_blank">padovani.r@gmail.com</a>>
              wrote:<br>
              <br></div><div class="im">
              > I can see the option biHelp among the other
              TForm.BorderIcons properties.<br>
              > What shall I do to have the form display the "?"
              button? It seems that<br>
              > setting the property to true is not enough.<br>
              <br>
            </div></div>
          </div><div class="im">
          AFAIK only MS Windows supports that.<br>
          <br>
        </div></blockquote>
        <div><br>
        </div><div class="im">
        <div>Well, I am working on Win XP.</div>
        <div>Fresh install of Lazarus 1.0 prepackaged installer + some
          extra components from the CCR.</div>
        <br>
      </div></div>
    </blockquote>
    <br>
    Tested on Vista<br>
    <br>
    It seems exlusive to the min/max buttons. If both of them are off,
    then the "?" will show<br>
    <br>
    biSystemMenu must be set, or nothing will show<br>
  </div>

<br></blockquote><div><br></div><div>I made a little test application (see attachment) to try the various combinations of border icons and border style.</div><div>After confirming that the context help icon is exclusive with the max/min ones, and all of them require the system one, I checked the reason why it is so: in Win32WSForms.pp, starting from the line 463, the handler explicitely masks that combination.</div>
<div><br></div><div>Why is it so? The reason might be that this is the way the MSDN describe the usage of the extended window styles:</div><div><a href="http://msdn.microsoft.com/en-us/library/windows/desktop/ff700543(v=vs.85).aspx">http://msdn.microsoft.com/en-us/library/windows/desktop/ff700543(v=vs.85).aspx</a></div>
<div>which by design makes the context help mutually exclusive with the max/min.</div><div><br></div><div>I tried to force it, violating that rule above and calling with all the flags, but it is probably masked inside the Win32 window manager as well.</div>
<div>I think we can't change that...</div><div><br></div><div>BUT, I discovered something strange: if you change programmatically the border icons the title bar is not update graphically.</div><div>If you disable the minimized button, it is still displayed as active, but it's actually disabled.</div>
<div>If you force a refresh (Form.Minimize; Form.Maximize) than it gets update.</div><div><br></div><div>On the other side, if you change the borer style, the window is update correctly.</div><div>Maybe the difference is that in:</div>
<div><br></div><div>      class procedure TWin32WSCustomForm.SetBorderIcons(..); </div><div><br></div><div>the function Windows.RedrawWindow(...) is called, while in</div><div><br></div><div>      class procedure TWin32WSCustomForm.SetFormBorderStyle(...);   </div>
<div><br></div><div>the function RecreateWnd(AForm) is called.</div><div>I think that also the border icons should deserve a true update.</div><div><br></div><div>R#</div></div>