I have a VCL form that is set for bsDialog
with biHelp
enabled ("?" icon in application bar).
I am following this example: http://delphi.about.com/od/adptips2006/qt/custom_bihelp.htm
However I cannot get the WMNCLBUTTONDOWN
Windows Message to appear when I click the "?" button. It only seems to fire when I click on the title bar (like I was going to drag the window around.
Code:
procedure TMainFrm.WMNCLBUTTONDOWN(var Msg: TWMNCLButtonDown);
begin
ShowMessage('WMNCLBUTTONDOWN Pre-Help') ;
if Msg.HitTest = HTHELP then
Msg.Result := 0 // "eat" the message
else
inherited;
end;
procedure TMainFrm.WMNCLBUTTONUP(var Msg: TWMNCLButtonUp);
begin
if Msg.HitTest = HTHELP then
begin
Msg.Result := 0;
ShowMessage('Need help?') ;
end
else
inherited;
end;
Again, I see the "Pre-Help" message when I click on the title bar, but not when I click on the "?" button. Why is this? I'm trying to show a separate form when that button is clicked.