In Delphi XE7, I need to use the Help button in a MessageBox. MSDN states:
MB_HELP 0x00004000L Adds a Help button to the message box. When the user clicks the Help button or presses F1, the system sends a WM_HELP message to the owner.
However, when I click the Help button in the MessageBox, no WM_HELP message seems to be sent to the application:
procedure TForm1.ApplicationEvents1Message(var Msg: tagMSG; var Handled: Boolean);
begin
if Msg.message = WM_HELP then
CodeSite.Send('ApplicationEvents1Message WM_HELP');
end;
procedure TForm1.btnShowMessageBoxClick(Sender: TObject);
begin
MessageBox(Self.Handle, 'Let''s test the Help button.', 'Test', MB_ICONINFORMATION or MB_OK or MB_HELP);
end;
So how can I get the MessageBox Help button click and how can I detect which MessageBox did it come from?