Author Topic: dcl-messagebox Help Button  (Read 364 times)

Louderjohn

  • Member
  • *
  • Posts: 2
dcl-messagebox Help Button
« on: January 19, 2023, 06:27:02 AM »
I tried the {ShowHelpButton [as Boolean]} option in dcl-messagebox. When I click on the Help button nothing happens, which I expected. How do you define the actual help file for the Help button?

Fred Tomke

  • OpenDCL Technician
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2101
Re: dcl-messagebox Help Button
« Reply #1 on: January 19, 2023, 06:39:41 AM »
Hello, I really have no experience with the help button in messageboxes. I'm also afraid that the messagebox does not close by clicking on the button, to get the return value of dcl-messagebox. In some cases AutoCAD can open a chm-file by clicking F1 when just a command is runnig (context-sensitive-help) but you have to define a help function right before by using setfunhelp (http://docs.autodesk.com/ACD/2013/ENU/index.html?url=files/GUID-61B2326A-8DE4-46C4-B9F9-22B8D163A761.htm,topicNumber=d30e627653). But in the end I realy have no idea, sorry.
With regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

Louderjohn

  • Member
  • *
  • Posts: 2
Re: dcl-messagebox Help Button
« Reply #2 on: January 19, 2023, 06:54:22 AM »
Thanks Fred.

owenwengerd

  • Administrator
  • Hero Member
  • *****
  • Posts: 3094
    • Outside The Box
Re: dcl-messagebox Help Button
« Reply #3 on: January 19, 2023, 10:05:46 AM »
Without looking at the code, I guess pressing [Help] causes the dialog to close and (dcl-MessageBox) returns an integer value for the Help button that is just missed in the OpenDCL reference.

Fred Tomke

  • OpenDCL Technician
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2101
Re: dcl-messagebox Help Button
« Reply #4 on: January 19, 2023, 07:36:29 PM »
Hello, Owen, unfotunately the form won't be closed by clicking help button.

(dcl-messagebox "Msg" "Title" 3 3 T)

Regards, Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

owenwengerd

  • Administrator
  • Hero Member
  • *****
  • Posts: 3094
    • Outside The Box
Re: dcl-messagebox Help Button
« Reply #5 on: January 20, 2023, 04:18:07 PM »
According to MSDN the button sends a WM_HELP message to the parent window. Presumably the intent was to trigger the parent form's Help event handler. The parent form would be the form that is active before the message box is displayed.

I'm not sure it works, though. I see that there is no direct handler for WM_HELP for any of the form types, so it depends on how the MFC dialog code translates an unhandled WM_HELP message.