Software Archive
Read-only legacy content
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
17060 Discussions

Application Help does not always work

davidgraham
Beginner
451 Views
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     
0 Kudos
1 Reply
davidgraham
Beginner
451 Views
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!
0 Kudos
Reply