Application Help does not always work

Application Help does not always work

I have a Window PI project, when a dialog box is displayed I can press F1 and the appropriate help is displayed.
This works in most dialogs, but in some cases it does not work.
When it works I get a message of 83 - (#0053) and I call my Help routine, but in other dialogs I am not getting the message 83 when I press F1.

Any ideas why this is going wrong?

Thanks,

David

     
     
     
SUBROUTINE My Program     
use dfwin     
include 'resource.fd'     
     
interface     
integer*4 function ContourProc(hand, message, wPAram, lParam)      
!MS$  ATTRIBUTES STDCALL, ALIAS : '_MyProc@16' :: MyProc     
integer hwnd, message, wParam, lParam     
end function MyProc     
end interface     
     
integer*4	iret     
iret = DialogBox(hInst,MAKEINTRESOURCE(IDD_MYDLG),hWndMain,LOC(MyProc))      
end subroutine MyProgram     
     
integer*4 function MyProc(hwnd, message, wParam, lParam)      
!MS$ATTRIBUTES STDCALL, ALIAS : '_MyProc@16' :: MyProc     
use dfwin     
include 'resource.fd'     
integer*4	hwnd, message, wParam, lParam     
select case (message)     
case (#0053)			! WM_HELP     
call help       ! displays the correct help topic     
		     
case (WM_SHOWWINDOW)     
! other code     
case (WM_COMMAND)     
! other code     
end select     
end function MyProc     
2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I have worked out why myself.

Its because I didn't have - case (WM_INITDIALOG) - I had deleted it as it didn't appear to do anything!

Leave a Comment

Please sign in to add a comment. Not a member? Join today