5. Programming aspects.

     Let suppose, that you already created some interface(s) for your program(s). And now you would like to understand how to use created GUIs with your numerical blocks. Necessary steps in creation of your application will be the follows:
1. You must load your project in GUI Generator. To do this, you select "File" panel, push "Load Project From Archive" button and load necessary project.
2. You must create FORTRAN project, using your VFC GUI Generator project. Click on "Generate FORTRAN Program" button, to receive the set of necessary modules for CVF 6.x workspace creation. You'll be prompted for FORTRAN project name, and, after the accomplishing of operation, you'll see the subdirectory with name you entered in the FORTRAN PROGRAMS directory. After this action, you can leave VFC GUI Generator and start with FORTRAN compiler.
3. You must create CVF 6.x project workspace, using files generated at previous step. Actually, you'll see next files in your directory:
     resource.h
     resource.fd
     VFC_Button_Handlers.f90
     VFC_EditBox_Handlers.f90
     VFC_ListBox_Handlers.f90
     VFC_StaticControl_OnInit.f90
     VFC_User_On_Exit.f90
     VFC_User_On_Init.f90
     VFC_Window_ON_WM_COMMAND.f90
     VFC_Window_ON_WM_CREATE.f90
     VFC_Window_ON_WM_DESTROY.f90
     VFC_Window_ON_WM_MOUSEMOVE.f90
     VFC_Window_ON_WM_PAINT.f90
     MSImg32.Lib
     VFC.LIB
     <Project Name>.exe.manifest
     <Project Name>.rc
     VFC_GUI.VFC
All these files are the components of the CVF 6.x project.

5.1. Using created GUI.

     Let suppose, that you copied your project named Test created by VFC GUI Generator to other place, and, for example, current project directory looks now like C:\MyPrograms\Test\. Now you must accurately create CVF 6.x project. To do this, you need to load Developer Studio and create new project workspace Test in C:\MyPrograms\. After this, you must include next files into the project:
     VFC_Button_Handlers.f90
     VFC_EditBox_Handlers.f90
     VFC_ListBox_Handlers.f90
     VFC_StaticControl_OnInit.f90
     VFC_User_On_Exit.f90
     VFC_User_On_Init.f90
     VFC_Window_ON_WM_COMMAND.f90
     VFC_Window_ON_WM_CREATE.f90
     VFC_Window_ON_WM_DESTROY.f90
     VFC_Window_ON_WM_MOUSEMOVE.f90
     VFC_Window_ON_WM_PAINT.f90
     MSImg32.Lib
     VFC.LIB
     Test.exe.manifest
     Test.rc

Now you need to define the project properties. For this purpose, you need to call "Project"->"Settings" and define your current CVF project properties as "Multithreaded DLL" ( concrete details depend on the version of CVF compiler installed on your PC ). Now you can select "Build"->"Build Test.exe", and the template with GUI is ready for next modification(s).

5.2. Entry points for adding your own features.

     Actually, all f90-files, listed in previous chapter, are entry points for adding your own features/controls/actions. Now we consider all these files with respect to their rules in application.


First group of files/subroutines performs some "standard" operations for FORTRAN program - they open/close the files with initial data and with results. You can insert here initial data control etc.

VFC_User_On_Init.f90

This file contains the subroutine, which is called at the application start:


subroutine VFC_User_OnInit(hInstance,ireturn)
integer*4 hInstance,ireturn
!------------------------------------------------------------------
!
! Purpose : It allows user to perform some preliminary operations
!           ( open file(s) with initial data, read data etc.    )
!
! Parameters : hInstance - handle of application
!              ireturn   - error code
!                          = 0 - no error(s)
!                          = 1 - error(s) appeared
!
!------------------------------------------------------------------
   
ireturn = 0
    !------------------------------------------------
    !       Put your code below, please
    !------------------------------------------------
return
end


VFC_User_On_Exit.f90

This file contains the subroutine, which is called when application ends:
 


subroutine VFC_User_OnExit(ireturn)
integer*4 ireturn
!------------------------------------------------------------------
!
! Purpose : It allows user to perform some operations on exit
!           ( close file(s) with data etc. )
!
! Parameters : ireturn   - error code
!                          = 0 - no error(s)
!                          = 1 - error(s) appeared
!
!------------------------------------------------------------------
   
ireturn = 0
    !------------------------------------------------
    !       Put your code below, please
    !------------------------------------------------
return
end


WARNING. You CAN'T use unit numbers 1 and 11 in OPEN operation for your files. These unit numbers are used inside the modules from the libraries.


Second group of files/subroutines provides you the access to basic window's events. You could place necessary for you handlers into these files.
 
VFC_Window_ON_WM_CREATE.f90

This file contains the subroutine template, which can be used for your own actions at the moment of window creation ( WM_CREATE message ). It's the moment, when you can create other controls ( which are not realized in VFC GUI Generator yet ):


 subroutine VFC_Window_ON_WM_CREATE(WndNumber,hWnd)
 
integer*4 WndNumber,hWnd
 !-------------------------------------------------------------------
 ! Purpose - user's entry point on window creation event
 ! Parameters:
 !             WndNumber - current window number
 !             hWnd      - current window handle
 !-------------------------------------------------------------------
   
select case(WndNumber)
       
case(1)
   
end select
 return
 end



VFC_Window_ON_WM_COMMAND.f90

This file contains the subroutine template, which can be used for your own actions at basic window event WM_COMMAND. This is the place, where you handle messages from the controls created in VFC_Window_ON_WM_CREATE subroutine.


 subroutine VFC_Window_ON_WM_COMMAND(WndNumber,hWnd,wparam,lparam)
 
integer*4 WndNumber,hWnd,lparam,wparam
 !-------------------------------------------------------------------
 ! Purpose - user's entry point on WM_COMMAND event
 ! Parameters:
 !             WndNumber     - current window number
 !             hWnd          - current window handle
 !             lparam,wparam - parameters came from window procedure
 !-------------------------------------------------------------------
   
select case(WndNumber)
       
case(1)
   
end select
 return
 end



VFC_Window_ON_WM_PAINT.f90

This file contains the subroutine template for your ideas in additional drawing operations in window device context.


 subroutine VFC_Window_ON_WM_PAINT(WndNumber,hWnd,hDC)
 
integer*4 WndNumber,hWnd,hDC
 !-------------------------------------------------------------------
 ! Purpose - user's entry point on WM_PAINT event
 ! Parameters:
 !             WndNumber     - current window number
 !             hWnd          - current window handle
 !             hDC           - handle to context device
 !-------------------------------------------------------------------
   
select case(WndNumber)
       
case(1)
   
end select
 return
 end

VFC_Window_ON_WM_MOUSEMOVE.f90

This file contains the subroutine template for your ideas in mouse position control.


 subroutine VFC_Window_ON_WM_MOUSEMOVE(WndNumber,hWnd,wparam,lparam)
 
integer*4 WndNumber,hWnd,lparam,wparam
 !-------------------------------------------------------------------
 ! Purpose - user's entry point on WM_MOUSEMOVE event
 ! Parameters:
 !             WndNumber     - current window number
 !             hWnd          - current window handle
 !             lparam,wparam - parameters came from window procedure
 !-------------------------------------------------------------------
   
select case(WndNumber)
       
case(1)
   
end select
 return
 end


VFC_Window_ON_WM_DESTROY.f90

This file contains the subroutine template, which can be used, for example, to free the resources allocated maybe in WM_CREATE handler.
 


 subroutine VFC_Window_ON_WM_DESTROY(WndNumber,hWnd)
 
integer*4 WndNumber,hWnd
 !-------------------------------------------------------------------
 ! Purpose - user's entry point on WM_DESTROY event
 ! Parameters:
 !             WndNumber     - current window number
 !             hWnd          - current window handle
 !-------------------------------------------------------------------
   
select case(WndNumber)
       
case(1)
   
end select
 return
 end


 

Third group of files/subroutines is intended for work with the controls created with VFC GUI Generator. Actually, they're entry points for realization of your numerical blocks in final application. These routines must simplify user access to Win32 programming technology, like it looks, for example, in Microsoft Visual Basic, or in VBA. You can see, that name of currently supported by Generator control presents in respective handler for this control.

VFC_Button_Handlers.f90

It's clear, that this file contains the necessary button handlers templates, which allow to to insert your pieces for code ( numerical or other ). Let consider the sample of buttons handlers from <<Default project>> included into distributive package. There are two buttons in this project. First button "Start" is intended for starting of some numerical calculations, and second one - "Exit" - to leave/close the application. Here you can see two subroutines templates. First - VFC_Button_OnInit - allows you to perform some initialization operations with buttons, for example, you could change their captions, if necessary, of course. Second subroutine - ButtonDefinedAction - allows to call your own numerical subroutines, when user click on respective button.


 subroutine VFC_Button_OnInit(WndNumber,ButtonNumber,hWnd,hWndCtrl)
 integer*4 WndNumber,ButtonNumber,hWnd,hWndCtrl
 !-------------------------------------------------------------------
 ! Purpose - initialization handler for created button(s)
 ! Parameters:
 !             WndNumber     - current window number
 !             ButtonNumber  - current button number
 !             hWnd          - current window handle
 !             hWndCtrl      - current button handle
 !-------------------------------------------------------------------
    select case(WndNumber)
        case(1)
            select case(ButtonNumber)
                case(1)
                !--------------------------------------------------------
                !  Put here your init code (if necessary) for button #1
                !  Button caption:
                !  <<Start>>
                !  Button description:
                !  == Default window button. Purpose - start calculations...
                !  == 
                !  == 
                !
                !
                !  You can use the next function for control management :
                !       call SendMessageToVFCButton(1,1,message,wparam,lparam,iret)
                !
                !--------------------------------------------------------
                case(2)
                !--------------------------------------------------------
                !  Put here your init code (if necessary) for button #2
                !  Button caption:
                !  <<Exit>>
                !  Button description:
                !  == Push this button to exit application...
                !  == 
                !  == 
                !
                !  Remember, please, that this button will close
                !  application.
                !
                !  You can use the next function for control management :
                !       call SendMessageToVFCButton(1,2,message,wparam,lparam,iret)
                !
                !--------------------------------------------------------
            end select
    end select
 return
 end
 !-------------------------------------------------------------------------------------
 subroutine ButtonDefinedAction(WndNumber,ButtonNumber,ButtonHandle,wparam,lparam)
 integer*4 WndNumber,ButtonNumber,ButtonHandle,lparam,wparam
 !-------------------------------------------------------------------
 ! Purpose - handler for created button(s)
 ! Parameters:
 !             WndNumber     - current window number
 !             ButtonNumber  - current button number
 !             ButtonHandle  - current button handle
 !             lparam,wparam - parameters came from window procedure
 !-------------------------------------------------------------------
    select case(WndNumber)
        case(1)
            select case(ButtonNumber)
                case(1)
                !--------------------------------------------------------
                !  Put here your handler/subroutine for button #1
                !  Button caption:
                !  <<Start>>
                !  Button description:
                !  == Default window button. Purpose - start calculations...
                !  == 
                !  == 
                !
                !
                !--------------------------------------------------------
                case(2)
                !--------------------------------------------------------
                !  Put here your handler/subroutine for button #2
                !  Button caption:
                !  <<Exit>>
                !  Button description:
                !  == Push this button to exit application...
                !  == 
                !  == 
                !
                !  Remember, please, that this button will close
                !  application. But you can't do this manualy
                !
                !--------------------------------------------------------
            end select
    end select
 return
 end

VFC_StaticControl_OnInit.f90

It's clear, that this file contains the subroutine template, which allows you to modify static control caption ( or some other parameters ). Because static control is "passive" GUI element ( it is used for displaying data/pictures only ), then we have only one handler template for this control here. If we look at this driver from <<Default project>> ( where we have no static controls used in GUI ), then we found here trivial/dummy routine, which does not require any modifications inside:
 


 subroutine VFC_StaticControl_OnInit(WndNumber,StaticNumber,hWnd,hWndCtrl)
 
integer*4 WndNumber,StaticNumber,hWnd,hWndCtrl
 !-------------------------------------------------------------------
 ! Purpose - set static control caption at control creation
 ! Parameters:
 !             WndNumber    - current window number
 !             StaticNumber - current static control number
 !             hWnd         - parent window handle
 !             hWndCtrl     - control handle
 !-------------------------------------------------------------------
      
 !-------------------------------------------------------------------
 ! You have no static controls in your program.
 ! This subroutine must stay as dummy driver, and
 ! you need no to insert something else here.
 !-------------------------------------------------------------------
      
 
return
 end

But if we select this handler from, for example, <<Trivial Output>> project, then we see more complex listing. This project has four static controls for displaying the input and output data:

 subroutine VFC_StaticControl_OnInit(WndNumber,StaticNumber,hWnd,hWndCtrl)
 
integer*4 WndNumber,StaticNumber,hWnd,hWndCtrl
 !-------------------------------------------------------------------
 ! Purpose - set static control caption at control creation
 ! Parameters:
 !             WndNumber    - current window number
 !             StaticNumber - current static control number
 !             hWnd         - parent window handle
 !             hWndCtrl     - control handle
 !-------------------------------------------------------------------
   
select case(WndNumber)
       
case(1)
           
select case(StaticNumber)
               
case(1)
                !--------------------------------------------------------
                !  Set control caption for static control #1
                !  Static control initial caption:
                !  <<1.234567890>>
                !  Static control description:
                !  == Value of parameter A...
                !  ==
                !  ==
                !
                !  You can use the next functions for control management :
                !       call SetVFCStaticCaption(1,1,text_string)
                !       call ClearVFCStaticCaption(1,1)
                !       call WriteRealToVFCStaticAsFormatted(1,1,value,fmt_string)
                !       call WriteRealToVFCStaticUnFormatted(1,1,value)
                !       call WriteDRealToVFCStaticAsFormatted(1,1,value,fmt_string)
                !       call WriteDRealToVFCStaticUnFormatted(1,1,value)
                !       call WriteIntegerToVFCStaticAsFormatted(1,1,value,fmt_string)
                !       call WriteIntegerToVFCStaticUnFormatted(1,1,value)
                !       call SendMessageToVFCStatic(1,1,message,wparam,lparam,iret)
                !
                !--------------------------------------------------------
               
case(2)
                !--------------------------------------------------------
                !  Set control caption for static control #2
                !  Static control initial caption:
                !  <<1.234567890>>
                !  Static control description:
                !  == Value of parameter B...
                !  ==
                !  ==
                !
                !  You can use the next functions for control management :
                !       call SetVFCStaticCaption(1,2,text_string)
                !       call ClearVFCStaticCaption(1,2)
                !       call WriteRealToVFCStaticAsFormatted(1,2,value,fmt_string)
                !       call WriteRealToVFCStaticUnFormatted(1,2,value)
                !       call WriteDRealToVFCStaticAsFormatted(1,2,value,fmt_string)
                !       call WriteDRealToVFCStaticUnFormatted(1,2,value)
                !       call WriteIntegerToVFCStaticAsFormatted(1,2,value,fmt_string)
                !       call WriteIntegerToVFCStaticUnFormatted(1,2,value)
                !       call SendMessageToVFCStatic(1,2,message,wparam,lparam,iret)
                !
                !--------------------------------------------------------
               
case(3)
                !--------------------------------------------------------
                !  Set control caption for static control #3
                !  Static control initial caption:
                !  <<1.234567890>>
                !  Static control description:
                !  == Value of A*sin(B)
                !  ==
                !  ==
                !
                !  You can use the next functions for control management :
                !       call SetVFCStaticCaption(1,3,text_string)
                !       call ClearVFCStaticCaption(1,3)
                !       call WriteRealToVFCStaticAsFormatted(1,3,value,fmt_string)
                !       call WriteRealToVFCStaticUnFormatted(1,3,value)
                !       call WriteDRealToVFCStaticAsFormatted(1,3,value,fmt_string)
                !       call WriteDRealToVFCStaticUnFormatted(1,3,value)
                !       call WriteIntegerToVFCStaticAsFormatted(1,3,value,fmt_string)
                !       call WriteIntegerToVFCStaticUnFormatted(1,3,value)
                !       call SendMessageToVFCStatic(1,3,message,wparam,lparam,iret)
                !
                !--------------------------------------------------------
               
case(4)
                !--------------------------------------------------------
                !  Set control caption for static control #4
                !  Static control initial caption:
                !  <<1.234567890>>
                !  Static control description:
                !  == Value of A*cos(B)
                !  ==
                !  ==
                !
                !  You can use the next functions for control management :
                !       call SetVFCStaticCaption(1,4,text_string)
                !       call ClearVFCStaticCaption(1,4)
                !       call WriteRealToVFCStaticAsFormatted(1,4,value,fmt_string)
                !       call WriteRealToVFCStaticUnFormatted(1,4,value)
                !       call WriteDRealToVFCStaticAsFormatted(1,4,value,fmt_string)
                !       call WriteDRealToVFCStaticUnFormatted(1,4,value)
                !       call WriteIntegerToVFCStaticAsFormatted(1,4,value,fmt_string)
                !       call WriteIntegerToVFCStaticUnFormatted(1,4,value)
                !       call SendMessageToVFCStatic(1,4,message,wparam,lparam,iret)
                !
                !--------------------------------------------------------
           
end select
    end select
 return
 end


VFC_EditBox_Handlers.f90
 

This file contains the handlers for work with edit box controls. These handlers can be empty for the GUI without edit boxes. For example, you can see below these handlers from <<Default project>>:
 


 subroutine VFC_EditBox_OnInit(WndNumber,EditBoxNumber,hWnd,hWndCtrl)
 
integer*4 WndNumber,EditBoxNumber,hWnd,hWndCtrl
 !-------------------------------------------------------------------
 ! Purpose - set edit box caption at control creation
 ! Parameters:
 !             WndNumber     - current window number
 !             EditBoxNumber - current edit box number
 !             hWnd          - parent window handle
 !             hWndCtrl      - control handle
 !-------------------------------------------------------------------
      
 !-------------------------------------------------------------------
 ! You have no edit boxes in your program.
 ! This subroutine must stay as dummy driver, and
 ! you need no to insert something else here.
 !-------------------------------------------------------------------
      
 
return
 end
 !---------------------------------------------------------------------------------------
 
subroutine EditBoxDefinedAction(WndNumber,EditBoxNumber,EditBoxHandle,wparam,lparam)
 
integer*4 WndNumber,EditBoxNumber,EditBoxHandle,lparam,wparam
 !-------------------------------------------------------------------
 ! Purpose - handler for created edit box
 ! Parameters:
 !             WndNumber     - current window number
 !             EditBoxNumber - current edit box number
 !             EditBoxHandle - current edit box handle
 !             lparam,wparam - parameters came from window procedure
 !-------------------------------------------------------------------
      
 !-------------------------------------------------------------------
 ! You have no edit boxes in your program.
 ! This subroutine must stay as dummy driver, and
 ! you need no to insert something else here.
 !-------------------------------------------------------------------
      
 
return
 end


But if we select these handlers from <<Input_Output>> project, then we can see that these handlers are not dummy routines and can be used for edit boxes management/using in our GUI:
 


 subroutine VFC_EditBox_OnInit(WndNumber,EditBoxNumber,hWnd,hWndCtrl)
 
integer*4 WndNumber,EditBoxNumber,hWnd,hWndCtrl
 !-------------------------------------------------------------------
 ! Purpose - set edit box caption at control creation
 ! Parameters:
 !             WndNumber     - current window number
 !             EditBoxNumber - current edit box number
 !             hWnd          - parent window handle
 !             hWndCtrl      - control handle
 !-------------------------------------------------------------------
   
select case(WndNumber)
       
case(1)
           
select case(EditBoxNumber)
               
case(1)
                !--------------------------------------------------------
                !  Set control caption for edit box #1
                !  Edit box initial caption:
                !  <<1.234567890>>
                !  Edit box description:
                !  == Input field for the value of parameter A...
                !  ==
                !  ==
                !
                !  You can use the next functions for control management :
                !       call SetVFCEditBoxCaption(1,1,text_string)
                !       call ClearVFCEditBoxCaption(1,1)
                !       call WriteRealToVFCEditBoxAsFormatted(1,1,value,fmt_string)
                !       call WriteRealToVFCEditBoxUnFormatted(1,1,value)
                !       call WriteDRealToVFCEditBoxAsFormatted(1,1,value,fmt_string)
                !       call WriteDRealToVFCEditBoxUnFormatted(1,1,value)
                !       call WriteIntegerToVFCEditBoxAsFormatted(1,1,value,fmt_string)
                !       call WriteIntegerToVFCEditBoxUnFormatted(1,1,value)
                !       call SendMessageToVFCEditBox(1,1,message,wparam,lparam,iret)
                !
                !--------------------------------------------------------
               
case(2)
                !--------------------------------------------------------
                !  Set control caption for edit box #2
                !  Edit box initial caption:
                !  <<1.234567890>>
                !  Edit box description:
                !  == Input field for the value of parameter B...
                !  ==
                !  ==
                !
                !  You can use the next functions for control management :
                !       call SetVFCEditBoxCaption(1,2,text_string)
                !       call ClearVFCEditBoxCaption(1,2)
                !       call WriteRealToVFCEditBoxAsFormatted(1,2,value,fmt_string)
                !       call WriteRealToVFCEditBoxUnFormatted(1,2,value)
                !       call WriteDRealToVFCEditBoxAsFormatted(1,2,value,fmt_string)
                !       call WriteDRealToVFCEditBoxUnFormatted(1,2,value)
                !       call WriteIntegerToVFCEditBoxAsFormatted(1,2,value,fmt_string)
                !       call WriteIntegerToVFCEditBoxUnFormatted(1,2,value)
                !       call SendMessageToVFCEditBox(1,2,message,wparam,lparam,iret)
                !
                !--------------------------------------------------------
           
end select
    end select
 return
 end
 !---------------------------------------------------------------------------------------
 
subroutine EditBoxDefinedAction(WndNumber,EditBoxNumber,EditBoxHandle,wparam,lparam)
 
integer*4 WndNumber,EditBoxNumber,EditBoxHandle,lparam,wparam
 !-------------------------------------------------------------------
 ! Purpose - handler for created edit box
 ! Parameters:
 !             WndNumber     - current window number
 !             EditBoxNumber - current edit box number
 !             EditBoxHandle - current edit box handle
 !             lparam,wparam - parameters came from window procedure
 !-------------------------------------------------------------------
   
select case(WndNumber)
       
case(1)
           
select case(EditBoxNumber)
               
case(1)
                !--------------------------------------------------------
                !  Put here the handler for edit box #1
                !  Edit box initial caption:
                !  <<1.234567890>>
                !  Edit box description:
                !  == Input field for the value of parameter A...
                !  ==
                !  ==
                !
                !  You can use the next functions for control management :
                !       call SetVFCEditBoxCaption(1,1,text_string)
                !       call ClearVFCEditBoxCaption(1,1)
                !       call WriteRealToVFCEditBoxAsFormatted(1,1,value,fmt_string)
                !       call WriteRealToVFCEditBoxUnFormatted(1,1,value)
                !       call WriteDRealToVFCEditBoxAsFormatted(1,1,value,fmt_string)
                !       call WriteDRealToVFCEditBoxUnFormatted(1,1,value)
                !       call WriteIntegerToVFCEditBoxAsFormatted(1,1,value,fmt_string)
                !       call WriteIntegerToVFCEditBoxUnFormatted(1,1,value)
                !       call ReadDRealFromVFCEditBox(1,1,value,ierror)
                !       call ReadRealFromVFCEditBox(1,1,value,ierror)
                !       call ReadIntegerFromVFCEditBox(1,1,value,ierror)
                !       call SendMessageToVFCEditBox(1,1,message,wparam,lparam,iret)
                !
                !--------------------------------------------------------
               
case(2)
                !--------------------------------------------------------
                !  Put here the handler for edit box #2
                !  Edit box initial caption:
                !  <<1.234567890>>
                !  Edit box description:
                !  == Input field for the value of parameter B...
                !  ==
                !  ==
                !
                !  You can use the next functions for control management :
                !       call SetVFCEditBoxCaption(1,2,text_string)
                !       call ClearVFCEditBoxCaption(1,2)
                !       call WriteRealToVFCEditBoxAsFormatted(1,2,value,fmt_string)
                !       call WriteRealToVFCEditBoxUnFormatted(1,2,value)
                !       call WriteDRealToVFCEditBoxAsFormatted(1,2,value,fmt_string)
                !       call WriteDRealToVFCEditBoxUnFormatted(1,2,value)
                !       call WriteIntegerToVFCEditBoxAsFormatted(1,2,value,fmt_string)
                !       call WriteIntegerToVFCEditBoxUnFormatted(1,2,value)
                !       call ReadDRealFromVFCEditBox(1,2,value,ierror)
                !       call ReadRealFromVFCEditBox(1,2,value,ierror)
                !       call ReadIntegerFromVFCEditBox(1,2,value,ierror)
                !       call SendMessageToVFCEditBox(1,2,message,wparam,lparam,iret)
                !
                !--------------------------------------------------------
           
end select
    end select
 return
 end


VFC_ListBox_Handlers.f90

 This file contains all necessary handlers templates for work with listbox controls, if they present in created GUI, of course. For projects without this control, these handlers look like empty/dummy routines ( see the sample from <<Default project>> below ):
 


 subroutine VFC_ListBox_PreCreate(WndNumber,ListBoxNumber)
 integer*4 WndNumber,ListBoxNumber
 !-------------------------------------------------------------------
 ! Purpose - modify, if necessary the path for listbox with directory
 !           structure inside.
 ! Parameters:
 !             WndNumber     - current window number
 !             ListBoxNumber - current listbox number
 !-------------------------------------------------------------------
       
 !-------------------------------------------------------------------
 ! You have no listboxes in your program.
 ! This subroutine must stay as dummy driver, and
 ! you need no to insert something else here.
 !-------------------------------------------------------------------
       
 return
 end
 !-----------------------------------------------------------------------------
 subroutine VFC_ListBox_OnInit(WndNumber,ListBoxNumber,hWnd,hWndCtrl)
 integer*4 WndNumber,ListBoxNumber,hWnd,hWndCtrl
 !-------------------------------------------------------------------
 ! Purpose - set listbox parameters (fill) at control creation
 ! Parameters:
 !             WndNumber     - current window number
 !             ListBoxNumber - current listbox number
 !             hWnd          - parent window handle
 !             hWndCtrl      - control handle
 !-------------------------------------------------------------------
       
 !-------------------------------------------------------------------
 ! You have no listboxes in your program.
 ! This subroutine must stay as dummy driver, and
 ! you need no to insert something else here.
 !-------------------------------------------------------------------
       
 return
 end
 !-----------------------------------------------------------------------------
 subroutine ListBoxDefinedAction(WndNumber,ListBoxNumber,ListBoxHandle,wparam,lparam)
 integer*4 WndNumber,ListBoxNumber,ListBoxHandle,lparam,wparam
 !-------------------------------------------------------------------
 ! Purpose - handler for created listbox
 ! Parameters:
 !             WndNumber     - current window number
 !             ListBoxNumber - current listbox number
 !             ListBoxHandle - current listbox handle
 !             lparam,wparam - parameters came from window procedure
 !-------------------------------------------------------------------
       
 !-------------------------------------------------------------------
 ! You have no listboxes in your program.
 ! This subroutine must stay as dummy driver, and
 ! you need no to insert something else here.
 !-------------------------------------------------------------------
       
 return
 end

If you select these handlers from <<Input_Output_Select>> project, then you could see their more complicated structure. And only one handler for listbox with directory listing inside remains empty/dummy, because I use standard listbox for the list of some items/variants:
 


 subroutine VFC_ListBox_PreCreate(WndNumber,ListBoxNumber)
 
integer*4 WndNumber,ListBoxNumber
 !-------------------------------------------------------------------
 ! Purpose - modify, if necessary the path for listbox with directory
 !           structure inside.
 ! Parameters:
 !             WndNumber     - current window number
 !             ListBoxNumber - current listbox number
 !-------------------------------------------------------------------
      
 !-------------------------------------------------------------------
 ! You have no listboxes with directory stucture in your program.
 ! This subroutine must stay as dummy driver, and
 ! you need no to insert something else here.
 !-------------------------------------------------------------------
      
 
return
 end
 !-----------------------------------------------------------------------------
 
subroutine VFC_ListBox_OnInit(WndNumber,ListBoxNumber,hWnd,hWndCtrl)
 
integer*4 WndNumber,ListBoxNumber,hWnd,hWndCtrl
 !-------------------------------------------------------------------
 ! Purpose - set listbox parameters (fill) at control creation
 ! Parameters:
 !             WndNumber     - current window number
 !             ListBoxNumber - current listbox number
 !             hWnd          - parent window handle
 !             hWndCtrl      - control handle
 !-------------------------------------------------------------------
   
select case(WndNumber)
       
case(1)
           
select case(ListBoxNumber)
               
case(1)
                !--------------------------------------------------------
                !
                !  Listbox description:
                !  == List of available variants...
                !  ==
                !  ==
                !
                !  You can use the next function for control management :
                !       call SendMessageToVFCListBox(1,1,message,wparam,lparam,iret)
                !
                !--------------------------------------------------------
           
end select
    end select
 return
 end
 !-----------------------------------------------------------------------------
 
subroutine ListBoxDefinedAction(WndNumber,ListBoxNumber,ListBoxHandle,wparam,lparam)
 
integer*4 WndNumber,ListBoxNumber,ListBoxHandle,lparam,wparam
 !-------------------------------------------------------------------
 ! Purpose - handler for created listbox
 ! Parameters:
 !             WndNumber     - current window number
 !             ListBoxNumber - current listbox number
 !             ListBoxHandle - current listbox handle
 !             lparam,wparam - parameters came from window procedure
 !-------------------------------------------------------------------
   
select case(WndNumber)
       
case(1)
           
select case(ListBoxNumber)
               
case(1)
                !--------------------------------------------------------
                !
                !  Listbox description:
                !  == List of available variants...
                !  ==
                !  ==
                !
                !  You can use the next function for control management :
                !       call SendMessageToVFCListBox(1,1,message,wparam,lparam,iret)
                !
                !--------------------------------------------------------
           
end select
    end select
 return
 end