IDHELP Dead

Started by Robert, October 17, 2022, 05:21:45 PM

Previous topic - Next topic

MrBcx

It looks doubtful.

I tried adding this to catch the WM_HELP message but no bananas:



   PeekMessage(&msg, GetConsoleWindow(), 0, 0, PM_NOREMOVE)

    IF msg.message = WM_HELP THEN
        MSGBOX "You pressed the Help button.", "BCX Demo", MB_OK
    END IF

LOOP


Robert

Ostensibly, in the past, the following code used to work.

DIM i
DO
  i = MSGBOX("This is a message", "BCX Demo", _
  MB_YESNOCANCEL OR MB_ICONINFORMATION OR MB_HELP OR MB_DEFBUTTON4)

  SELECT CASE i
  CASE IDCANCEL
    MSGBOX "You pressed the Cancel button.", "BCX Demo", MB_OK
    END
  CASE IDYES
    MSGBOX "You pressed the Yes button.", "BCX Demo", MB_OK
  CASE IDNO
    MSGBOX "You pressed the No button.", "BCX Demo", MB_OK
  CASE IDHELP
    MSGBOX "You pressed the Help button.", "BCX Demo", MB_OK
  END SELECT

LOOP


IDHELP has since been removed from the Microsoft lexicon and in a MessageBox

QuoteWhen the user clicks the Help button or presses F1, the system sends a WM_HELP message to the owner.

Any clue how to process the WM_HELP message in a command line, non-GUI, program ?

While Raymond Chen, uncovers the mysterious fourth message box button in his post at

https://devblogs.microsoft.com/oldnewthing/20081219-00/?p=19773

he does not provide a mechanism for processing WM_HELP because, I assume, at that time, 2008, IDHELP was not dead.