home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / tool / various / iniwiz / iniprop.h < prev    next >
Text File  |  1994-04-06  |  3KB  |  121 lines

  1. //---------------------------------------------------------------------------
  2. //                     Property information header 
  3. //----------------------------------------------------------------------------
  4.  
  5.  
  6. // Convinient macro to find offset of fields in structures
  7. #define OFFSETIN(struc,field)      ((USHORT)&(((struc *)0)->field))
  8.  
  9.  
  10. // Property information to be maintained for each Instance of the control
  11. typedef struct tagINIWIZInfo {
  12.     BOOL         bNotify;
  13.     HSZ        hszFile;
  14.     HSZ         hszSection;
  15.     HSZ        hszEntry;
  16.     HSZ        hszValue;
  17.     HSZ        hszAbout;
  18.     WORD        nAction;
  19. }INIWIZINFO;
  20.  
  21. typedef INIWIZINFO FAR * LPINIWIZINFO;
  22. #define LpIniDEREF(hctl)    ((LPINIWIZINFO)VBDerefControl(hctl))
  23.  
  24.  
  25. //                    The Notify Property - Type : BOOL
  26.  
  27. PROPINFO Property_Notify  =
  28.     {
  29.     "Notify",
  30.     DT_BOOL | PF_fGetData | PF_fSetData | PF_fSaveData,
  31.     OFFSETIN(INIWIZINFO, bNotify),
  32.     0, 0, NULL, 0
  33.     };
  34.  
  35. PROPINFO Property_File    =
  36.     {
  37.     "File",
  38.     DT_HSZ | PF_fGetData | PF_fSetData | PF_fSaveData,
  39.     OFFSETIN(INIWIZINFO, hszFile ),
  40.     0, 0, NULL, 0
  41.     };
  42.  
  43. PROPINFO Property_Section =
  44.     {
  45.     "Section",
  46.     DT_HSZ | PF_fGetData | PF_fSetData | PF_fSaveData,
  47.     OFFSETIN(INIWIZINFO, hszSection),
  48.     0, 0, NULL, 0
  49.     };
  50.  
  51. PROPINFO Property_Entry   =
  52.     {
  53.     "Entry",
  54.     DT_HSZ | PF_fGetData | PF_fSetData | PF_fSaveData,
  55.     OFFSETIN(INIWIZINFO, hszEntry),
  56.     0, 0, NULL, 0
  57.     };
  58.  
  59. PROPINFO Property_Value   =
  60.     {
  61.     "Value",
  62.     DT_HSZ | PF_fGetData | PF_fSetData | PF_fSaveData,
  63.     OFFSETIN(INIWIZINFO, hszValue),
  64.     0, 0, NULL, 0
  65.     };
  66.  
  67.  
  68. PROPINFO Property_Action  =
  69.     {
  70.     "Action",
  71.     DT_SHORT | PF_fNoShow | PF_fGetData | PF_fSetData | PF_fSaveData | PF_fSetMsg ,
  72.     OFFSETIN(INIWIZINFO, nAction),
  73.     0, 0, NULL, 0
  74.     };
  75.  
  76. enum tagINIOPTIONS {
  77.         INI_READ = 1,
  78.         INI_WRITE,
  79.         INI_DELENTRY,
  80.         INI_DELSECTION
  81.         };
  82.  
  83. PROPINFO Property_About   =
  84.     {
  85.     "About",
  86.     DT_HSZ | PF_fDefVal | PF_fNoInitDef | PF_fNoRuntimeW | PF_fGetData | PF_fSetData ,
  87.     OFFSETIN(INIWIZINFO, hszAbout ),
  88.     0, 0, NULL, 0
  89.     };
  90.  
  91.  
  92. //---------------------------------------------------------------------------
  93. //                                     Property list
  94. //---------------------------------------------------------------------------
  95. // Define the consecutive indicies for the properties
  96. //---------------------------------------------------------------------------
  97. #define IPROP_INIWIZ_CTLNAME              0
  98. #define IPROP_INIWIZ_TAG                  1
  99. #define IPROP_INIWIZ_NOTIFY                    2
  100. #define IPROP_INIWIZ_FILE                        3
  101. #define IPROP_INIWIZ_SECTION                    4
  102. #define IPROP_INIWIZ_ENTRY                        5
  103. #define IPROP_INIWIZ_VALUE                        6
  104. #define IPROP_INIWIZ_ACTION                    7
  105. #define IPROP_INIWIZ_ABOUT                     8
  106.  
  107.  
  108. PPROPINFO INIWIZ_Properties[] =
  109.     {
  110.     PPROPINFO_STD_CTLNAME,
  111.     PPROPINFO_STD_TAG,
  112.      &Property_Notify,
  113.      &Property_File,
  114.      &Property_Section,
  115.      &Property_Entry,
  116.      &Property_Value,
  117.      &Property_Action,
  118.      &Property_About,
  119.     NULL
  120.     };
  121.