home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / zfamily.zip / zfamily / ZISFUNCS / SAMPLE / TSTNOTAT.INC < prev    next >
Text File  |  1993-09-01  |  3KB  |  76 lines

  1. /*
  2. ** /----------------------------------------------------------------------\
  3. ** |             IBM Z Family Reusable Libraries/2 (5641-504)             |
  4. ** |----------------------------------------------------------------------|
  5. ** | (C) Copyright International Business Machines Corporation 1993, 1994 |
  6. ** |----------------------------------------------------------------------|
  7. ** |                       DISCLAIMER OF WARRANTIES                       |
  8. ** |                       ------------------------                       |
  9. ** | The following code is sample code created by IBM Corporation.        |
  10. ** | Such a code is provided to you solely for the purpose of assisting   |
  11. ** | you in the development of your applications. The code is provided    |
  12. ** | "AS IS", without warranty of any kind.  IBM shall not be liable for  |
  13. ** | any damages arising out of your use of the following code, even if   |
  14. ** | they have been advised of the possibility of such damages.           |                                                                         *
  15. ** \----------------------------------------------------------------------/
  16. **
  17. **  Header  : TSTTYPE.INC
  18. **  Author  : Alessandro Cavallini (CAVALLI at ROMEPPC)
  19. **            Pino Venturella (VENTUREL at ROMEPPC)
  20. **  Created : 06 Jul 1992
  21. **  Updated : 31 Aug 1993
  22. **  Version : 3.12
  23. **  Content : Called by TSTFUNMsgProc in WM_CONTROL and TSTFUNTYPDDL case
  24. **            statement. Display the different notation in the corresponding
  25. **            list box
  26. **
  27. */
  28. {
  29.   GLBL   gbl ;
  30.   FIELD  typfld ;         // Variable for type field
  31.   FIELD  ntnfld ;         // Variable for notation field
  32.   FIELD  smpfld ;         // Variable for sample field
  33.   char   szWorkBuf[33] ;
  34.   USHORT funcID ;
  35.  
  36.   Tstfun = (TSTFUNStruct *)WinQueryWindowULong(hWndClient, OFFSET_TSTFUN) ;
  37.  
  38.  /*
  39.  **  Reset radio button value
  40.  */
  41.   cwCheckDlgItem(hWndDlg, TSTFUNFALRDB, FALSE) ;
  42.   cwCheckDlgItem(hWndDlg, TSTFUNTRURDB, FALSE) ;
  43.  
  44.  /*
  45.  **  Get TYPE and NOTATION values
  46.  */
  47.   WinQueryDlgItemText(hWndDlg, TSTFUNTYPDDL, sizeof(szWorkBuf), szWorkBuf) ;
  48.   strcpy(Tstfun->TstFunType, szWorkBuf) ;
  49.  
  50.   WinQueryDlgItemText(hWndDlg, TSTFUNNOTDDL, sizeof(szWorkBuf), szWorkBuf) ;
  51.   strcpy(Tstfun->TstFunNotation, szWorkBuf) ;
  52.  
  53.  /*
  54.  **  Get TYPE and NOTATION ids
  55.  */
  56.   gbl.data = &(hAB) ;
  57.  
  58.   typfld.dim = 32 ;
  59.   typfld.psz = (PSZ)Tstfun->TstFunType ;
  60.  
  61.   ntnfld.dim = 32 ;
  62.   ntnfld.psz = (PSZ)Tstfun->TstFunNotation ;
  63.  
  64.   funcID = tstGetFunctionID (&gbl, &typfld, &ntnfld) ;
  65.  
  66.  /*
  67.  **  Set SAMPLE accordingly
  68.  */
  69.   smpfld.dim = 32 ;
  70.   smpfld.psz = (PSZ)Tstfun->TstFunSample ;
  71.  
  72.   tstDisplSample (funcID, &smpfld) ;
  73.  
  74.   WinSetDlgItemText (hWndDlg, TSTFUNSMPFLD, Tstfun->TstFunSample) ;
  75. }
  76.