home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / inotepad / global.bas next >
BASIC Source File  |  1992-06-14  |  11KB  |  310 lines

  1.     DefInt A-Z
  2.  
  3. Type MhMuscleType
  4.  
  5.     Shift                   As Integer
  6.     Scan                    As Integer
  7.     Ascii                   As Integer
  8.     Lb                      As Integer
  9.     Rb                      As Integer
  10.     RbTerminateAscii        As Integer
  11.     RbTerminateScan         As Integer
  12.     CursorNormalStart       As Integer
  13.     CursorNormalEnd         As Integer
  14.     CursorInsertStart       As Integer
  15.     CursorInsertEnd         As Integer
  16.     MonitorSeg              As Integer
  17.     MonitorType             As Integer
  18.     MonitorRows             As Integer
  19.     MonitorColumns          As Integer
  20.     VideoMode               As Integer
  21.     MouseInstalled          As Integer
  22.     Verify                  As Integer
  23.     CaseSens                As Integer
  24.     TableSize               As Integer
  25.     DontRestore             As Integer
  26.     TopRow                  As Integer
  27.     LeftColumn              As Integer
  28.     BottomRow               As Integer
  29.     RightColumn             As Integer
  30.     BoxType                 As Integer
  31.     BoxColor                As Long
  32.     ShadowColor             As Long
  33.     ShadowPosition          As Integer
  34.     FillColor               As Long
  35.     InverseColor            As Long
  36.     HighlightColor          As Long
  37.     NormalColor             As Long
  38.     TitleColor              As Long
  39.     WordWrapWidth           As Integer
  40.     LastElement             As Integer
  41.     TabStop                 As Integer
  42.     SelectionWrap           As Integer
  43.     DeselectColor           As Long
  44.     DeselectInverseColor    As Long
  45.     BarColor                As Long
  46.     InverseBarColor         As Long
  47.     KeyHighlightColor       As Long
  48.     DescriptionRow          As Integer
  49.     DescriptionColor        As Long
  50.     MenuNumber              As Integer
  51.     SelectionNumber         As Integer
  52.     Range                   As Integer
  53.     Month                   As Integer
  54.     Day                     As Integer
  55.     Year                    As Integer
  56.     Startyear               As Integer
  57.     DisplayMode             As Integer
  58.     ForceRead               As Integer
  59.     MemSeg                  As Integer
  60.     MemOffset               As Integer
  61.     MaxFiles                As Integer
  62.     Fillcharacter           As Integer
  63.     SoundOff                As Integer
  64.     Gen1                    As Integer
  65.     Gen2                    As Integer
  66.     Gen3                    As Integer
  67.     Gen4                    As Integer
  68.     ShadowColumns           As Integer
  69.     ShadowRows              As Integer
  70.     SnowCheck               As Integer
  71.     Drive                   As Integer
  72.     FileAttributes          As Integer
  73.     DosMajorVersion         As Integer
  74.     DosMinorVersion         As Integer
  75.     MouseStatus             As Integer
  76.     ExitIfMouseOutside      As Integer
  77.     HugeArrayNum            As Integer
  78.     AutoTerminate           As Integer
  79.     DefaultInsertState      As Integer
  80.     GeneralCount            As Integer
  81.     GenLong1                As Long
  82.     GenLong2                As Long
  83.     Bytes                   As Long
  84.     CurrentPos              As Integer
  85.     NoDestroy               As Integer
  86.  
  87. End Type
  88.  
  89. Type MhPopupMenuType
  90.  
  91. ' Special TYPE used by MhPUxxx routines
  92.  
  93.     PMFlags As Integer
  94.     PMPopUpID As Integer        ' Either ID number or handle of bitmap if MF_BITMAP flag is set
  95.     PMString As String
  96.     PMBitMap As Integer
  97. End Type
  98.  
  99. Type MhChooseFontType
  100.  
  101.      hWnd   As Integer
  102.      Hdc    As Integer
  103.      LogFont    As Long
  104.      pointSize  As Integer
  105.      Flags  As Long
  106.      RgbColor   As Long
  107.      Reserved2  As Long
  108.      Reserved3  As Long
  109.      Reserved4  As Long
  110.      Reserved5  As Integer
  111.      Reserved6  As Long
  112.      FontType   As Integer
  113.      MinSize    As Integer
  114.      MaxSize    As Integer
  115.     End Type
  116.     Type MhLogFontType
  117.         FontHeight As Integer
  118.         FontWidth As Integer
  119.         FontEscapement As Integer
  120.         FontOrientation As Integer
  121.         FontWeight As Integer
  122.         FontItalic As String * 1
  123.         FontUnderline As String * 1
  124.         FontStrikeout As String * 1
  125.         FontCharSet As String * 1
  126.         FontOutPrecision As String * 1
  127.         FontClipPrecision As String * 1
  128.         FontQuality As String * 1
  129.         FontPitchAndFamily As String * 1
  130.         FontFaceName As String * 32
  131.     End Type
  132.  
  133. Type MhPrintDlgType
  134.          hWnd As Integer
  135.          DevMode As Integer
  136.          DevNames As Integer
  137.          Hdc As Integer
  138.          Flags As Long
  139.          FromPage As Integer
  140.          ToPage As Integer
  141.          MinPage As Integer
  142.          MaxPage As Integer
  143.          Copies As Integer
  144.     End Type
  145.  
  146. Type MhGetFileType
  147.      hWnd As Integer
  148.      FilterIndex As Long
  149.      InitFileName As String
  150.      FormCaption As String
  151.      InitDir As String
  152.      DefaultExtension As String
  153.      HowManyFilters As Integer
  154.      Flags As Long
  155.      RawNamePos As Integer
  156.      ExtensionPos As Integer
  157. End Type
  158.  
  159. Type MhFileFilterType
  160.      Description As String
  161.      Mask As String
  162. End Type
  163.  
  164. Type MhStrType
  165.     VStr    As String
  166. End Type
  167.  
  168.  
  169. Declare Function GetMenuCheckMarkDimensions& Lib "user" ()
  170. Declare Function MhECode% Lib "muscle.vbx" ()
  171. Declare Function MhBkwdInstrChar% Lib "muscle.vbx" (ByVal Start%, ByVal Char%, Target$)
  172. Declare Function MhBkwdInstrNS% Lib "muscle.vbx" (ByVal Start%, Larger$, Pattern$)
  173. Declare Function MhBkwdInstrS% Lib "muscle.vbx" (ByVal Start%, Larger$, Pattern$)
  174. Declare Function MhChooseFont% Lib "muscle.vbx" (Y As MhLogFontType, X As MhChooseFontType)
  175. Declare Function MhCommandM$ Lib "muscle.vbx" ()
  176. Declare Function MhCtrlHwnd% Lib "muscle.vbx" (A As Control)
  177. Declare Function MhFileExists% Lib "muscle.vbx" (ByVal FileSpec$)
  178. Declare Function MhFindText% Lib "muscle.vbx" (ByVal KeyCode%, ByVal hWnd%, Flags&, Find$)
  179. Declare Function MhFwdInstrChar% Lib "muscle.vbx" (ByVal Start%, ByVal Char%, Target$)
  180. Declare Function MhFwdInstrNS% Lib "muscle.vbx" (ByVal Start%, Larger$, Pattern$)
  181. Declare Function MhFwdInstrS% Lib "muscle.vbx" (ByVal Start%, Larger$, Pattern$)
  182. Declare Function MhGet% Lib "muscle.vbx" (Variable As Any, RecNumber&, ByVal handle%)
  183. Declare Function MhGetFileTitle$ Lib "muscle.vbx" (ByVal A$)
  184. Declare Function MhGetOpenFileNAme$ Lib "muscle.vbx" (X As MhGetFileType, Y As MhFileFilterType)
  185. Declare Function MhGetSaveFileNAme$ Lib "muscle.vbx" (X As MhGetFileType, Y As MhFileFilterType)
  186. Declare Function MhGetTextDialog% Lib "muscle.vbx" (Replace$, Flags&, Find$)
  187. Declare Sub MhKillDialog Lib "muscle.vbx" ()
  188. Declare Function MhNotInstrBkwd% Lib "muscle.vbx" (ByVal Start%, ByVal Char%, Target$)
  189. Declare Function MhNotInstrFwd% Lib "muscle.vbx" (ByVal Start%, ByVal Char%, Target$)
  190. Declare Function MhPrintDlg% Lib "muscle.vbx" (X As MhPrintDlgType)
  191. Declare Function MhPrintDlgDef% Lib "muscle.vbx" (X As MhPrintDlgType)
  192. Declare Function MhPUCreate% Lib "muscle.vbx" (M As MhPopupMenuType, ByVal HowMany%)
  193. Declare Function MhPUTrack% Lib "muscle.vbx" (ByVal MainHwnd%, ByVal hMenu%, ByVal Y%, ByVal X%)
  194. Declare Function MhPuKill% Lib "muscle.vbx" (ByVal hMenu%)
  195. Declare Function MhReplaceChar$ Lib "muscle.vbx" (Lin$, ByVal OldChar%, ByVal NewChar%)
  196. Declare Function MhReplaceStr$ Lib "muscle.vbx" (Count%, Lin$, Unwanted$, Replacement$)
  197. Declare Function MhReplaceText% Lib "muscle.vbx" (Replace$, ByVal KeyCode%, ByVal hWnd%, Flags&, Find$)
  198. Declare Function MhSetFont% Lib "muscle.vbx" (ByVal hWnd%, ByVal RedrawNow%, Y As MhLogFontType)
  199. Declare Function MhWinDir$ Lib "muscle.vbx" ()
  200. Declare Function MhWinVersion% Lib "muscle.vbx" (Major%, Minor%)
  201.  
  202. ' MhFindText and MhReplaceText Values
  203. Global Const FR_DOWN = &H1
  204. Global Const FR_WHOLEWORD = &H2
  205. Global Const FR_MATCHCASE = &H4
  206. Global Const FR_FINDNEXT = &H8
  207. Global Const FR_REPLACE = &H10
  208. Global Const FR_REPLACEALL = &H20
  209. Global Const FR_SHOWHELP = &H80
  210. Global Const FR_NOUPDOWN = &H400
  211. Global Const FR_NOMATCHCASE = &H800
  212. Global Const FR_NOWHOLEWORD = &H1000
  213.  
  214. ' MhPrintDlg Values
  215. Global Const PD_ALLPAGES = &H0
  216. Global Const PD_SELECTION = &H1
  217. Global Const PD_PAGENUMS = &H2
  218. Global Const PD_NOSELECTION = &H4
  219. Global Const PD_NOPAGENUMS = &H8
  220. Global Const PD_COLLATE = &H10
  221. Global Const PD_PRINTTOFILE = &H20
  222. Global Const PD_PRINTSETUP = &H40
  223. Global Const PD_NOWARNING = &H80
  224. Global Const PD_RETURNDC = &H100
  225. Global Const PD_RETURNIC = &H200
  226. Global Const PD_RETURNDEFAULT = &H400
  227. Global Const PD_SHOWHELP = &H800
  228.         
  229.  
  230. ' MhChooseFont Values
  231. Global Const CF_SCREENFONTS = &H1
  232. Global Const CF_PRINTERFONTS = &H2
  233. Global Const CF_BOTH = &H3  '  (CF_SCREENFONTS | CF_PRINTERFONTS)
  234. Global Const CF_SHOWHELP = &H4
  235. Global Const CF_EFFECTS = &H100
  236. Global Const CF_APPLY = &H200
  237. Global Const CF_ANSIONLY = &H400
  238. Global Const CF_NOVECTORFONTS = &H800
  239. Global Const CF_NOSIMULATIONS = &H1000
  240. Global Const CF_LIMITSIZE = &H2000
  241. Global Const CF_FIXEDPITCHONLY = &H4000
  242. Global Const CF_WYSIWYG = &H8000              '  must also have CF_SCREENFONTS & CF_PRINTERFONTS
  243. Global Const CF_FORCEFONTEXIST = &H10000
  244. Global Const CF_SCALABLEONLY = &H20000
  245. Global Const CF_TTONLY = &H40000
  246. Global Const SIMULATED_FONTTYPE = &H8000
  247. Global Const PRINTER_FONTTYPE = &H4000
  248. Global Const SCREEN_FONTTYPE = &H2000
  249.  
  250. ' Following is the only RasterOp& used by Muscle
  251. Global Const SRCCOPY = &HCC0020
  252.  
  253.  
  254. Declare Function GetTextExtent& Lib "Gdi" (ByVal Hdc%, ByVal lpString$, ByVal nCount%)
  255. Declare Function GetWindowDC% Lib "User" (ByVal hWnd%)
  256. Declare Function ReleaseDC% Lib "User" (ByVal hWnd%, ByVal Hdc%)
  257. Declare Function Winhelp Lib "User" (ByVal hWnd As Integer, ByVal lpzFileName As String, ByVal wCmd As Integer, dwData As Any) As Integer
  258. '-----------------------------------
  259. 'Common Dialog Control
  260. '-----------------------------------
  261. 'Action Property
  262. Global Const DLG_FILE_OPEN = 1
  263. Global Const DLG_FILE_SAVE = 2
  264. Global Const DLG_COLOR = 3
  265. Global Const DLG_FONT = 4
  266. Global Const DLG_PRINT = 5
  267. Global Const DLG_HELP = 6
  268.  
  269. Global Const True = -1
  270. Global Const False = 0
  271. Global Const CTRL_MASK = 2
  272.  
  273. Declare Function GetFocus% Lib "user" ()
  274. Declare Function SendMessage& Lib "user" (ByVal hWnd%, ByVal wMsg%, ByVal wParam%, lp As Any)
  275. Global Const WM_USER = &H400
  276. Global Const EM_LIMITTEXT = WM_USER + 21
  277. Global Const EM_UNDO = WM_USER + 23
  278.  
  279. Global IniFile As String
  280. Global TextPrintWidth As Integer, PrtFontSize As Integer
  281. Global PrtFontName As String
  282.  
  283. Type MacrosType
  284.     Caption As String * 2
  285.     Title As String * 30
  286.     text As String * 2000
  287. End Type
  288.  
  289. Global Macros(24) As MacrosType
  290. Global PuMenus(24) As MhPopupMenuType
  291. Global PUHandle As Integer
  292. Global Const FileHeader = "inpgls"
  293. Global ActionFlag As Integer
  294. Global Const BaseValue = 100
  295.  
  296. 'Help Constants
  297. Global Const HELP_CONTEXT = &H1           'Display topic in ulTopic
  298. Global Const HELP_QUIT = &H2              'Terminate help
  299. Global Const HELP_INDEX = &H3             'Display index
  300. Global Const HELP_CONTENTS = &H3
  301. Global Const HELP_HELPONHELP = &H4        'Display help on using help
  302. Global Const HELP_SETINDEX = &H5          'Set the current Index for multi index help
  303. Global Const HELP_SETCONTENTS = &H5
  304. Global Const HELP_CONTEXTPOPUP = &H8
  305. Global Const HELP_FORCEFILE = &H9
  306. Global Const HELP_KEY = &H101             'Display topic for keyword in offabData
  307. Global Const HELP_COMMAND = &H102
  308. Global Const HELP_PARTIALKEY = &H105      'call the search engine in winhelp
  309.  
  310.