home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic 4 Power Pack / Visual_Basic4_Power_Pack.bin / vb4files / schedvbx / samples.z / SCHEDVBX.H < prev    next >
Encoding:
C/C++ Source or Header  |  1995-02-05  |  64.0 KB  |  1,250 lines

  1. ///////////////////////////////////////////////////////////////////////
  2. //
  3. //  SCHEDVBX.H - Schedule/VBX Visual Basic Custom Control by ADDSoft, Inc.
  4. //                    Version 1.00
  5. //
  6. ///////////////////////////////////////////////////////////////////////
  7.  
  8. #ifndef __SCHEDVBX_H__
  9. #define __SCHEDVBX_H__
  10.  
  11. #include <afxext.h>
  12.  
  13. #define VBM_BASE         (WM_USER  + 0x0c00)
  14. #define VBM_INITPROPUP    (VBM_BASE + 0x09)
  15.  
  16. #define IPROP_CTLNAME                   0
  17. #define IPROP_INDEX                     1
  18. #define IPROP_LEFT                      2
  19. #define IPROP_TOP                       3
  20. #define IPROP_WIDTH                     4
  21. #define IPROP_HEIGHT                    5
  22. #define IPROP_VISIBLE                   6
  23. #define IPROP_PARENT                    7
  24. #define IPROP_HWND                      8
  25. #define IPROP_TAG                       9
  26. #define IPROP_CAPTION                   10
  27. #define IPROP_BORDERSTYLE               11
  28. #define IPROP_TABINDEX                  12
  29. #define IPROP_TABSTOP                   13
  30. #define IPROP_BACKCOLOR                    14
  31. #define IPROP_DUMMY1                    15
  32. #define IPROP_DUMMY2                    16
  33. #define IPROP_DUMMY3                    17
  34. #define IPROP_MASTERDIALOG              18
  35. #define IPROP_GENERALDIALOG             19
  36. #define IPROP_ABOUT                     20
  37. #define IPROP_DISPLAYMODE                21
  38. #define IPROP_BEVELHIGHLIGHTCOLOR       22
  39. #define IPROP_BEVELSHADOWCOLOR          23
  40. #define IPROP_BEVELWIDTH                24
  41. #define IPROP_GRIDMAJORCOLOR            25
  42. #define IPROP_GRIDMAJORTHICKNESS        26
  43. #define IPROP_HINSTANCE                    27
  44. #define IPROP_PROCESSTAB                28
  45. #define IPROP_DOUBLECLICKDIVIDE            29
  46. #define IPROP_REDRAW                    30
  47. #define IPROP_SCROLLBARCOLOR            31
  48. #define IPROP_SCROLLBARWIDTH            32
  49. #define IPROP_PROPERTYLOAD                33
  50. #define IPROP_PROPERTYSAVE                34
  51. #define IPROP_DATETIMEDIALOG            35
  52. #define IPROP_CURRENTTIMECOLOR          36
  53. #define IPROP_CURRENTTIMELINE           37
  54. #define IPROP_DEFAULTDATETIMEFORMAT        38
  55. #define IPROP_DEFAULTDURATIONFORMAT        39
  56. #define IPROP_TSDIALOG                  40
  57. #define IPROP_TSTHUMBWINDOW                41
  58. #define IPROP_TSBACKCOLOR               42
  59. #define IPROP_TSBEVEL                   43
  60. #define IPROP_TSGRIDCOLOR               44
  61. #define IPROP_TSGRIDTHICKNESS           45
  62. #define IPROP_TSMAJORPERCENT            46
  63. #define IPROP_TSNUMMINORTICKS            47
  64. #define IPROP_TSSIZETOTICK                48
  65. #define IPROP_TSSIZE                    49
  66. #define IPROP_TSMAJOR                   50
  67. #define IPROP_TSMAJORCOUNT              51
  68. #define IPROP_TSMAJORFONTCOLOR          52
  69. #define IPROP_TSMAJORFONTNAME           53
  70. #define IPROP_TSMAJORFONTSIZEPERCENT    54
  71. #define IPROP_TSMAJORFONTBOLD           55
  72. #define IPROP_TSMAJORFONTITALIC         56
  73. #define IPROP_TSMAJORFONTORIENT            57
  74. #define IPROP_TSMAJORFORMAT             58
  75. #define IPROP_TSMAJORGRID               59
  76. #define IPROP_TSMINOR                   60
  77. #define IPROP_TSMINORCOUNT              61
  78. #define IPROP_TSMINORFONTCOLOR          62
  79. #define IPROP_TSMINORFONTNAME           63
  80. #define IPROP_TSMINORFONTSIZEPERCENT    64
  81. #define IPROP_TSMINORFONTBOLD           65
  82. #define IPROP_TSMINORFONTITALIC         66
  83. #define IPROP_TSMINORFONTORIENT            67
  84. #define IPROP_TSMINORFORMAT             68
  85. #define IPROP_TSMINORGRID               69
  86. #define IPROP_TSRULERLARGE                70
  87. #define IPROP_TSRULERSMALL                71
  88. #define IPROP_TSRULERCOLOR                72
  89. #define IPROP_TSDATETIMEBEG             73
  90. #define IPROP_TSDATETIMEEND             74
  91. #define IPROP_TSDATETIMEVIEW            75
  92. #define IPROP_BARSDIALOG                76
  93. #define IPROP_BARSMAX                    77
  94. #define IPROP_BARMOVETEXTFORMAT            78
  95. #define IPROP_BARNAME                    79
  96. #define IPROP_BARSIZE                    80
  97. #define IPROP_BAROFFSET                    81
  98. #define IPROP_BARCOLOR                  82
  99. #define IPROP_BARPATTERN                83
  100. #define IPROP_BARADJUSTABLE                84
  101. #define IPROP_BARTEXTPOSITION            85
  102. #define IPROP_BARTEXTFIELD              86
  103. #define IPROP_BARTEXTFORMAT             87
  104. #define IPROP_BARTEXTCLIP                88
  105. #define IPROP_BARFONTCOLOR                89
  106. #define IPROP_BARFONTNAME                90
  107. #define IPROP_BARFONTSIZEPERCENT        91
  108. #define IPROP_BARFONTBOLD                92
  109. #define IPROP_BARFONTITALIC                93
  110. #define IPROP_BARBEGSYMBOL              94
  111. #define IPROP_BARBEGTYPE                95
  112. #define IPROP_BARBEGCOLOR               96
  113. #define IPROP_BARBEGSIZE                97
  114. #define IPROP_BARBEGOFFSET              98
  115. #define IPROP_BARENDSYMBOL              99
  116. #define IPROP_BARENDTYPE                100
  117. #define IPROP_BARENDCOLOR               101
  118. #define IPROP_BARENDSIZE                102
  119. #define IPROP_BARENDOFFSET              103
  120. #define IPROP_BARDELETE                    104
  121. #define IPROP_BARINSERT                    105
  122. #define IPROP_RESHDRDIALOG                106
  123. #define IPROP_RESHDRHEIGHT                107
  124. #define IPROP_RESHDRBACKCOLOR            108
  125. #define IPROP_RESHDRBEVEL                109
  126. #define IPROP_RESHDRFONTCOLOR            110
  127. #define IPROP_RESHDRFONTNAME            111
  128. #define IPROP_RESHDRFONTSIZEPERCENT        112
  129. #define IPROP_RESHDRFONTBOLD            113
  130. #define IPROP_RESHDRFONTITALIC            114
  131. #define IPROP_RESHDRGRIDCOLOR            115
  132. #define IPROP_RESHDRGRIDTHICKNESS        116
  133. #define IPROP_RESHDRRESIZE                117
  134. #define IPROP_RESCOLDIALOG              118
  135. #define IPROP_RESCOLMAX                 119
  136. #define IPROP_RESCOLFIELD               120
  137. #define IPROP_RESCOLFORMAT              121
  138. #define IPROP_RESCOLLABEL               122
  139. #define IPROP_RESCOLWIDTH               123
  140. #define IPROP_RESCOLALIGNMENT           124
  141. #define IPROP_RESCOLVISIBLE             125
  142. #define IPROP_RESCOLFROZEN              126
  143. #define IPROP_RESCOLEDITABLE            127
  144. #define IPROP_RESCOLRESIZABLE           128
  145. #define IPROP_RESDIALOG                 129
  146. #define IPROP_RESMAX                    130
  147. #define IPROP_RESVIEW                    131
  148. #define IPROP_RESWIDTH                    132
  149. #define IPROP_RESUNUSEDBACKCOLOR        133
  150. #define IPROP_RESBEVEL                  134
  151. #define IPROP_RESGRIDCOLOR              135
  152. #define IPROP_RESGRIDTHICKNESS          136
  153. #define IPROP_RESWIDTHRESIZE            137
  154. #define IPROP_RESLINERESIZE                138
  155. #define IPROP_RESCURRENTCOL             139
  156. #define IPROP_RESCURRENTROW             140
  157. #define IPROP_RESNAME                   141
  158. #define IPROP_RESBARDEFAULT             142
  159. #define IPROP_RESUSER1                  143
  160. #define IPROP_RESUSER2                  144
  161. #define IPROP_RESUSER3                  145
  162. #define IPROP_RESUSER4                  146
  163. #define IPROP_RESLINEHEIGHT             147
  164. #define IPROP_RESBACKCOLOR              148
  165. #define IPROP_RESFONTCOLOR              149
  166. #define IPROP_RESFONTNAME               150
  167. #define IPROP_RESFONTSIZEPERCENT        151
  168. #define IPROP_RESFONTBOLD               152
  169. #define IPROP_RESFONTITALIC             153
  170. #define IPROP_RESCLEAR                  154
  171. #define IPROP_RESDELETE                 155
  172. #define IPROP_RESINSERT                 156
  173. #define IPROP_RESISEMPTY                157
  174. #define IPROP_RESNEXTEMPTY              158
  175. #define IPROP_RESSORT                   159
  176. #define IPROP_RESLOAD                   160
  177. #define IPROP_RESSAVE                   161
  178. #define IPROP_TBHDRDIALOG               162
  179. #define IPROP_TBHDRBACKCOLOR            163
  180. #define IPROP_TBHDRBEVEL                164
  181. #define IPROP_TBHDRGRIDCOLOR            165
  182. #define IPROP_TBHDRHEIGHT               166
  183. #define IPROP_TBCOLDIALOG               167
  184. #define IPROP_TBCOLMAX                  168
  185. #define IPROP_TBCOLFIELD                169
  186. #define IPROP_TBCOLFORMAT               170
  187. #define IPROP_TBCOLLABEL                171
  188. #define IPROP_TBCOLWIDTH                172
  189. #define IPROP_TBCOLALIGNMENT            173
  190. #define IPROP_TBCOLVISIBLE              174
  191. #define IPROP_TBCOLFROZEN               175
  192. #define IPROP_TBCOLEDITABLE             176
  193. #define IPROP_TBCOLRESIZABLE            177
  194. #define IPROP_TBDIALOG                  178
  195. #define IPROP_TBMAX                     179
  196. #define IPROP_TBHEIGHT                  180
  197. #define IPROP_TBLINEHEIGHT              181
  198. #define IPROP_TBVIEW                    182
  199. #define IPROP_TBWIDTH                   183
  200. #define IPROP_TBBACKCOLOR               184
  201. #define IPROP_TBBEVEL                   185
  202. #define IPROP_TBGRIDCOLOR               186
  203. #define IPROP_TBFONTCOLOR                187
  204. #define IPROP_TBFONTNAME                 188
  205. #define IPROP_TBFONTSIZEPERCENT          189
  206. #define IPROP_TBFONTBOLD                 190
  207. #define IPROP_TBFONTITALIC               191
  208. #define IPROP_TBRESOURCE                192
  209. #define IPROP_TBBEG                     193
  210. #define IPROP_TBEND                     194
  211. #define IPROP_TBDUR                     195
  212. #define IPROP_TBBAR                     196
  213. #define IPROP_TBGROUP                   197
  214. #define IPROP_TBUSER1                   198
  215. #define IPROP_TBUSER2                   199
  216. #define IPROP_TBUSER3                   200
  217. #define IPROP_TBUSER4                   201
  218. #define IPROP_TBCLEAR                   202
  219. #define IPROP_TBCLEARRES                203
  220. #define IPROP_TBDELETE                  204
  221. #define IPROP_TBISEMPTY                 205
  222. #define IPROP_TBNEXTEMPTY               206
  223. #define IPROP_TBLOAD                    207
  224. #define IPROP_TBSAVE                    208
  225. #define IPROP_SCHEDDIALOG               209
  226. #define IPROP_SCHEDBACKCOLOR            210
  227. #define IPROP_SCHEDBEVEL                211
  228. #define IPROP_SCHEDGRIDCOLOR            212
  229. #define IPROP_SCHEDGRIDTHICKNESS        213
  230. #define IPROP_LEGENDDIALOG              214
  231. #define IPROP_LEGENDTITLE               215
  232. #define IPROP_LEGENDPOSITION            216
  233. #define IPROP_LEGENDTYPE                217
  234. #define IPROP_LEGENDSIZE                218
  235. #define IPROP_LEGENDLINEHEIGHT            219
  236. #define IPROP_LEGENDBACKCOLOR           220
  237. #define IPROP_LEGENDBEVEL               221
  238. #define IPROP_LEGENDVIEW                222
  239. #define IPROP_LEGENDSELECTION            223
  240. #define IPROP_LEGENDRESIZE                224
  241. #define IPROP_PRINTDIALOG                225
  242. #define IPROP_PRINTCHART                226
  243. #define IPROP_PRINTSCREEN                227
  244. #define IPROP_PRINTSHOWDIALOG            228
  245. #define IPROP_PRINTHEADER                229
  246. #define IPROP_PRINTFOOTER                230
  247. #define IPROP_PRINTWIDTH                231
  248. #define IPROP_PRINTHEIGHT                232
  249. #define IPROP_PRINTLEFTMARGIN            233
  250. #define IPROP_PRINTTOPMARGIN            234
  251. #define IPROP_PRINTRIGHTMARGIN            235
  252. #define IPROP_PRINTBOTTOMMARGIN            236
  253. #define IPROP_PRINTHEADERHEIGHT            237
  254. #define IPROP_PRINTHEADERTEXT            238
  255. #define IPROP_PRINTHEADERTEXTHEIGHT        239
  256. #define IPROP_PRINTFOOTERHEIGHT            240
  257. #define IPROP_PRINTFOOTERTEXT            241
  258. #define IPROP_PRINTFOOTERTEXTHEIGHT        242
  259. #define IPROP_MONTHNUMCOLOR                243
  260. #define IPROP_MONTHNUMSIZE                244
  261. #define IPROP_MONTHNONNUMCOLOR            245
  262. #define IPROP_MONTHNONNUMSIZE            246
  263.  
  264. #define IEVENT_STD_DRAGDROP                    0
  265. #define IEVENT_STD_DRAGOVER                    1
  266. #define IEVENT_STD_GOTFOCUS                 2
  267. #define IEVENT_STD_LOSTFOCUS                3
  268. #define IEVENT_STD_MOUSEDOWN                4
  269. #define IEVENT_STD_MOUSEMOVE                5
  270. #define IEVENT_STD_MOUSEUP                  6
  271. #define IEVENT_STD_KEYDOWN                  7
  272. #define IEVENT_STD_KEYPRESS                 8
  273. #define IEVENT_STD_KEYUP                    9
  274. #define IEVENT_BARBEGDOUBLECLICK            10
  275. #define IEVENT_BARBEGRIGHTDOUBLECLICK        11
  276. #define IEVENT_BARBEGRIGHTSINGLECLICK        12
  277. #define IEVENT_BARBEGSINGLECLICK            13
  278. #define IEVENT_BARDOUBLECLICK                14
  279. #define IEVENT_BARENDDOUBLECLICK            15
  280. #define IEVENT_BARENDRIGHTDOUBLECLICK        16
  281. #define IEVENT_BARENDRIGHTSINGLECLICK        17
  282. #define IEVENT_BARENDSINGLECLICK            18
  283. #define IEVENT_BARMIDDOUBLECLICK            19
  284. #define IEVENT_BARMIDRIGHTDOUBLECLICK        20
  285. #define IEVENT_BARMIDRIGHTSINGLECLICK        21
  286. #define IEVENT_BARMIDSINGLECLICK            22
  287. #define IEVENT_BARRIGHTDOUBLECLICK            23
  288. #define IEVENT_BARRIGHTSINGLECLICK            24
  289. #define IEVENT_BARSINGLECLICK                25
  290. #define IEVENT_CELLDOUBLECLICK                26
  291. #define IEVENT_CELLGOTFOCUS                    27
  292. #define IEVENT_CELLLOSTFOCUS                28
  293. #define IEVENT_CELLRIGHTDOUBLECLICK            29
  294. #define IEVENT_CELLRIGHTSINGLECLICK            30
  295. #define IEVENT_CELLSINGLECLICK                31
  296. #define IEVENT_DISPLAYMODECHANGED            32
  297. #define IEVENT_HEADERHEIGHTCHANGED            33
  298. #define IEVENT_INSERTMODECHANGED            34
  299. #define IEVENT_LEGENDDOUBLECLICK            35
  300. #define IEVENT_LEGENDSINGLECLICK            36
  301. #define IEVENT_LEGENDSIZECHANGED            37
  302. #define IEVENT_RESCHANGED                    38
  303. #define IEVENT_RESCOLRESIZED                39
  304. #define IEVENT_RESHDRDOUBLECLICK            40
  305. #define IEVENT_RESHDRRIGHTDOUBLECLICK        41
  306. #define IEVENT_RESHDRRIGHTSINGLECLICK        42
  307. #define IEVENT_RESHDRSINGLECLICK            43
  308. #define IEVENT_RESHEIGHTCHANGED                44
  309. #define IEVENT_RESSCROLLPASTBEG                45
  310. #define IEVENT_RESSCROLLPASTEND                46
  311. #define IEVENT_RESVIEWCHANGED                47
  312. #define IEVENT_RESWIDTHCHANGED                48
  313. #define IEVENT_SCHEDBACKDOUBLECLICK            49
  314. #define IEVENT_SCHEDBACKRIGHTDOUBLECLICK    50
  315. #define IEVENT_SCHEDBACKRIGHTSINGLECLICK    51
  316. #define IEVENT_SCHEDBACKSINGLECLICK            52
  317. #define IEVENT_TBBEGCHANGED                    53
  318. #define IEVENT_TBCHANGEBEGIN                54
  319. #define IEVENT_TBCHANGED                    55
  320. #define IEVENT_TBDURCHANGED                    56
  321. #define IEVENT_TBENDCHANGED                    57
  322. #define IEVENT_TBPULLDOWN                      58
  323. #define IEVENT_TBPULLDOWNEND                  59
  324. #define IEVENT_TS0MAJORDOUBLECLICK            60
  325. #define IEVENT_TS0MAJORRIGHTDOUBLECLICK        61
  326. #define IEVENT_TS0MAJORRIGHTSINGLECLICK        62
  327. #define IEVENT_TS0MAJORSINGLECLICK            63
  328. #define IEVENT_TS0MINORDOUBLECLICK            64
  329. #define IEVENT_TS0MINORRIGHTDOUBLECLICK        65
  330. #define IEVENT_TS0MINORRIGHTSINGLECLICK        66
  331. #define IEVENT_TS0MINORSINGLECLICK            67
  332. #define IEVENT_TS0SCROLLPASTBEG                68
  333. #define IEVENT_TS0SCROLLPASTEND                69
  334. #define IEVENT_TS0DATETIMEVIEWCHANGED        70
  335. #define IEVENT_TS0SIZECHANGED                71
  336. #define IEVENT_TS1MAJORDOUBLECLICK            72
  337. #define IEVENT_TS1MAJORRIGHTDOUBLECLICK        73
  338. #define IEVENT_TS1MAJORRIGHTSINGLECLICK        74
  339. #define IEVENT_TS1MAJORSINGLECLICK            75
  340. #define IEVENT_TS1MINORDOUBLECLICK            76
  341. #define IEVENT_TS1MINORRIGHTDOUBLECLICK        77
  342. #define IEVENT_TS1MINORRIGHTSINGLECLICK        78
  343. #define IEVENT_TS1MINORSINGLECLICK            79
  344. #define IEVENT_TS1SCROLLPASTBEG                80
  345. #define IEVENT_TS1SCROLLPASTEND                81
  346. #define IEVENT_TS1DATETIMEVIEWCHANGED        82
  347. #define IEVENT_TS1SIZECHANGED                83
  348.                                           
  349.  
  350. extern "C" {
  351. BOOL FAR PASCAL _loadds GetEventParamString(LPVOID, int, LPSTR);
  352. }
  353.  
  354.  
  355. class CScheduleVBX : public CVBControl                                   
  356. {
  357.  
  358. public:
  359.  
  360.     enum DisplayMode { DisplayMode_Resource, DisplayMode_YearlyHorz,
  361.                     DisplayMode_YearlyVert, DisplayMode_MonthlyHorz,
  362.                     DisplayMode_MonthlyVert, DisplayMode_WeeklyHorz,
  363.                     DisplayMode_WeeklyVert, DisplayMode_DailyHorz,
  364.                     DisplayMode_DailyVert, DisplayMode_CalendarHorz,
  365.                     DisplayMode_CalendarVert };
  366.                     
  367.     enum Timescale {     TS_Years, TS_Quarters, TS_Months, TS_Weeks,
  368.                         TS_Days, TS_Hours, TS_Minutes };
  369.  
  370.     enum BorderStyle { Border_None, Border_FixedSingle };
  371.  
  372.     enum BarTextPosition {    BarTextPosition_None, BarTextPosition_Left,
  373.                     BarTextPosition_Right, BarTextPosition_Above,
  374.                     BarTextPosition_Below, BarTextPosition_InsideLeft,
  375.                     BarTextPosition_InsideCenter, BarTextPosition_InsideRight };
  376.  
  377.     enum BarTextField {    BarTextField_None, BarTextField_ResourceName,
  378.                     BarTextField_ResourceUser1, BarTextField_ResourceUser2,
  379.                     BarTextField_ResourceUser3, BarTextField_ResourceUser4,
  380.                     BarTextField_TBBeg, BarTextField_TBEnd,
  381.                     BarTextField_TBDur, BarTextField_TBGroup,
  382.                     BarTextField_TBUser1, BarTextField_TBUser2,
  383.                     BarTextField_TBUser3, BarTextField_TBUser4,
  384.                     BarTextField_BarName };
  385.                                         
  386.     enum BarPattern { Pattern_None, Pattern_Horizontal,
  387.                     Pattern_Vertical, Pattern_UpwardsHatch,
  388.                     Pattern_DownwardsHatch, Pattern_CrossHatch,
  389.                     Pattern_45DegreeCrossHatch };
  390.  
  391.     enum BarAdjustable { Adjustable_Full, Adjustable_BeginOnly,
  392.                     Adjustable_MidOnly, Adjustable_EndOnly,
  393.                     Adjustable_None };
  394.  
  395.     enum Symbol {    Symbol_None, Symbol_PentagonUp,
  396.                     Symbol_PentagonDown, Symbol_Diamond,
  397.                     Symbol_CircledDiamond, Symbol_ArrowheadUp,
  398.                     Symbol_ArrowheadDown, Symbol_ArrowheadRight,
  399.                     Symbol_ArrowheadLeft, Symbol_CircledArrowheadUp,
  400.                     Symbol_CircledArrowheadDown, Symbol_ArrowUp,
  401.                     Symbol_ArrowDown, Symbol_CircledArrowUp,
  402.                     Symbol_CircledArrowDown, Symbol_ArrowRight,
  403.                     Symbol_ArrowLeft, Symbol_CircledArrowRight,
  404.                     Symbol_CircledArrowLeft, Symbol_CircledArrowheadRight,
  405.                     Symbol_CircledArrowheadLeft, Symbol_PentagonRight,
  406.                     Symbol_PentagonLeft };
  407.  
  408.     enum SymbolType { SymbolType_Solid, SymbolType_Framed };
  409.     
  410.     enum Alignment { Alignment_Left, Alignment_Center, Alignment_Right };
  411.  
  412.     enum BevelType { BevelType_None, BevelType_Inset, BevelType_Raised };
  413.  
  414.     enum ResCol { ResCol_None, ResCol_RowNum, ResCol_ResourceNum,
  415.                     ResCol_ResourceName, ResCol_BarNum, ResCol_TimeBlocks,
  416.                     ResCol_ResourceUser1, ResCol_ResourceUser2,
  417.                     ResCol_ResourceUser3, ResCol_ResourceUser4,
  418.                     ResCol_LineHeight, ResCol_BackColor,
  419.                     ResCol_FontColor, ResCol_FontName,
  420.                     ResCol_FontSizePercent, ResCol_FontBold,
  421.                     ResCol_FontItalic };
  422.  
  423.     enum TBCol { TBCol_None, TBCol_RowNum, TBCol_ResourceNum,
  424.                     TBCol_TBNum, TBCol_TBBeg, TBCol_TBEnd,
  425.                     TBCol_TBDur, TBCol_BarNum, TBCol_GroupNum,
  426.                     TBCol_TBUser1, TBCol_TBUser2,
  427.                     TBCol_TBUser3, TBCol_TBUser4 };
  428.  
  429.     enum LegendPosition { LegendPos_Right, LegendPos_Bottom,
  430.                     LegendPos_Left, LegendPos_Top };
  431.                     
  432.     enum LegendType { LegendType_Resources, LegendType_Bars };
  433.                     
  434.     enum FontOrient { FontOrient_Right, FontOrient_Up,
  435.                     FontOrient_Left, FontOrient_Down };
  436.                     
  437.     enum PrintHdrFtr { PrintHdrFtr_AllPages, PrintHdrFtr_1stPage,
  438.                     PrintHdrFtr_1stHorz, PrintHdrFtr_1stVert,
  439.                     PrintHdrFtr_None };
  440.                                         
  441.           
  442.     CScheduleVBX() : CVBControl() {}
  443.     
  444.     BOOL Create(DWORD dwStyle, const RECT& rect, CWnd* parent, UINT ctlid) 
  445.     {
  446.         return CVBControl::Create("SchedVBX.VBX;SchedVBX;SchedVBX", dwStyle,
  447.                                     rect, parent, ctlid);
  448.     }
  449.  
  450.     void InitPropup(int iProp)                        
  451.     {   
  452.         HWND hwnd = (HWND)SendMessage(VBM_INITPROPUP, iProp);
  453.         ::ShowWindow(hwnd, SW_SHOW);
  454.     }
  455.  
  456.     // Standard Properties - (Set)
  457.     BOOL SetVisible(BOOL b)               { return SetNumProperty(IPROP_VISIBLE, b); }
  458.     BOOL SetCaption(LPCSTR s)           { return SetStrProperty(IPROP_CAPTION, s); }
  459.     BOOL SetBorderStyle(int i)            { return SetNumProperty(IPROP_BORDERSTYLE, i); }
  460.     BOOL SetBackColor(long l)             { return SetNumProperty(IPROP_BACKCOLOR, l); }
  461.  
  462.     // General Properties - (Set)
  463.     void MasterDialog()                 { InitPropup(IPROP_MASTERDIALOG); }
  464.     void GeneralDialog()                 { InitPropup(IPROP_GENERALDIALOG); }
  465.     void About()                         { InitPropup(IPROP_ABOUT); }
  466.     BOOL SetDisplayMode(int i)            { return SetNumProperty(IPROP_DISPLAYMODE, i); }
  467.     BOOL SetBevelHighLightColor(long l) { return SetNumProperty(IPROP_BEVELHIGHLIGHTCOLOR, l); }
  468.     BOOL SetBevelShadowColor(long l)     { return SetNumProperty(IPROP_BEVELSHADOWCOLOR, l); }
  469.     BOOL SetBevelWidth(int i)            { return SetNumProperty(IPROP_BEVELWIDTH, i); }
  470.     BOOL SetGridMajorColor(long l)          { return SetNumProperty(IPROP_GRIDMAJORCOLOR, l); }
  471.     BOOL SetGridMajorThickness(int i)   { return SetNumProperty(IPROP_GRIDMAJORTHICKNESS, i); }
  472.     BOOL SetProcessTab(BOOL b)           { return SetNumProperty(IPROP_PROCESSTAB, b); }
  473.     BOOL SetDoubleClickDivide(int i)    { return SetNumProperty(IPROP_DOUBLECLICKDIVIDE, i); }
  474.     BOOL SetRedraw(BOOL b)               { return SetNumProperty(IPROP_REDRAW, b); }
  475.     BOOL SetScrollBarColor(long l)       { return SetNumProperty(IPROP_SCROLLBARCOLOR, l); }
  476.     BOOL SetScrollBarWidth(int i)       { return SetNumProperty(IPROP_SCROLLBARWIDTH, i); }
  477.     BOOL SetMonthNumColor(long l)       { return SetNumProperty(IPROP_MONTHNUMCOLOR, l); }
  478.     BOOL SetMonthNumSize(int i)           { return SetNumProperty(IPROP_MONTHNUMSIZE, i); }
  479.     BOOL SetMonthNonNumColor(long l)       { return SetNumProperty(IPROP_MONTHNONNUMCOLOR, l); }
  480.     BOOL SetMonthNonNumSize(int i)       { return SetNumProperty(IPROP_MONTHNONNUMSIZE, i); }
  481.     BOOL SetPropertyLoad(LPCSTR s)       { return SetStrProperty(IPROP_PROPERTYLOAD, s); }
  482.     BOOL SetPropertySave(LPCSTR s)       { return SetStrProperty(IPROP_PROPERTYSAVE, s); }
  483.  
  484.     // Date/Time Properties    - (Set)
  485.     void DateTimeDialog()                 { InitPropup(IPROP_DATETIMEDIALOG);    }
  486.     BOOL SetCurrentTimeColor(long l)       { return SetNumProperty(IPROP_CURRENTTIMECOLOR, l); }
  487.     BOOL SetCurrentTimeLine(BOOL b)       { return SetNumProperty(IPROP_CURRENTTIMELINE, b); }
  488.     BOOL SetDefaultDateTimeFormat(LPCSTR s) { return SetStrProperty(IPROP_DEFAULTDATETIMEFORMAT, s); }
  489.     BOOL SetDefaultDurationFormat(LPCSTR s) { return SetStrProperty(IPROP_DEFAULTDURATIONFORMAT, s); }
  490.  
  491.     // Timescale Properties - (Set)
  492.     void TimescalesDialog()             { InitPropup(IPROP_TSDIALOG); }
  493.     BOOL SetTSThumbWindow(int x, BOOL b){ return SetNumProperty(IPROP_TSTHUMBWINDOW, b, x); }
  494.     BOOL SetTSBackColor(int x, long l)    { return SetNumProperty(IPROP_TSBACKCOLOR, l, x); }
  495.     BOOL SetTSBevel(int x, int i)        { return SetNumProperty(IPROP_TSBEVEL, i, x); }
  496.     BOOL SetTSGridColor(int x, long l)     { return SetNumProperty(IPROP_TSGRIDCOLOR, l, x); }
  497.     BOOL SetTSGridThickness(int x, int i) { return SetNumProperty(IPROP_TSGRIDTHICKNESS, i, x); }
  498.     BOOL SetTSMajorPercent(int x, int i) { return SetNumProperty(IPROP_TSMAJORPERCENT, i, x); }
  499.     BOOL SetTSNumMinorTicks(int x, int i) { return SetNumProperty(IPROP_TSNUMMINORTICKS, i, x); }
  500.     BOOL SetTSSizeToTick(int x, BOOL b) { return SetNumProperty(IPROP_TSSIZETOTICK, b, x); }
  501.     BOOL SetTSSize(int x, int i)         { return SetNumProperty(IPROP_TSSIZE, i, x); }
  502.     BOOL SetTSMajor(int x, int i)         { return SetNumProperty(IPROP_TSMAJOR, i, x); }
  503.     BOOL SetTSMajorCount(int x, int i)     { return SetNumProperty(IPROP_TSMAJORCOUNT, i, x); }
  504.     BOOL SetTSMajorFontColor(int x, long l) { return SetNumProperty(IPROP_TSMAJORFONTCOLOR, l, x); }
  505.     BOOL SetTSMajorFontName(int x, CString s) { return SetNumProperty(IPROP_TSMAJORFONTNAME, FontNum(s), x); }
  506.     BOOL SetTSMajorFontSizePercent(int x, int i) { return SetNumProperty(IPROP_TSMAJORFONTSIZEPERCENT, i, x); }
  507.     BOOL SetTSMajorFontBold(int x, BOOL b) { return SetNumProperty(IPROP_TSMAJORFONTBOLD, b, x); }
  508.     BOOL SetTSMajorFontItalic(int x, BOOL b) { return SetNumProperty(IPROP_TSMAJORFONTITALIC, b, x); }
  509.     BOOL SetTSMajorFontOrient(int x, int i) { return SetNumProperty(IPROP_TSMAJORFONTORIENT, i, x); }
  510.     BOOL SetTSMajorFormat(int x, int i)    { return SetNumProperty(IPROP_TSMAJORFORMAT, i, x); }
  511.     BOOL SetTSMajorGrid(int x, BOOL b)     { return SetNumProperty(IPROP_TSMAJORGRID, b, x); }
  512.     BOOL SetTSMinor(int x, int i)         { return SetNumProperty(IPROP_TSMINOR, i, x); }
  513.     BOOL SetTSMinorCount(int x, int i)     { return SetNumProperty(IPROP_TSMINORCOUNT, i, x); }
  514.     BOOL SetTSMinorFontColor(int x, long l) { return SetNumProperty(IPROP_TSMINORFONTCOLOR, l, x); }
  515.     BOOL SetTSMinorFontName(int x, CString s) { return SetNumProperty(IPROP_TSMINORFONTNAME, FontNum(s), x); }
  516.     BOOL SetTSMinorFontSizePercent(int x, int i) { return SetNumProperty(IPROP_TSMINORFONTSIZEPERCENT, i, x); }
  517.     BOOL SetTSMinorFontBold(int x, BOOL b) { return SetNumProperty(IPROP_TSMINORFONTBOLD, b, x); }
  518.     BOOL SetTSMinorFontItalic(int x, BOOL b) { return SetNumProperty(IPROP_TSMINORFONTITALIC, b, x); }
  519.     BOOL SetTSMinorFontOrient(int x, int i) { return SetNumProperty(IPROP_TSMINORFONTORIENT, i, x); }
  520.     BOOL SetTSMinorFormat(int x, int i)    { return SetNumProperty(IPROP_TSMINORFORMAT, i, x); }
  521.     BOOL SetTSMinorGrid(int x, BOOL b)     { return SetNumProperty(IPROP_TSMINORGRID, b, x); }
  522.     BOOL SetTSRulerLarge(int x, int i)    { return SetNumProperty(IPROP_TSRULERLARGE, i, x); }
  523.     BOOL SetTSRulerSmall(int x, int i)    { return SetNumProperty(IPROP_TSRULERSMALL, i, x); }
  524.     BOOL SetTSRulerColor(int x, long l)    { return SetNumProperty(IPROP_TSRULERCOLOR, l, x); }
  525.     BOOL SetTSDateTimeBeg(int x, LPCSTR s) { return SetStrProperty(IPROP_TSDATETIMEBEG, s, x); }
  526.     BOOL SetTSDateTimeEnd(int x, LPCSTR s) { return SetStrProperty(IPROP_TSDATETIMEEND, s, x); }
  527.     BOOL SetTSDateTimeView(int x, LPCSTR s) { return SetStrProperty(IPROP_TSDATETIMEVIEW, s, x); }
  528.  
  529.     // Bar Properties - (Set)
  530.     void BarsDialog()                     { InitPropup(IPROP_BARSDIALOG); }
  531.     BOOL SetBarsMax(int i)                 { return SetNumProperty(IPROP_BARSMAX, i); }
  532.     BOOL SetBarMoveTextFormat(LPCSTR s) { return SetStrProperty(IPROP_BARMOVETEXTFORMAT, s); }
  533.     BOOL SetBarName(int x, LPCSTR s)     { return SetStrProperty(IPROP_BARNAME, s, x); }
  534.     BOOL SetBarSize(int x, int i)         { return SetNumProperty(IPROP_BARSIZE, i, x); }
  535.     BOOL SetBarOffset(int x, int i)         { return SetNumProperty(IPROP_BAROFFSET, i, x); }
  536.     BOOL SetBarColor(int x, long l)         { return SetNumProperty(IPROP_BARCOLOR, l, x); }
  537.     BOOL SetBarPattern(int x, int i)    { return SetNumProperty(IPROP_BARPATTERN, i, x); }
  538.     BOOL SetBarAdjustable(int x, int i) { return SetNumProperty(IPROP_BARADJUSTABLE, i, x); }
  539.     BOOL SetBarTextPosition(int x, int i) { return SetNumProperty(IPROP_BARTEXTPOSITION, i, x); }
  540.     BOOL SetBarTextField(int x, int i)    { return SetNumProperty(IPROP_BARTEXTFIELD, i, x); }
  541.     BOOL SetBarTextFormat(int x, LPCSTR s){ return SetStrProperty(IPROP_BARTEXTFORMAT, s, x); }
  542.     BOOL SetBarTextClip(int x, BOOL b)    { return SetNumProperty(IPROP_BARTEXTCLIP, b, x); }
  543.     BOOL SetBarFontColor(int x, long l) { return SetNumProperty(IPROP_BARFONTCOLOR, l, x); }
  544.     BOOL SetBarFontName(int x, CString s) { return SetNumProperty(IPROP_BARFONTNAME, FontNum(s), x); }
  545.     BOOL SetBarFontSizePercent(int x, int i) { return SetNumProperty(IPROP_BARFONTSIZEPERCENT, i, x); }
  546.     BOOL SetBarFontBold(int x, BOOL b) { return SetNumProperty(IPROP_BARFONTBOLD, b, x); }
  547.     BOOL SetBarFontItalic(int x, BOOL b) { return SetNumProperty(IPROP_BARFONTITALIC, b, x); }
  548.     BOOL SetBarBegSymbol(int x, int i)    { return SetNumProperty(IPROP_BARBEGSYMBOL, i, x); }
  549.     BOOL SetBarBegType(int x, int i)    { return SetNumProperty(IPROP_BARBEGTYPE, i, x); }
  550.     BOOL SetBarBegColor(int x, long l)    { return SetNumProperty(IPROP_BARBEGCOLOR, l, x); }
  551.     BOOL SetBarBegSize(int x, int i)    { return SetNumProperty(IPROP_BARBEGSIZE, i, x); }
  552.     BOOL SetBarBegOffset(int x, int i)    { return SetNumProperty(IPROP_BARBEGOFFSET, i, x); }
  553.     BOOL SetBarEndSymbol(int x, int i)    { return SetNumProperty(IPROP_BARENDSYMBOL, i, x); }
  554.     BOOL SetBarEndType(int x, int i)    { return SetNumProperty(IPROP_BARENDTYPE, i, x); }
  555.     BOOL SetBarEndColor(int x, long l)    { return SetNumProperty(IPROP_BARENDCOLOR, l, x); }
  556.     BOOL SetBarEndSize(int x, int i)    { return SetNumProperty(IPROP_BARENDSIZE, i, x); }
  557.     BOOL SetBarEndOffset(int x, int i)    { return SetNumProperty(IPROP_BARENDOFFSET, i, x); }
  558.  
  559.     // Resource Header Properties - (Set)
  560.        void ResHdrDialog()                 { InitPropup(IPROP_RESHDRDIALOG); }
  561.     BOOL SetResHdrHeight(int i)         { return SetNumProperty(IPROP_RESHDRHEIGHT, i); }
  562.     BOOL SetResHdrBackColor(long l)     { return SetNumProperty(IPROP_RESHDRBACKCOLOR, l); }
  563.     BOOL SetResHdrBevel(int i)         { return SetNumProperty(IPROP_RESHDRBEVEL, i); }
  564.     BOOL SetResHdrFontColor(long l)     { return SetNumProperty(IPROP_RESHDRFONTCOLOR, l); }
  565.     BOOL SetResHdrFontName(CString s)    { return SetNumProperty(IPROP_RESHDRFONTNAME, FontNum(s)); }
  566.     BOOL SetResHdrFontSizePercent(int i) { return SetNumProperty(IPROP_RESHDRFONTSIZEPERCENT, i); }
  567.      BOOL SetResHdrFontBold(BOOL b)        { return SetNumProperty(IPROP_RESHDRFONTBOLD, b); }
  568.     BOOL SetResHdrFontItalic(BOOL b)     { return SetNumProperty(IPROP_RESHDRFONTITALIC, b); }
  569.     BOOL SetResHdrGridColor(long l)     { return SetNumProperty(IPROP_RESHDRGRIDCOLOR, l); }
  570.     BOOL SetResHdrGridThickness(int i)    { return SetNumProperty(IPROP_RESHDRGRIDTHICKNESS, i); }
  571.     BOOL SetResHdrResize(BOOL b)        { return SetNumProperty(IPROP_RESHDRRESIZE, b); }
  572.  
  573.     // Resouce Column Properties - (Set)
  574.     void ResColDialog()                 { InitPropup(IPROP_RESCOLDIALOG); }
  575.     BOOL SetResColMax(int i)             { return SetNumProperty(IPROP_RESCOLMAX, i); }
  576.     BOOL SetResColField(int x, int i)     { return SetNumProperty(IPROP_RESCOLFIELD, i, x); }
  577.     BOOL SetResColFormat(int x, LPCSTR s) { return SetStrProperty(IPROP_RESCOLFORMAT, s, x); }
  578.     BOOL SetResColLabel(int x, LPCSTR s) { return SetStrProperty(IPROP_RESCOLLABEL, s, x); }
  579.     BOOL SetResColWidth(int x, int i)    { return SetNumProperty(IPROP_RESCOLWIDTH, i, x); }
  580.     BOOL SetResColAlignment(int x, int i) { return SetNumProperty(IPROP_RESCOLALIGNMENT, i, x); }
  581.     BOOL SetResColVisible(int x, BOOL b) { return SetNumProperty(IPROP_RESCOLVISIBLE, b, x); }
  582.     BOOL SetResColFrozen(int x, BOOL b)    { return SetNumProperty(IPROP_RESCOLFROZEN, b, x); }
  583.     BOOL SetResColEditable(int x, BOOL b) { return SetNumProperty(IPROP_RESCOLEDITABLE, b, x); }
  584.     BOOL SetResColResizable(int x, BOOL b) { return SetNumProperty(IPROP_RESCOLRESIZABLE, b, x); }
  585.  
  586.     // Resource List Properties - (Set)
  587.     void ResDialog()                     { InitPropup(IPROP_RESDIALOG); }
  588.     BOOL SetResMax(int i)                 { return SetNumProperty(IPROP_RESMAX, i); }
  589.     BOOL SetResView(int i)                 { return SetNumProperty(IPROP_RESVIEW, i); }
  590.     BOOL SetResWidth(int i)             { return SetNumProperty(IPROP_RESWIDTH, i); }
  591.     BOOL SetResUnusedBackColor(long l)    { return SetNumProperty(IPROP_RESUNUSEDBACKCOLOR, l); }
  592.     BOOL SetResBevel(int i)             { return SetNumProperty(IPROP_RESBEVEL, i); }
  593.     BOOL SetResGridColor(long l)         { return SetNumProperty(IPROP_RESGRIDCOLOR, l); }
  594.     BOOL SetResGridThickness(int i)        { return SetNumProperty(IPROP_RESGRIDTHICKNESS, i); }
  595.     BOOL SetResWidthResize(BOOL b)        { return SetNumProperty(IPROP_RESWIDTHRESIZE, b); }
  596.     BOOL SetResLineResize(BOOL b)        { return SetNumProperty(IPROP_RESLINERESIZE, b); }
  597.     BOOL SetResCurrentCol(int i)        { return SetNumProperty(IPROP_RESCURRENTCOL, i); }
  598.     BOOL SetResCurrentRow(int i)        { return SetNumProperty(IPROP_RESCURRENTROW, i); }
  599.  
  600.     // Resource Array Properties - (Set)
  601.     BOOL SetResName(int x, LPCSTR s)    { return SetStrProperty(IPROP_RESNAME, s, x); }
  602.     BOOL SetResBarDefault(int x, int i)    { return SetNumProperty(IPROP_RESBARDEFAULT, i, x); }
  603.     BOOL SetResUser1(int x, LPCSTR s)    { return SetStrProperty(IPROP_RESUSER1, s, x); }
  604.     BOOL SetResUser2(int x, LPCSTR s)    { return SetStrProperty(IPROP_RESUSER2, s, x); }
  605.     BOOL SetResUser3(int x, LPCSTR s)    { return SetStrProperty(IPROP_RESUSER3, s, x); }
  606.     BOOL SetResUser4(int x, LPCSTR s)    { return SetStrProperty(IPROP_RESUSER4, s, x); }
  607.     BOOL SetResLineHeight(int x, int i)    { return SetNumProperty(IPROP_RESLINEHEIGHT, i, x); }
  608.     BOOL SetResBackColor(int x, long l) { return SetNumProperty(IPROP_RESBACKCOLOR, l, x); }
  609.     BOOL SetResFontColor(int x, long l) { return SetNumProperty(IPROP_RESFONTCOLOR, l, x); }
  610.     BOOL SetResFontName(int x, CString s) { return SetNumProperty(IPROP_RESFONTNAME, FontNum(s), x); }
  611.     BOOL SetResFontSizePercent(int x, int i) { return SetNumProperty(IPROP_RESFONTSIZEPERCENT, i, x); }
  612.      BOOL SetResFontBold(int x, BOOL b)    { return SetNumProperty(IPROP_RESFONTBOLD, b, x); }
  613.     BOOL SetResFontItalic(int x, BOOL b) { return SetNumProperty(IPROP_RESFONTITALIC, b, x); }
  614.  
  615.     // Resource Method Properties - (Set)    
  616.     BOOL SetResClear()                    { return SetNumProperty(IPROP_RESCLEAR, 0); }
  617.     BOOL SetResDelete(int x, int i)        { return SetNumProperty(IPROP_RESDELETE, i, x); }
  618.     BOOL SetResInsert(int x, int i)        { return SetNumProperty(IPROP_RESINSERT, i, x); }
  619.     BOOL SetResSort(int i)                { return SetNumProperty(IPROP_RESSORT, i); }
  620.     BOOL SetResLoad(LPCSTR s)            { return SetStrProperty(IPROP_RESLOAD, s); }
  621.     BOOL SetResSave(LPCSTR s)            { return SetStrProperty(IPROP_RESSAVE, s); }
  622.  
  623.     // TimeBlock Header Properties - (Set)
  624.        void TBHdrDialog()                     { InitPropup(IPROP_TBHDRDIALOG); }
  625.     BOOL SetTBHdrBackColor(long l)         { return SetNumProperty(IPROP_TBHDRBACKCOLOR, l); }
  626.     BOOL SetTBHdrBevel(int i)             { return SetNumProperty(IPROP_TBHDRBEVEL, i); }
  627.     BOOL SetTBHdrGridColor(long l)         { return SetNumProperty(IPROP_TBHDRGRIDCOLOR, l); }
  628.     BOOL SetTBHdrHeight(int i)            { return SetNumProperty(IPROP_TBHDRHEIGHT, i); }
  629.     
  630.     // TimeBlock Column Properties - (Set)
  631.     void TBColDialog()                     { InitPropup(IPROP_TBCOLDIALOG); }
  632.     BOOL SetTBColMax(int i)             { return SetNumProperty(IPROP_TBCOLMAX, i); }
  633.     BOOL SetTBColField(int x, int i)     { return SetNumProperty(IPROP_TBCOLFIELD, i, x); }
  634.     BOOL SetTBColFormat(int x, LPCSTR s) { return SetStrProperty(IPROP_TBCOLFORMAT, s, x); }
  635.     BOOL SetTBColLabel(int x, LPCSTR s) { return SetStrProperty(IPROP_TBCOLLABEL, s, x); }
  636.     BOOL SetTBColWidth(int x, int i)    { return SetNumProperty(IPROP_TBCOLWIDTH, i, x); }
  637.     BOOL SetTBColAlignment(int x, int i) { return SetNumProperty(IPROP_TBCOLALIGNMENT, i, x); }
  638.     BOOL SetTBColVisible(int x, BOOL b) { return SetNumProperty(IPROP_TBCOLVISIBLE, b, x); }
  639.     BOOL SetTBColFrozen(int x, BOOL b)    { return SetNumProperty(IPROP_TBCOLFROZEN, b, x); }
  640.     BOOL SetTBColEditable(int x, BOOL b) { return SetNumProperty(IPROP_TBCOLEDITABLE, b, x); }
  641.     BOOL SetTBColResizable(int x, BOOL b) { return SetNumProperty(IPROP_TBCOLRESIZABLE, b, x); }
  642.     
  643.     // TimeBlock List Properties - (Set)
  644.     void TBDialog()                     { InitPropup(IPROP_TBDIALOG); }
  645.     BOOL SetTBMax(int i)                 { return SetNumProperty(IPROP_TBMAX, i); }
  646.     BOOL SetTBHeight(int i)             { return SetNumProperty(IPROP_TBHEIGHT, i); }
  647.     BOOL SetTBLineHeight(int i)         { return SetNumProperty(IPROP_TBLINEHEIGHT, i); }
  648.     BOOL SetTBView(int i)                 { return SetNumProperty(IPROP_TBVIEW, i); }
  649.     BOOL SetTBWidth(int i)                 { return SetNumProperty(IPROP_TBWIDTH, i); }
  650.     BOOL SetTBBackColor(long l)            { return SetNumProperty(IPROP_TBBACKCOLOR, l); }
  651.     BOOL SetTBBevel(int i)                 { return SetNumProperty(IPROP_TBBEVEL, i); }
  652.     BOOL SetTBGridColor(long l)         { return SetNumProperty(IPROP_TBGRIDCOLOR, l); }
  653.     BOOL SetTBFontColor(long l)         { return SetNumProperty(IPROP_TBFONTCOLOR, l); }
  654.     BOOL SetTBFontName(CString s)         { return SetNumProperty(IPROP_TBFONTNAME, FontNum(s)); }
  655.     BOOL SetTBFontSizePercent(int i)     { return SetNumProperty(IPROP_TBFONTSIZEPERCENT, i); }
  656.      BOOL SetTBFontBold(BOOL b)            { return SetNumProperty(IPROP_TBFONTBOLD, b); }
  657.     BOOL SetTBFontItalic(BOOL b)         { return SetNumProperty(IPROP_TBFONTITALIC, b); }
  658.     
  659.     // TimeBlock Array Properties - (Set)
  660.     BOOL SetTBResource(int x, int i)    { return SetNumProperty(IPROP_TBRESOURCE, i, x); }
  661.     BOOL SetTBBeg(int x, LPCSTR s)        { return SetStrProperty(IPROP_TBBEG, s, x); }
  662.     BOOL SetTBEnd(int x, LPCSTR s)        { return SetStrProperty(IPROP_TBEND, s, x); }
  663.     BOOL SetTBDur(int x, LPCSTR s)        { return SetStrProperty(IPROP_TBDUR, s, x); }
  664.     BOOL SetTBBar(int x, int i)            { return SetNumProperty(IPROP_TBBAR, i, x); }
  665.     BOOL SetTBGroup(int x, int i)        { return SetNumProperty(IPROP_TBGROUP, i, x); }
  666.     BOOL SetTBUser1(int x, LPCSTR s)    { return SetStrProperty(IPROP_TBUSER1, s, x); }
  667.     BOOL SetTBUser2(int x, LPCSTR s)    { return SetStrProperty(IPROP_TBUSER2, s, x); }
  668.     BOOL SetTBUser3(int x, LPCSTR s)    { return SetStrProperty(IPROP_TBUSER3, s, x); }
  669.     BOOL SetTBUser4(int x, LPCSTR s)    { return SetStrProperty(IPROP_TBUSER4, s, x); }
  670.     
  671.     // TimeBlock Method Properties - (Set)
  672.     BOOL SetTBClear()                    { return SetNumProperty(IPROP_TBCLEAR, 0); }
  673.     BOOL SetTBClearRes(int i)            { return SetNumProperty(IPROP_TBCLEARRES, i); }
  674.     BOOL SetTBDelete(int x, int i)        { return SetNumProperty(IPROP_TBDELETE, i, x); }
  675.     BOOL SetTBLoad(LPCSTR s)            { return SetStrProperty(IPROP_TBLOAD, s); }
  676.     BOOL SetTBSave(LPCSTR s)            { return SetStrProperty(IPROP_TBSAVE, s); }
  677.     
  678.     // Schedule Bar Area Properties - (Set)
  679.     void SchedDialog()                     { InitPropup(IPROP_SCHEDDIALOG); }
  680.     BOOL SetSchedBackColor(long l)         { return SetNumProperty(IPROP_SCHEDBACKCOLOR, l); }
  681.     BOOL SetSchedBevel(int i)             { return SetNumProperty(IPROP_SCHEDBEVEL, i); }
  682.     BOOL SetSchedGridColor(long l)         { return SetNumProperty(IPROP_SCHEDGRIDCOLOR, l); }
  683.     BOOL SetSchedGridThickness(int i)     { return SetNumProperty(IPROP_SCHEDGRIDTHICKNESS, i); }
  684.  
  685.     // Legend Properties - (Set)
  686.     void LegendDialog()                 { InitPropup(IPROP_LEGENDDIALOG); }
  687.     BOOL SetLegendTitle(LPCSTR s)        { return SetStrProperty(IPROP_LEGENDTITLE, s); }
  688.     BOOL SetLegendPosition(int i)         { return SetNumProperty(IPROP_LEGENDPOSITION, i); }
  689.     BOOL SetLegendType(int i)             { return SetNumProperty(IPROP_LEGENDTYPE, i); }
  690.     BOOL SetLegendSize(int i)             { return SetNumProperty(IPROP_LEGENDSIZE, i); }
  691.     BOOL SetLegendLineHeight(int i)     { return SetNumProperty(IPROP_LEGENDLINEHEIGHT, i); }
  692.     BOOL SetLegendBackColor(long l)     { return SetNumProperty(IPROP_LEGENDBACKCOLOR, l); }
  693.     BOOL SetLegendBevel(int i)             { return SetNumProperty(IPROP_LEGENDBEVEL, i); }
  694.     BOOL SetLegendView(int i)             { return SetNumProperty(IPROP_LEGENDVIEW, i); }
  695.     BOOL SetLegendSelection(int i)         { return SetNumProperty(IPROP_LEGENDSELECTION, i); }
  696.     BOOL SetLegendResize(BOOL b)         { return SetNumProperty(IPROP_LEGENDRESIZE, b); }
  697.     
  698.     // Print Properties - (Set)
  699.     BOOL SetPrintLeftMargin(float f)    { return SetFloatProperty(IPROP_PRINTLEFTMARGIN, f); }
  700.     BOOL SetPrintTopMargin(float f)        { return SetFloatProperty(IPROP_PRINTTOPMARGIN, f); }
  701.     BOOL SetPrintRightMargin(float f)    { return SetFloatProperty(IPROP_PRINTRIGHTMARGIN, f); }
  702.     BOOL SetPrintBottomMargin(float f)    { return SetFloatProperty(IPROP_PRINTBOTTOMMARGIN, f); }
  703.     BOOL SetPrintWidth(float f)            { return SetFloatProperty(IPROP_PRINTWIDTH, f); }
  704.     BOOL SetPrintHeight(float f)        { return SetFloatProperty(IPROP_PRINTHEIGHT, f); }
  705.     BOOL SetPrintHeader(int i)            { return SetNumProperty(IPROP_PRINTHEADER, i); }
  706.     BOOL SetPrintHeaderHeight(float f)    { return SetFloatProperty(IPROP_PRINTHEADERHEIGHT, f); }
  707.     BOOL SetPrintHeaderText(LPCSTR s)    { return SetStrProperty(IPROP_PRINTHEADERTEXT, s); }
  708.     BOOL SetPrintHeaderTextHeight(float f) { return SetFloatProperty(IPROP_PRINTHEADERTEXTHEIGHT, f); }
  709.     BOOL SetPrintFooter(int i)            { return SetNumProperty(IPROP_PRINTFOOTER, i); }
  710.     BOOL SetPrintFooterHeight(float f)    { return SetFloatProperty(IPROP_PRINTFOOTERHEIGHT, f); }
  711.     BOOL SetPrintFooterText(LPCSTR s)    { return SetStrProperty(IPROP_PRINTFOOTERTEXT, s); }
  712.     BOOL SetPrintFooterTextHeight(float f) { return SetFloatProperty(IPROP_PRINTFOOTERTEXTHEIGHT, f); }
  713.     BOOL SetPrintShowDialog(BOOL b)     { return SetNumProperty(IPROP_PRINTSHOWDIALOG, b); }
  714.     BOOL SetPrintScreen()                { return SetNumProperty(IPROP_PRINTSCREEN, 0); }
  715.     BOOL SetPrintChart()                { return SetNumProperty(IPROP_PRINTCHART, 0); }
  716.  
  717.  
  718.     // Standard Properties - (Get)
  719.     BOOL GetVisible()                   { return (BOOL)GetNumProperty(IPROP_VISIBLE); }
  720.     CString GetCaption()                   { return GetStrProperty(IPROP_CAPTION); }
  721.     int     GetBorderStyle()                { return (int)GetNumProperty(IPROP_BORDERSTYLE); }
  722.     long GetBackColor()                 { return GetNumProperty(IPROP_BACKCOLOR); }
  723.  
  724.     // General Properties - (Get)
  725.     int  GetDisplayMode()                { return (int)GetNumProperty(IPROP_DISPLAYMODE); }
  726.     long GetBevelHighLightColor()         { return GetNumProperty(IPROP_BEVELHIGHLIGHTCOLOR); }
  727.     long GetBevelShadowColor()             { return GetNumProperty(IPROP_BEVELSHADOWCOLOR); }
  728.     int  GetBevelWidth()                { return (int)GetNumProperty(IPROP_BEVELWIDTH); }
  729.     long GetGridMajorColor()              { return GetNumProperty(IPROP_GRIDMAJORCOLOR); }
  730.     int  GetGridMajorThickness()           { return (int)GetNumProperty(IPROP_GRIDMAJORTHICKNESS); }
  731.     HINSTANCE GetHInstance()            { return (HINSTANCE)GetNumProperty(IPROP_HINSTANCE); }
  732.     BOOL GetProcessTab()                   { return (BOOL)GetNumProperty(IPROP_PROCESSTAB); }
  733.     int  GetDoubleClickDivide()            { return (int)GetNumProperty(IPROP_DOUBLECLICKDIVIDE); }
  734.     BOOL GetRedraw()                       { return (BOOL)GetNumProperty(IPROP_REDRAW); }
  735.     long GetScrollBarColor()               { return GetNumProperty(IPROP_SCROLLBARCOLOR); }
  736.     int  GetScrollBarWidth()               { return (int)GetNumProperty(IPROP_SCROLLBARWIDTH); }
  737.     long GetMonthNumColor()               { return GetNumProperty(IPROP_MONTHNUMCOLOR); }
  738.     int  GetMonthNumSize()               { return (int)GetNumProperty(IPROP_MONTHNUMSIZE); }
  739.     long GetMonthNonNumColor()           { return GetNumProperty(IPROP_MONTHNONNUMCOLOR); }
  740.     int  GetMonthNonNumSize()           { return (int)GetNumProperty(IPROP_MONTHNONNUMSIZE); }
  741.  
  742.     // Date/Time Properties    - (Get)
  743.     long GetCurrentTimeColor()           { return GetNumProperty(IPROP_CURRENTTIMECOLOR); }
  744.     BOOL GetCurrentTimeLine()           { return (BOOL)GetNumProperty(IPROP_CURRENTTIMELINE); }
  745.     CString GetDefaultDateTimeFormat()    { return GetStrProperty(IPROP_DEFAULTDATETIMEFORMAT); }
  746.     CString GetDefaultDurationFormat()    { return GetStrProperty(IPROP_DEFAULTDURATIONFORMAT); }
  747.  
  748.     // Timescale Properties - (Get)
  749.     BOOL GetTSThumbWindow(int x)        { return (BOOL)GetNumProperty(IPROP_TSTHUMBWINDOW, x); }
  750.     long GetTSBackColor(int x)            { return GetNumProperty(IPROP_TSBACKCOLOR, x); }
  751.     int  GetTSBevel(int x)                { return (int)GetNumProperty(IPROP_TSBEVEL, x); }
  752.     long GetTSGridColor(int x)             { return GetNumProperty(IPROP_TSGRIDCOLOR, x); }
  753.     int  GetTSGridThickness(int x)         { return (int)GetNumProperty(IPROP_TSGRIDTHICKNESS, x); }
  754.     int  GetTSMajorPercent(int x)         { return (int)GetNumProperty(IPROP_TSMAJORPERCENT, x); }
  755.     int  GetTSNumMinorTicks(int x)         { return (int)GetNumProperty(IPROP_TSNUMMINORTICKS, x); }
  756.     BOOL GetTSSizeToTick(int x)         { return (int)GetNumProperty(IPROP_TSSIZETOTICK, x); }
  757.     int  GetTSSize(int x)                 { return (int)GetNumProperty(IPROP_TSSIZE, x); }
  758.     int  GetTSMajor(int x)                 { return (int)GetNumProperty(IPROP_TSMAJOR, x); }
  759.     int  GetTSMajorCount(int x)         { return (int)GetNumProperty(IPROP_TSMAJORCOUNT, x); }
  760.     long GetTSMajorFontColor(int x)     { return GetNumProperty(IPROP_TSMAJORFONTCOLOR, x); }
  761.     CString GetTSMajorFontName(int x)     { char szBuf[81]; FontName((int)GetNumProperty(IPROP_TSMAJORFONTNAME, x), szBuf); return szBuf; }
  762.     int  GetTSMajorFontSizePercent(int x) { return (int)GetNumProperty(IPROP_TSMAJORFONTSIZEPERCENT, x); }
  763.     BOOL GetTSMajorFontBold(int x)         { return (BOOL)GetNumProperty(IPROP_TSMAJORFONTBOLD, x); }
  764.     BOOL GetTSMajorFontItalic(int x)     { return (BOOL)GetNumProperty(IPROP_TSMAJORFONTITALIC, x); }
  765.     int  GetTSMajorFontOrient(int x)     { return (int)GetNumProperty(IPROP_TSMAJORFONTORIENT, x); }
  766.     int  GetTSMajorFormat(int x)        { return (int)GetNumProperty(IPROP_TSMAJORFORMAT, x); }
  767.     BOOL GetTSMajorGrid(int x)             { return (BOOL)GetNumProperty(IPROP_TSMAJORGRID, x); }
  768.     int  GetTSMinor(int x)                 { return (int)GetNumProperty(IPROP_TSMINOR, x); }
  769.     int  GetTSMinorCount(int x)         { return (int)GetNumProperty(IPROP_TSMINORCOUNT, x); }
  770.     long GetTSMinorFontColor(int x)     { return GetNumProperty(IPROP_TSMINORFONTCOLOR, x); }
  771.     CString GetTSMinorFontName(int x)     { char szBuf[81]; FontName((int)GetNumProperty(IPROP_TSMINORFONTNAME, x), szBuf); return szBuf; }
  772.     int  GetTSMinorFontSizePercent(int x) { return (int)GetNumProperty(IPROP_TSMINORFONTSIZEPERCENT, x); }
  773.     BOOL GetTSMinorFontBold(int x)         { return (BOOL)GetNumProperty(IPROP_TSMINORFONTBOLD, x); }
  774.     BOOL GetTSMinorFontItalic(int x)     { return (BOOL)GetNumProperty(IPROP_TSMINORFONTITALIC, x); }
  775.     int  GetTSMinorFontOrient(int x)     { return (int)GetNumProperty(IPROP_TSMINORFONTORIENT, x); }
  776.     int  GetTSMinorFormat(int x)        { return (int)GetNumProperty(IPROP_TSMINORFORMAT, x); }
  777.     BOOL GetTSMinorGrid(int x)             { return (BOOL)GetNumProperty(IPROP_TSMINORGRID, x); }
  778.     int  GetTSRulerLarge(int x)            { return (int)GetNumProperty(IPROP_TSRULERLARGE, x); }
  779.     int  GetTSRulerSmall(int x)            { return (int)GetNumProperty(IPROP_TSRULERSMALL, x); }
  780.     long GetTSRulerColor(int x)            { return GetNumProperty(IPROP_TSRULERCOLOR, x); }
  781.     CString GetTSDateTimeBeg(int x)     { return GetStrProperty(IPROP_TSDATETIMEBEG, x); }
  782.     CString GetTSDateTimeEnd(int x)     { return GetStrProperty(IPROP_TSDATETIMEEND, x); }
  783.     CString GetTSDateTimeView(int x)     { return GetStrProperty(IPROP_TSDATETIMEVIEW, x); }
  784.  
  785.     // Bar Properties - (Get)
  786.     int  GetBarsMax()                     { return (int)GetNumProperty(IPROP_BARSMAX); }
  787.     CString GetBarMoveTextFormat()         { return GetStrProperty(IPROP_BARMOVETEXTFORMAT); }
  788.     CString GetBarName(int x)             { return GetStrProperty(IPROP_BARNAME, x); }
  789.     int  GetBarSize(int x)                 { return (int)GetNumProperty(IPROP_BARSIZE, x); }
  790.     int  GetBarOffset(int x)             { return (int)GetNumProperty(IPROP_BAROFFSET, x); }
  791.     long GetBarColor(int x)                 { return GetNumProperty(IPROP_BARCOLOR, x); }
  792.     int  GetBarPattern(int x)            { return (int)GetNumProperty(IPROP_BARPATTERN, x); }
  793.     int  GetBarAdjustable(int x)         { return (int)GetNumProperty(IPROP_BARADJUSTABLE, x); }
  794.     int  GetBarTextPosition(int x)         { return (int)GetNumProperty(IPROP_BARTEXTPOSITION, x); }
  795.     int  GetBarTextField(int x)            { return (int)GetNumProperty(IPROP_BARTEXTFIELD, x); }
  796.     CString GetBarTextFormat(int x)        { return GetStrProperty(IPROP_BARTEXTFORMAT, x); }
  797.     BOOL GetBarTextClip(int x)            { return (BOOL)GetNumProperty(IPROP_BARTEXTCLIP, x); }
  798.     long GetBarFontColor(int x)         { return GetNumProperty(IPROP_BARFONTCOLOR, x); }
  799.     CString GetBarFontName(int x)         { char szBuf[81]; FontName((int)GetNumProperty(IPROP_BARFONTNAME, x), szBuf); return szBuf; }
  800.     int  GetBarFontSizePercent(int x)     { return (int)GetNumProperty(IPROP_BARFONTSIZEPERCENT, x); }
  801.     BOOL GetBarFontBold(int x)             { return (BOOL)GetNumProperty(IPROP_BARFONTBOLD, x); }
  802.     BOOL GetBarFontItalic(int x)         { return (BOOL)GetNumProperty(IPROP_BARFONTITALIC, x); }
  803.     int  GetBarBegSymbol(int x)            { return (int)GetNumProperty(IPROP_BARBEGSYMBOL, x); }
  804.     int  GetBarBegType(int x)            { return (int)GetNumProperty(IPROP_BARBEGTYPE, x); }
  805.     long GetBarBegColor(int x)            { return GetNumProperty(IPROP_BARBEGCOLOR, x); }
  806.     int  GetBarBegSize(int x)            { return (int)GetNumProperty(IPROP_BARBEGSIZE, x); }
  807.     int  GetBarBegOffset(int x)            { return (int)GetNumProperty(IPROP_BARBEGOFFSET, x); }
  808.     int  GetBarEndSymbol(int x)            { return (int)GetNumProperty(IPROP_BARENDSYMBOL, x); }
  809.     int  GetBarEndType(int x)            { return (int)GetNumProperty(IPROP_BARENDTYPE, x); }
  810.     long GetBarEndColor(int x)            { return GetNumProperty(IPROP_BARENDCOLOR, x); }
  811.     int  GetBarEndSize(int x)            { return (int)GetNumProperty(IPROP_BARENDSIZE, x); }
  812.     int  GetBarEndOffset(int x)            { return (int)GetNumProperty(IPROP_BARENDOFFSET, x); }
  813.  
  814.     // Resource Header Properties - (Get)
  815.     int  GetResHdrHeight()                 { return (int)GetNumProperty(IPROP_RESHDRHEIGHT); }
  816.     long GetResHdrBackColor()             { return GetNumProperty(IPROP_RESHDRBACKCOLOR); }
  817.     int  GetResHdrBevel()                 { return (int)GetNumProperty(IPROP_RESHDRBEVEL); }
  818.     long GetResHdrFontColor()             { return GetNumProperty(IPROP_RESHDRFONTCOLOR); }
  819.     CString GetResHdrFontName()            { char szBuf[81]; FontName((int)GetNumProperty(IPROP_RESHDRFONTNAME), szBuf); return szBuf; }
  820.     int  GetResHdrFontSizePercent()     { return (int)GetNumProperty(IPROP_RESHDRFONTSIZEPERCENT); }
  821.      BOOL GetResHdrFontBold()            { return (BOOL)GetNumProperty(IPROP_RESHDRFONTBOLD); }
  822.     BOOL GetResHdrFontItalic()             { return (BOOL)GetNumProperty(IPROP_RESHDRFONTITALIC); }
  823.     long GetResHdrGridColor()             { return GetNumProperty(IPROP_RESHDRGRIDCOLOR); }
  824.     int  GetResHdrGridThickness()        { return (int)GetNumProperty(IPROP_RESHDRGRIDTHICKNESS); }
  825.     BOOL GetResHdrResize()                { return (BOOL)GetNumProperty(IPROP_RESHDRRESIZE); }
  826.  
  827.     // Resouce Column Properties - (Get)
  828.     int  GetResColMax()                 { return (int)GetNumProperty(IPROP_RESCOLMAX); }
  829.     int  GetResColField(int x)             { return (int)GetNumProperty(IPROP_RESCOLFIELD, x); }
  830.     CString GetResColFormat(int x)         { return GetStrProperty(IPROP_RESCOLFORMAT, x); }
  831.     CString GetResColLabel(int x)         { return GetStrProperty(IPROP_RESCOLLABEL, x); }
  832.     int  GetResColWidth(int x)            { return (int)GetNumProperty(IPROP_RESCOLWIDTH, x); }
  833.     int  GetResColAlignment(int x)         { return (int)GetNumProperty(IPROP_RESCOLALIGNMENT, x); }
  834.     BOOL GetResColVisible(int x)         { return (BOOL)GetNumProperty(IPROP_RESCOLVISIBLE, x); }
  835.     BOOL GetResColFrozen(int x)            { return (BOOL)GetNumProperty(IPROP_RESCOLFROZEN, x); }
  836.     BOOL GetResColEditable(int x)         { return (BOOL)GetNumProperty(IPROP_RESCOLEDITABLE, x); }
  837.     BOOL GetResColResizable(int x)         { return (BOOL)GetNumProperty(IPROP_RESCOLRESIZABLE, x); }
  838.  
  839.     // Resource List Properties - (Get)
  840.     int  GetResMax()                     { return (int)GetNumProperty(IPROP_RESMAX); }
  841.     int  GetResView()                     { return (int)GetNumProperty(IPROP_RESVIEW); }
  842.     int  GetResWidth()                     { return (int)GetNumProperty(IPROP_RESWIDTH); }
  843.     long GetResUnusedBackColor()        { return GetNumProperty(IPROP_RESUNUSEDBACKCOLOR); }
  844.     int  GetResBevel()                     { return (int)GetNumProperty(IPROP_RESBEVEL); }
  845.     long GetResGridColor()                 { return GetNumProperty(IPROP_RESGRIDCOLOR); }
  846.     int  GetResGridThickness()            { return (int)GetNumProperty(IPROP_RESGRIDTHICKNESS); }
  847.     BOOL GetResWidthResize()            { return (BOOL)GetNumProperty(IPROP_RESWIDTHRESIZE); }
  848.     BOOL GetResLineResize()                { return (BOOL)GetNumProperty(IPROP_RESLINERESIZE); }
  849.     int  GetResCurrentCol()                { return (int)GetNumProperty(IPROP_RESCURRENTCOL); }
  850.     int  GetResCurrentRow()                { return (int)GetNumProperty(IPROP_RESCURRENTROW); }
  851.  
  852.     // Resource Array Properties - (Get)
  853.     CString GetResName(int x)            { return GetStrProperty(IPROP_RESNAME, x); }
  854.     int  GetResBarDefault(int x)        { return (int)GetNumProperty(IPROP_RESBARDEFAULT, x); }
  855.     CString GetResUser1(int x)            { return GetStrProperty(IPROP_RESUSER1, x); }
  856.     CString GetResUser2(int x)            { return GetStrProperty(IPROP_RESUSER2, x); }
  857.     CString GetResUser3(int x)            { return GetStrProperty(IPROP_RESUSER3, x); }
  858.     CString GetResUser4(int x)            { return GetStrProperty(IPROP_RESUSER4, x); }
  859.     int  GetResLineHeight(int x)        { return (int)GetNumProperty(IPROP_RESLINEHEIGHT, x); }
  860.     long GetResBackColor(int x)         { return GetNumProperty(IPROP_RESBACKCOLOR, x); }
  861.     long GetResFontColor(int x)         { return GetNumProperty(IPROP_RESFONTCOLOR, x); }
  862.     CString GetResFontName(int x)         { char szBuf[81]; FontName((int)GetNumProperty(IPROP_RESFONTNAME, x), szBuf); return szBuf; }
  863.     int  GetResFontSizePercent(int x)     { return (int)GetNumProperty(IPROP_RESFONTSIZEPERCENT, x); }
  864.      BOOL GetResFontBold(int x)            { return (BOOL)GetNumProperty(IPROP_RESFONTBOLD, x); }
  865.     BOOL GetResFontItalic(int x)         { return (BOOL)GetNumProperty(IPROP_RESFONTITALIC, x); }
  866.  
  867.     // Resource Method Properties - (Get)    
  868.     BOOL GetResIsEmpty(int x)            { return (BOOL)GetNumProperty(IPROP_RESISEMPTY, x); }
  869.     int  GetResNextEmpty()                { return (int)GetNumProperty(IPROP_RESNEXTEMPTY); }
  870.  
  871.     // TimeBlock Header Properties - (Get)
  872.     long GetTBHdrBackColor()             { return GetNumProperty(IPROP_TBHDRBACKCOLOR); }
  873.     int  GetTBHdrBevel()                 { return (int)GetNumProperty(IPROP_TBHDRBEVEL); }
  874.     long GetTBHdrGridColor()             { return GetNumProperty(IPROP_TBHDRGRIDCOLOR); }
  875.     int  GetTBHdrHeight()                { return (int)GetNumProperty(IPROP_TBHDRHEIGHT); }
  876.     
  877.     // TimeBlock Column Properties - (Get)
  878.     int  GetTBColMax()                     { return (int)GetNumProperty(IPROP_TBCOLMAX); }
  879.     int  GetTBColField(int x)             { return (int)GetNumProperty(IPROP_TBCOLFIELD, x); }
  880.     CString GetTBColFormat(int x)         { return GetStrProperty(IPROP_TBCOLFORMAT, x); }
  881.     CString GetTBColLabel(int x)         { return GetStrProperty(IPROP_TBCOLLABEL, x); }
  882.     int  GetTBColWidth(int x)            { return (int)GetNumProperty(IPROP_TBCOLWIDTH, x); }
  883.     int  GetTBColAlignment(int x)         { return (int)GetNumProperty(IPROP_TBCOLALIGNMENT, x); }
  884.     BOOL GetTBColVisible(int x)         { return (BOOL)GetNumProperty(IPROP_TBCOLVISIBLE, x); }
  885.     BOOL GetTBColFrozen(int x)            { return (BOOL)GetNumProperty(IPROP_TBCOLFROZEN, x); }
  886.     BOOL GetTBColEditable(int x)         { return (BOOL)GetNumProperty(IPROP_TBCOLEDITABLE, x); }
  887.     BOOL GetTBColResizable(int x)         { return (BOOL)GetNumProperty(IPROP_TBCOLRESIZABLE, x); }
  888.     
  889.     // TimeBlock List Properties - (Get)
  890.     int  GetTBMax()                     { return (int)GetNumProperty(IPROP_TBMAX); }
  891.     int  GetTBHeight()                     { return (int)GetNumProperty(IPROP_TBHEIGHT); }
  892.     int  GetTBLineHeight()                 { return (int)GetNumProperty(IPROP_TBLINEHEIGHT); }
  893.     int  GetTBView()                     { return (int)GetNumProperty(IPROP_TBVIEW); }
  894.     int  GetTBWidth()                     { return (int)GetNumProperty(IPROP_TBWIDTH); }
  895.     long GetTBBackColor()                { return GetNumProperty(IPROP_TBBACKCOLOR); }
  896.     int  GetTBBevel()                     { return (int)GetNumProperty(IPROP_TBBEVEL); }
  897.     long GetTBGridColor()                 { return GetNumProperty(IPROP_TBGRIDCOLOR); }
  898.     long GetTBFontColor()                 { return GetNumProperty(IPROP_TBFONTCOLOR); }
  899.     CString GetTBFontName()             { char szBuf[81]; FontName((int)GetNumProperty(IPROP_TBFONTNAME), szBuf); return szBuf; }
  900.     int  GetTBFontSizePercent()         { return (int)GetNumProperty(IPROP_TBFONTSIZEPERCENT); }
  901.      BOOL GetTBFontBold()                { return (BOOL)GetNumProperty(IPROP_TBFONTBOLD); }
  902.     BOOL GetTBFontItalic()                 { return (BOOL)GetNumProperty(IPROP_TBFONTITALIC); }
  903.     
  904.     // TimeBlock Array Properties - (Get)
  905.     int  GetTBResource(int x)            { return (int)GetNumProperty(IPROP_TBRESOURCE, x); }
  906.     CString GetTBBeg(int x)                { return GetStrProperty(IPROP_TBBEG, x); }
  907.     CString GetTBEnd(int x)                { return GetStrProperty(IPROP_TBEND, x); }
  908.     CString GetTBDur(int x)                { return GetStrProperty(IPROP_TBDUR, x); }
  909.     int  GetTBBar(int x)                { return (int)GetNumProperty(IPROP_TBBAR, x); }
  910.     int  GetTBGroup(int x)                { return (int)GetNumProperty(IPROP_TBGROUP, x); }
  911.     CString GetTBUser1(int x)            { return GetStrProperty(IPROP_TBUSER1, x); }
  912.     CString GetTBUser2(int x)            { return GetStrProperty(IPROP_TBUSER2, x); }
  913.     CString GetTBUser3(int x)            { return GetStrProperty(IPROP_TBUSER3, x); }
  914.     CString GetTBUser4(int x)            { return GetStrProperty(IPROP_TBUSER4, x); }
  915.     
  916.     // TimeBlock Method Properties - (Get)
  917.     BOOL GetTBIsEmpty(int x)            { return (BOOL)GetNumProperty(IPROP_TBISEMPTY, x); }
  918.     int  GetTBNextEmpty()                { return (int)GetNumProperty(IPROP_TBNEXTEMPTY); }
  919.     
  920.     // Schedule Bar Area Properties - (Get)
  921.     long GetSchedBackColor()             { return GetNumProperty(IPROP_SCHEDBACKCOLOR); }
  922.     int  GetSchedBevel()                 { return (int)GetNumProperty(IPROP_SCHEDBEVEL); }
  923.     long GetSchedGridColor()             { return GetNumProperty(IPROP_SCHEDGRIDCOLOR); }
  924.     int  GetSchedGridThickness()         { return (int)GetNumProperty(IPROP_SCHEDGRIDTHICKNESS); }
  925.  
  926.     // Legend Properties - (Get)
  927.     CString GetLegendTitle()            { return GetStrProperty(IPROP_LEGENDTITLE); }
  928.     int  GetLegendPosition()             { return (int)GetNumProperty(IPROP_LEGENDPOSITION); }
  929.     int  GetLegendType()                 { return (int)GetNumProperty(IPROP_LEGENDTYPE); }
  930.     int  GetLegendSize()                 { return (int)GetNumProperty(IPROP_LEGENDSIZE); }
  931.     int  GetLegendLineHeight()             { return (int)GetNumProperty(IPROP_LEGENDLINEHEIGHT); }
  932.     long GetLegendBackColor()             { return GetNumProperty(IPROP_LEGENDBACKCOLOR); }
  933.     int  GetLegendBevel()                 { return (int)GetNumProperty(IPROP_LEGENDBEVEL); }
  934.     int  GetLegendView()                 { return (int)GetNumProperty(IPROP_LEGENDVIEW); }
  935.     int  GetLegendSelection()             { return (int)GetNumProperty(IPROP_LEGENDSELECTION); }
  936.     BOOL GetLegendResize()                 { return (BOOL)GetNumProperty(IPROP_LEGENDRESIZE); }
  937.     
  938.     // Print Properties - (Get)
  939.     float GetPrintLeftMargin()            { return (float)GetFloatProperty(IPROP_PRINTLEFTMARGIN); }
  940.     float GetPrintTopMargin()            { return (float)GetFloatProperty(IPROP_PRINTTOPMARGIN); }
  941.     float GetPrintRightMargin()            { return (float)GetFloatProperty(IPROP_PRINTRIGHTMARGIN); }
  942.     float GetPrintBottomMargin()        { return (float)GetFloatProperty(IPROP_PRINTBOTTOMMARGIN); }
  943.     float GetPrintWidth()                { return (float)GetFloatProperty(IPROP_PRINTWIDTH); }
  944.     float GetPrintHeight()                { return (float)GetFloatProperty(IPROP_PRINTHEIGHT); }
  945.     int   GetPrintHeader()                { return (int)GetNumProperty(IPROP_PRINTHEADER); }
  946.     float GetPrintHeaderHeight()        { return (float)GetFloatProperty(IPROP_PRINTHEADERHEIGHT); }
  947.     CString GetPrintHeaderText()        { return GetStrProperty(IPROP_PRINTHEADERTEXT); }
  948.     float GetPrintHeaderTextHeight()     { return (float)GetFloatProperty(IPROP_PRINTHEADERTEXTHEIGHT); }
  949.     int   GetPrintFooter()                { return (int)GetNumProperty(IPROP_PRINTFOOTER); }
  950.     float GetPrintFooterHeight()        { return (float)GetFloatProperty(IPROP_PRINTFOOTERHEIGHT); }
  951.     CString GetPrintFooterText()        { return GetStrProperty(IPROP_PRINTFOOTERTEXT); }
  952.     float GetPrintFooterTextHeight()     { return (float)GetFloatProperty(IPROP_PRINTFOOTERTEXTHEIGHT); }
  953.     BOOL GetPrintShowDialog()             { return (BOOL)GetNumProperty(IPROP_PRINTSHOWDIALOG); }
  954.  
  955.  
  956.     // DLL Calls
  957.  
  958.     // AddBar - adds a bar definition to the Bar Array
  959.     int AddBar(int iIndex, LPCSTR szBarName,
  960.                 int iSizePercent, int iOffsetPercent, 
  961.                 long lColor, int iPattern, int iAdjustable,
  962.                 int iTextPos, int iTextField, LPCSTR szTextFormat, int iTextClip,
  963.                 long lFontColor, LPCSTR szFontName, int iFontSizePercent,
  964.                 int iFontBold, int iFontItalic,
  965.                 int iBegSymbol, int iBegType, long lBegColor,
  966.                 int iBegSizePercent, int iBegOffsetPercent,
  967.                 int iEndSymbol, int iEndType, long lEndColor,
  968.                 int iEndSizePercent, int iEndOffsetPercent )
  969.     {
  970.         int (FAR PASCAL *lpfnAddBar) (HCTL, int, LPCSTR, int,
  971.                 int, long, int, int, int, int, LPCSTR, int,
  972.                 long, LPCSTR, int, int, int, int, int, long,
  973.                 int, int, int, int, long, int, int);
  974.  
  975.         lpfnAddBar = (int (FAR PASCAL *)(HCTL, int, LPCSTR, int,
  976.                 int, long, int, int, int, int, LPCSTR, int,
  977.                 long, LPCSTR, int, int, int, int, int, long,
  978.                 int, int, int, int, long, int, int))
  979.                     GetProcAddress(GetHInstance(), "SchedVBXAddBar");
  980.  
  981.         if (lpfnAddBar == NULL)
  982.             return -1;
  983.  
  984.         return ((*lpfnAddBar) (m_hCtl, iIndex, szBarName,
  985.                 iSizePercent, iOffsetPercent, lColor, iPattern,
  986.                 iAdjustable, iTextPos, iTextField, szTextFormat,
  987.                 iTextClip, lFontColor, szFontName, iFontSizePercent,
  988.                 iFontBold, iFontItalic,
  989.                 iBegSymbol, iBegType, lBegColor, iBegSizePercent, iBegOffsetPercent,
  990.                 iEndSymbol, iEndType, lEndColor, iEndSizePercent, iEndOffsetPercent ));
  991.     }
  992.  
  993.     // AddResource - Adds a resource definition to the Resource Array
  994.     int AddResource(int iIndex, LPCSTR szResourceName,
  995.                 int iBarDefault, LPCSTR szUser1, LPCSTR szUser2,
  996.                 LPCSTR szUser3, LPCSTR szUser4,
  997.                 int iLineHeight, long lBackColor, long lFontColor,
  998.                 LPCSTR szFontName, int iFontSizePercent,
  999.                 int iFontBold, int iFontItalic )
  1000.     {
  1001.         int (FAR PASCAL *lpfnAddResource) (HCTL, int, LPCSTR, int,
  1002.                 LPCSTR, LPCSTR, LPCSTR, LPCSTR, int, long, long,
  1003.                 LPCSTR, int, int, int);
  1004.  
  1005.         lpfnAddResource = (int (FAR PASCAL *)(HCTL, int, LPCSTR, int,
  1006.                 LPCSTR, LPCSTR, LPCSTR, LPCSTR, int, long, long,
  1007.                 LPCSTR, int, int, int))
  1008.                     GetProcAddress(GetHInstance(), "SchedVBXAddResource");
  1009.  
  1010.         if (lpfnAddResource == NULL)
  1011.             return -1;
  1012.  
  1013.         return ((*lpfnAddResource) (m_hCtl, iIndex, szResourceName,
  1014.                 iBarDefault, szUser1, szUser2, szUser3, szUser4,
  1015.                 iLineHeight, lBackColor, lFontColor,
  1016.                 szFontName, iFontSizePercent, iFontBold, iFontItalic ));
  1017.     }
  1018.  
  1019.     // AddTimeBlock - Adds a timeblock definition to the TimeBlock Array
  1020.     int AddTimeBlock(int iIndex, int iResource,
  1021.                     LPCSTR szBeg, LPCSTR szEnd, LPCSTR szDur,
  1022.                     int iBar, int iGroup, LPCSTR szUser1,
  1023.                     LPCSTR szUser2, LPCSTR szUser3, LPCSTR szUser4 )
  1024.     {
  1025.         int (FAR PASCAL *lpfnAddTimeBlock) (HCTL, int, int,
  1026.                     LPCSTR, LPCSTR, LPCSTR, int, int,
  1027.                     LPCSTR, LPCSTR, LPCSTR, LPCSTR );
  1028.  
  1029.         lpfnAddTimeBlock = (int (FAR PASCAL *)(HCTL, int, int,
  1030.                     LPCSTR, LPCSTR, LPCSTR, int, int,
  1031.                     LPCSTR, LPCSTR, LPCSTR, LPCSTR ))
  1032.                     GetProcAddress(GetHInstance(), "SchedVBXAddTimeBlock");
  1033.  
  1034.         if (lpfnAddTimeBlock == NULL)
  1035.             return -1;
  1036.  
  1037.         return ((*lpfnAddTimeBlock) (m_hCtl, iIndex, iResource,
  1038.                     szBeg, szEnd, szDur, iBar, iGroup,
  1039.                     szUser1, szUser2, szUser3, szUser4 ));
  1040.     }
  1041.  
  1042.     // FindTimeBlock - Finds a TimeBlock for a Resource
  1043.     int FindTimeBlock(int iBegTB, int iResource)
  1044.     {
  1045.         int (FAR PASCAL *lpfnFindTimeBlock) (HCTL, int, int);
  1046.  
  1047.         lpfnFindTimeBlock = (int (FAR PASCAL *)(HCTL, int, int))
  1048.                     GetProcAddress(GetHInstance(), "SchedVBXFindTimeBlock");
  1049.  
  1050.         if (lpfnFindTimeBlock == NULL)
  1051.             return -1;
  1052.  
  1053.         return ((*lpfnFindTimeBlock) (m_hCtl, iBegTB, iResource));
  1054.     }
  1055.  
  1056.     // FindFreeTimeBlock - Finds a free TimeBlock for a Resource
  1057.     int FindFreeTimeBlock(int iResource, LPCSTR szBeg, LPCSTR szDur)
  1058.     {
  1059.         int (FAR PASCAL *lpfnFindFreeTimeBlock) (HCTL, int, LPCSTR, LPCSTR);
  1060.  
  1061.         lpfnFindFreeTimeBlock = (int (FAR PASCAL *)(HCTL, int, LPCSTR, LPCSTR))
  1062.                     GetProcAddress(GetHInstance(), "SchedVBXFindFreeTimeBlock");
  1063.  
  1064.         if (lpfnFindFreeTimeBlock == NULL)
  1065.             return -1;
  1066.  
  1067.         return ((*lpfnFindFreeTimeBlock) (m_hCtl, iResource, szBeg, szDur));
  1068.     }
  1069.  
  1070.     // ResourceNum - Returns a Resource Number based on Resource Name
  1071.     int ResourceNum(LPCSTR szResourceName)
  1072.     {
  1073.         int (FAR PASCAL *lpfnResourceNum) (HCTL, LPCSTR);
  1074.  
  1075.         lpfnResourceNum = (int (FAR PASCAL *)(HCTL, LPCSTR))
  1076.                     GetProcAddress(GetHInstance(), "SchedVBXResourceNum");
  1077.  
  1078.         if (lpfnResourceNum == NULL)
  1079.             return -1;
  1080.  
  1081.         return ((*lpfnResourceNum) (m_hCtl, szResourceName));
  1082.     }
  1083.  
  1084.     // PointToTime - Converts a Point (X/Y) to a Time Value
  1085.     int PointToTime(int iX, int iY, LPSTR szTime)
  1086.     {
  1087.         int (FAR PASCAL *lpfnPointToTime) (HCTL, int, int, LPSTR);
  1088.  
  1089.         lpfnPointToTime = (int (FAR PASCAL *)(HCTL, int, int, LPSTR))
  1090.                     GetProcAddress(GetHInstance(), "SchedVBXPointToTime");
  1091.  
  1092.         if (lpfnPointToTime == NULL)
  1093.             return -1;
  1094.  
  1095.         return ((*lpfnPointToTime) (m_hCtl, iX, iY, szTime));
  1096.     }
  1097.  
  1098.     // TimeToPoint - Converts a Time Value to a Point (X/Y)
  1099.     int TimeToPoint(LPCSTR szTime, int FAR *iX, int FAR *iY)
  1100.     {
  1101.         int (FAR PASCAL *lpfnTimeToPoint) (HCTL, LPCSTR, int FAR *, int FAR *);
  1102.  
  1103.         lpfnTimeToPoint = (int (FAR PASCAL *)(HCTL, LPCSTR, int FAR *, int FAR *))
  1104.                     GetProcAddress(GetHInstance(), "SchedVBXTimeToPoint");
  1105.  
  1106.         if (lpfnTimeToPoint == NULL)
  1107.             return -1;
  1108.  
  1109.         return ((*lpfnTimeToPoint) (m_hCtl, szTime, iX, iY));
  1110.     }
  1111.  
  1112.     // PointToResource - Converts a Point (X/Y) to a Resource Number
  1113.     int PointToResource(int iX, int iY)
  1114.     {
  1115.         int (FAR PASCAL *lpfnPointToResource) (HCTL, int, int);
  1116.  
  1117.         lpfnPointToResource = (int (FAR PASCAL *)(HCTL, int, int))
  1118.                     GetProcAddress(GetHInstance(), "SchedVBXPointToResource");
  1119.  
  1120.         if (lpfnPointToResource == NULL)
  1121.             return -1;
  1122.  
  1123.         return ((*lpfnPointToResource) (m_hCtl, iX, iY));
  1124.     }
  1125.  
  1126.     // ResourceToPoint - Converts a Resource Number to a Point (X/Y)
  1127.     int ResourceToPoint(int iResource, int FAR *iX, int FAR *iY)
  1128.     {
  1129.         int (FAR PASCAL *lpfnResourceToPoint) (HCTL, int, int FAR *, int FAR *);
  1130.  
  1131.         lpfnResourceToPoint = (int (FAR PASCAL *)(HCTL, int, int FAR *, int FAR *))
  1132.                     GetProcAddress(GetHInstance(), "SchedVBXResourceToPoint");
  1133.  
  1134.         if (lpfnResourceToPoint == NULL)
  1135.             return -1;
  1136.  
  1137.         return ((*lpfnResourceToPoint) (m_hCtl, iResource, iX, iY));
  1138.     }
  1139.  
  1140.     // PointToLegend - Converts a Point (X/Y) to a Legend List Number
  1141.     int PointToLegend(int iX, int iY)
  1142.     {
  1143.         int (FAR PASCAL *lpfnPointToLegend) (HCTL, int, int);
  1144.  
  1145.         lpfnPointToLegend = (int (FAR PASCAL *)(HCTL, int, int))
  1146.                     GetProcAddress(GetHInstance(), "SchedVBXPointToLegend");
  1147.  
  1148.         if (lpfnPointToLegend == NULL)
  1149.             return -1;
  1150.  
  1151.         return ((*lpfnPointToLegend) (m_hCtl, iX, iY));
  1152.     }
  1153.  
  1154.     // LegendToPoint - Converts a Legend List Number to a Point (X/Y)
  1155.     int LegendToPoint(int iLegend, int FAR *iX, int FAR *iY)
  1156.     {
  1157.         int (FAR PASCAL *lpfnLegendToPoint) (HCTL, int, int FAR *, int FAR *);
  1158.  
  1159.         lpfnLegendToPoint = (int (FAR PASCAL *)(HCTL, int, int FAR *, int FAR *))
  1160.                     GetProcAddress(GetHInstance(), "SchedVBXLegendToPoint");
  1161.  
  1162.         if (lpfnLegendToPoint == NULL)
  1163.             return -1;
  1164.  
  1165.         return ((*lpfnLegendToPoint) (m_hCtl, iLegend, iX, iY));
  1166.     }
  1167.  
  1168.     // PointToBar - Converts a Point (X/Y) to a Bar #
  1169.     //        returns position of point on bar & sets TimeBlock #
  1170.     int PointToBar(int iX, int iY, int FAR *iTimeBlock)
  1171.     {
  1172.         int (FAR PASCAL *lpfnPointToBar) (HCTL, int, int, int FAR *);
  1173.  
  1174.         lpfnPointToBar = (int (FAR PASCAL *)(HCTL, int, int, int FAR *))
  1175.                     GetProcAddress(GetHInstance(), "SchedVBXPointToBar");
  1176.  
  1177.         if (lpfnPointToBar == NULL)
  1178.             return -1;
  1179.  
  1180.         return ((*lpfnPointToBar) (m_hCtl, iX, iY, iTimeBlock));
  1181.     }
  1182.  
  1183.     // FontNum - returns Font # based on Font Name
  1184.     int FontNum(LPCSTR szFontName)
  1185.     {
  1186.         int (FAR PASCAL *lpfnFontNum) (HCTL, LPCSTR);
  1187.  
  1188.         lpfnFontNum = (int (FAR PASCAL *)(HCTL, LPCSTR))
  1189.                     GetProcAddress(GetHInstance(), "SchedVBXFontNum");
  1190.  
  1191.         if (lpfnFontNum == NULL)
  1192.             return -1;
  1193.  
  1194.         return ((*lpfnFontNum) (m_hCtl, szFontName));
  1195.     }
  1196.  
  1197.     // FontName - returns Font Name based on Font #
  1198.     int FontName(int iFontNum, LPSTR szFontName)
  1199.     {
  1200.         int (FAR PASCAL *lpfnFontName) (HCTL, int, LPSTR);
  1201.  
  1202.         lpfnFontName = (int (FAR PASCAL *)(HCTL, int, LPSTR))
  1203.                     GetProcAddress(GetHInstance(), "SchedVBXFontNum");
  1204.  
  1205.         if (lpfnFontName == NULL)
  1206.             return -1;
  1207.  
  1208.         return ((*lpfnFontName) (m_hCtl, iFontNum, szFontName));
  1209.     }
  1210.  
  1211.  
  1212.     // Event Parameter extraction routines
  1213.     
  1214.     // Fetches a string parameter from event stack
  1215.     BOOL GetEventParamString(LPVOID data, int iIndex, LPSTR lpstr) {
  1216.         BOOL (FAR PASCAL *lpfnGetEventParamString) (LPVOID, int, LPSTR);
  1217.  
  1218.         lpfnGetEventParamString = (BOOL (FAR PASCAL *)(LPVOID, int, LPSTR))
  1219.             GetProcAddress(GetHInstance(), "SchedVBXGetEventParamString");
  1220.  
  1221.         if (lpfnGetEventParamString == NULL) {
  1222.             *lpstr = 0;
  1223.             return FALSE;
  1224.         }
  1225.  
  1226.         return ((*lpfnGetEventParamString) (data, iIndex, lpstr));
  1227.     }
  1228.  
  1229.     // Fetches an int parameter from event stack
  1230.     BOOL GetEventParamInt(LPVOID data, int iIndex, int FAR *iPtr) {
  1231.         int (FAR PASCAL *lpfnGetEventParamInt) (LPVOID, int);
  1232.  
  1233.         lpfnGetEventParamInt = (int (FAR PASCAL *)(LPVOID, int))
  1234.             GetProcAddress(GetHInstance(), "SchedVBXGetEventParamInt");
  1235.  
  1236.         if (lpfnGetEventParamInt == NULL) {
  1237.             *iPtr = 0;
  1238.             return FALSE;
  1239.         }
  1240.  
  1241.         *iPtr = ((*lpfnGetEventParamInt) (data, iIndex));
  1242.         
  1243.         return TRUE;
  1244.     }
  1245.     
  1246. protected:
  1247. };
  1248.  
  1249. #endif
  1250.