Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Subroutine

marshallc
Beginner
411 Views
This is probably really simple, and I'm not seeing it...
I'm working on a dialog box and have it setup with multiple radio buttons. When a radio button is clicked, the filename (represented by a textbox) is updated.
I am trying to setup the subroutine to update the filename/textbox. I have the watches for the radio buttons setup:
Code:
case (IDC_Radio_Composite)
  if (HIWORD(uParam) == BN_CLICKED) then
    call UpdateFileName (hDlg)
  endif
  SetupDlgProc = 1
	  		  				
case (IDC_Radio_DailyMSG)
  if (HIWORD(uParam) == BN_CLICKED) then
    call UpdateFileName (hDlg)
  endif
  SetupDlgProc = 1
.
.
.


And I have the main outline of the subroutine created:
Code:
SUBROUTINE UpdateFilename(hDlg)

  use ifwin
  use iflogm
  use MS3_Globals
  
  implicit none
  
  integer hDlg
  integer id
  integer callbacktype 
    
  mode_txt = 'dmsg'C

  iret = SetDlgItemText (hDlg, IDC_Edit_Filename, &
           trim(adjustl(mode_txt))//' 'C)
             
END SUBROUTINE UpdateFilename

When I compile the code, the compiler comes back and tells me that IDC_Edit_Filename needs to have a type defined. What gives? If I pass the handle for the dialog box to the subroutine, shouldn't the subroutine be able to make calls to any object on that dialog box (in this case the textbox)?
Chad
0 Kudos
1 Reply
Steven_L_Intel1
Employee
411 Views
You need to include the generated resource .fd file that defines all of the IDC_ values.
0 Kudos
Reply