dcl-messagebox Help Button

Started by Louderjohn, January 19, 2023, 06:27:02 AM

Previous topic - Next topic

Louderjohn

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

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]


owenwengerd

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.
Owen Wengerd (Outside The Box) / ManuSoft

Fred Tomke

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

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.
Owen Wengerd (Outside The Box) / ManuSoft