| 
       
      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  |