Quantcast
Channel: Intel® Fortran Compiler
Viewing all articles
Browse latest Browse all 3270

Up-DOWN SPIN CONTROL Callback

$
0
0

I am looking for any code fragment that shows the proper use for a callback routine for a spin control. I've read https://software.intel.com/en-us/node/535415 but it does not help. My shot, which doesn' work, is:

Subroutine OnSpinEdit (dlg, control_name, callback_type)
use ifwin
use user32
use gdi32
use kernel32
use ifqwin
use PearsonGlobals

Implicit None

TYPE (dialog), intent(in):: dlg
INTEGER,Intent(IN):: control_name
INTEGER,Intent(in):: callback_type

integer::         i
character(80)::   myBuffer
Integer(BOOL):: bret
integer(UINT)::   num, iostat

! IDC_PCTYPE is my edit buddy & IDC_MYSPIN is my up/down spin control

   i = DlgGet(dlg, control_name, myBuffer, DLG_STATE)
   myBuffer = Trim(AdjustL(myBuffer))
   read(myBuffer,*,iostat=iostat) num
   if (iostat /= 0) Then
      i = DlgSetInt(dlg, control_name, 0)
      mType = 0
   else
      num = max(0, num)
      num = min (num, 8)
      myBuffer = '  '
      write(myBuffer,'(i1)') num
      myBuffer = Trim(AdjustL(myBuffer))
      mType = num
      i = DlgSet(dlg, IDC_PCTYPE, myBuffer, 1)
      bret = DlgSetInt(dlg, IDC_MYSPIN,num,DLG_POSITION)
   end if
   return

End Subroutine OnSpinEdit

Brooks V


Viewing all articles
Browse latest Browse all 3270

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>