Declare Function GetPrivateProfileString Lib "Kernel" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpDefault As String, ByVal lpReturnedString As String, ByVal nSize As Integer, ByVal lpFileName As String) As Integer
Declare Function GetPrivateProfileInt Lib "Kernel" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal nDefault As Integer, ByVal lpFileName As String) As Integer
Declare Function WritePrivateProfileString Lib "Kernel" (ByVal lpApplicationName As String, ByVal lpKeyName As String, ByVal lpString As String, ByVal lplFileName As String) As Integer
Global version As String
Type RECT
Left As Integer
Top As Integer
right As Integer
bottom As Integer
End Type
Global margin As RECT
Global visibleArea As RECT
Global visibleLines As Integer
Global lineSpacing As Integer
Global lineSpacingExt As Integer
Global pixelHeight As Integer
Global pixelWidth As Integer
Global initHeight%, initWidth%, initTop%, initLeft%
Global sidesLR As Integer
Global sidesTB As Integer
Global Const DefaultINI = "WSPRTERM.INI"
Global curIniFilename As String
Global Const Key_Async = "Async"
Global Const Appl_Parity = "Parity"
Global Const Appl_DataBits = "Databits"
Global Const Appl_StopBits = "Stopbits"
Global Const Appl_CommPort = "Port"
Global Const Appl_BaudRate = "BaudRate"
Global Const Appl_HandShake = "HandShake"
Global Const Appl_OutBufSize = "OutBufferSize"
Global Const Appl_InBufSize = "InBufferSize"
Global Const Appl_Interval = "PollInterval"
Global asyncOutBufSize As Integer
Global asyncInBufSize As Integer
Global asyncPollInterval As Integer
Global connectAtStartup As Integer
Global curConnectType As Integer
Global Const CT_Async = 0
Global curParity As String
Global curDataBits As String
Global curstopBits As String
Global curCommPort As Integer
Global curBaudRate As String
Global curHandShake As Integer
Global Const Key_Pref = "Preferences"
Global Const Appl_BackColor = "BackColor"
Global Const Appl_ForeColor = "ForeColor"
Global Const Appl_HiColor = "HighColor"
Global Const Appl_CursorColor = "CursorColor"
Global Const Appl_SelTxtFgColor = "SelTextForeColor"
Global Const Appl_SelTxtBgColor = "SelTextBackColor"
Global Const Appl_RollStyle = "RollStyle"
Global Const Appl_Font = "Font"
Global Const Appl_FontSize = "FontSize"
Global Const Appl_LineSpacing = "LineSpacing"
Global Const Appl_CursorBlink = "CursorBlinkRate"
Global Const Appl_MouseStyle = "MouseStyle"
Global Const Appl_PrtFontName = "PrinterFont"
Global Const Appl_PrtFontSize = "PrinterFontSize"
Global dPrtFontName As String
Global prtFontName As String
Global dPrtFontSize As Integer
Global prtFontSize As Integer
Global Const Key_Notes = "Notes"
Global Const Appl_CurrentIni = "CurrentINI"
Global Const Appl_ConnectType = "ConnectType"
Global Const Appl_AutoConnect = "ConnectAtStartup"
Global Const Appl_Left = "Left"
Global Const Appl_Top = "Top"
Global Const Appl_Width = "Width"
Global Const Appl_Height = "Height"
Global Const Appl_ClickWav = "WSPRTERM Click"
Global Const Appl_BeepWav = "WSPRTERM Beep"
Global clickWav As String
Global defaultClickWav As String
Global beepWav As String
Global defaultBeepWav As String
Global startTime As Single
Global connecting As Integer
Global disconnecting As Integer
Global curX As Integer
Global curY As Integer
Global qX1 As Integer
Global qY1 As Integer
Global qX2 As Integer
Global qY2 As Integer
Global partialScrnUpdate As Integer
Global textCursorOn As Integer
Global Const BUFFERED = 0
Global Const IMMEDIATE = 1
Global Const SMART = 2
Global rollStyle As Integer
' Group 1 - MsgBox buttons
Global Const MB_OK = 0
Global Const MB_OKCANCEL = 1
Global Const MB_YESNOCANCEL = 3
Global Const MB_YESNO = 4
' Group 2 - MsgBox Icons
Global Const MB_ICONSTOP = 16
Global Const MB_ICONQUESTION = 32
Global Const MB_ICONEXCLAMATION = 48
Global Const MB_ICONINFORMATION = 64
' Group 3 - Default buttons
Global Const MB_DEFBUTTON1 = 0
Global Const MB_DEFBUTTON2 = 256
' Group 4 - Modality
Global Const MB_APPLMODAL = 0
Global Const MB_SYSTEMMODAL = 4096
' MsgBox other
Global Const IDOK = 1
Global Const IDCANCEL = 2
Global Const IDYES = 6
Global Const IDNO = 7
Global Const LiveMinRow = 0 ' "live" screen min row
Global Const LiveMaxRow = 23
Global Const MinRow = -25 ' total screen min row
Global Const MaxRow = 23
Global Const Rows = 49
Global Const LiveMinCol = 0
Global Const LiveMaxCol = 79
Global Const MinColumn = 0
Global Const MaxColumn = 79
Global Const CharsPerRow = 80
Global sdI(MinRow To MaxRow) As Integer
Global yPos(MinRow To MaxRow) As Integer
Global scrnData(MinRow To MaxRow) As String * CharsPerRow
Global scrnAttr(MinRow To MaxRow) As String * CharsPerRow
Global scrnColor(MinRow To MaxRow) As String * CharsPerRow
Global shortStr As String
Global localCapture As Integer
Global localCaptureLine As String
Global curAttr As Integer
Global Const ABold = &H1
Global Const AInverse = &H2
Global Const AUnderline = &H4
Global Const ABlank = &H8
Global Const ABlink = &H10
Global Const ASysColors = &H20
Global Const ANormal = &H20 ' Default normal to system colors
Global curColor As Integer
Global Const CFgColorMask = &HF
Global Const CBgColorMask = &HF0
Global Const CNormal = &H7 ' fg=white, bg=black
Global pasteStr As String
Global pasteIndex As Integer
Global pasteInterval As Integer
Global pasteBurst As Integer
Global pasteLen As Integer
Global mouseState As Integer
Global lastMouseButton As Integer
Global mouseStyle As Integer
Global Const MouseOff = 0
Global Const MouseMenu = 1 ' default
Global Const MouseEditor = 2
Global cmdSeq As Integer
Global subCmdSeq As Integer
Global seqPhase As Integer
Global Const MaxParam = 20
Global param(1 To MaxParam) As Integer
Global paramCnt As Integer
Global queueTxData As String
Global Const EscSeq = &H1B
Global Const ExtendedSeq = &H5B
' Button parameter masks
Global Const LEFT_BUTTON = 1
Global Const RIGHT_BUTTON = 2
Global Const MIDDLE_BUTTON = 4
' Colors
Global Const BLACK = &H0&
Global Const RED = &HFF&
Global Const GREEN = &HFF00&
Global Const YELLOW = &HFFFF&
Global Const BLUE = &HFF0000
Global Const MAGENTA = &HFF00FF
Global Const CYAN = &HFFFF00
Global Const WHITE = &HFFFFFF
'Graphic Colors
Global Const G_BLACK = 0
Global Const G_BLUE = 1
Global Const G_GREEN = 2
Global Const G_CYAN = 3
Global Const G_RED = 4
Global Const G_MAGENTA = 5
Global Const G_BROWN = 6
Global Const G_LIGHT_GRAY = 7
Global Const G_DARK_GRAY = 8
Global Const G_LIGHT_BLUE = 9
Global Const G_LIGHT_GREEN = 10
Global Const G_LIGHT_CYAN = 11
Global Const G_LIGHT_RED = 12
Global Const G_LIGHT_MAGENTA = 13
Global Const G_YELLOW = 14
Global Const G_WHITE = 15
Global Const G_AUTOBW = 16
' System color indexes
Global Const COLOR_SCROLLBAR = 0
Global Const COLOR_WINDOW = 5
Global Const COLOR_WINDOWTEXT = 8
Global Const COLOR_HIGHLIGHTTEXT = 14
Global Const COLOR_GRAYTEXT = 17
' System Colors
Global Const SCROLL_BARS = &H80000000 ' Scroll-bars gray area.
Global Const DESKTOP = &H80000001 ' Desktop.
Global Const ACTIVE_TITLE_BAR = &H80000002 ' Active window caption.
Global Const INACTIVE_TITLE_BAR = &H80000003 ' Inactive window caption.
Global Const MENU_BAR = &H80000004 ' Menu background.
Global Const WINDOW_BACKGROUND = &H80000005 ' Window background.
Global Const WINDOW_FRAME = &H80000006 ' Window frame.
Global Const MENU_TEXT = &H80000007 ' Text in menus.
Global Const WINDOW_TEXT = &H80000008 ' Text in windows.
Global Const TITLE_BAR_TEXT = &H80000009 ' Text in caption, size box, scroll-bar arrow box..
Global Const ACTIVE_BORDER = &H8000000A ' Active window border.
Global Const INACTIVE_BORDER = &H8000000B ' Inactive window border.
Global Const APPLICATION_WORKSPACE = &H8000000C ' Background color of multiple document interface (MDI) applications.
Global Const HIGHLIGHT = &H8000000D ' Items selected item in a control.
Global Const HIGHLIGHT_TEXT = &H8000000E ' Text of item selected in a control.
Global Const BUTTON_FACE = &H8000000F ' Face shading on command buttons.
Global Const BUTTON_SHADOW = &H80000010 ' Edge shading on command buttons.
Global Const GRAY_TEXT = &H80000011 ' Grayed (disabled) text. This color is set to 0 if the current display driver does not support a solid gray color.
Global Const BUTTON_TEXT = &H80000012 ' Text on push buttons.
' WindowState
Global Const NORMAL = 0 ' 0 - Normal
Global Const MINIMIZED = 1 ' 1 - Minimized
Global Const MAXIMIZED = 2 ' 2 - Maximized
' MousePointer
Global Const DEFAULT = 0 ' 0 - Default
'Global Const ARROW = 1 ' 1 - Arrow
'Global Const CROSSHAIR = 2 ' 2 - Cross
Global Const IBEAM = 3 ' 3 - I-Beam
'Global Const ICON_POINTER = 4 ' 4 - Icon
Global Const SIZE_POINTER = 5 ' 5 - Size
'Global Const SIZE_NE_SW = 6 ' 6 - Size NE SW
'Global Const SIZE_N_S = 7 ' 7 - Size N S
'Global Const SIZE_NW_SE = 8 ' 8 - Size NW SE
'Global Const SIZE_W_E = 9 ' 9 - Size W E
'Global Const UP_ARROW = 10 ' 10 - Up Arrow
Global Const HOURGLASS = 11 ' 11 - Hourglass
Global Const NO_DROP = 12 ' 12 - No drop
Global blankLine As String
Global curAttrFullLine As String
Global Const OnColor = G_GREEN
Global Const OffColor = G_DARK_GRAY
Global LedOnColor As Long
Global LedOffColor As Long
Global normalBgColor As Long
Global normalFgColor As Long
Global normalHiColor As Long
Global cursorColor As Long
Global selTextFgColor As Long
Global selTextBgColor As Long
Global selTextCol1 As Integer
Global selTextRow1 As Integer
Global selTextLastCol As Integer
Global selTextLastRow As Integer
Global textSelected As Integer
Global Const Shift1% = 2
Global Const Shift2% = 4
Global Const Shift3% = 8
Global Const Shift4% = 16
Global Const Shift5% = 32
Global Const Shift6% = 64
Global Const Shift7% = 128
Global Const Shift8% = 256
Global Const Transparent = 1
Global Const Opaque = 2
'---------------------------------------
'Comm Control
'---------------------------------------
'Handshaking
Global Const MSCOMM_HANDSHAKE_NONE = 0
Global Const MSCOMM_HANDSHAKE_XONXOFF = 1
Global Const MSCOMM_HANDSHAKE_RTS = 2
Global Const MSCOMM_HANDSHAKE_RTSXONXOFF = 3
'Event constants
Global Const MSCOMM_EV_SEND = 1
Global Const MSCOMM_EV_RECEIVE = 2
Global Const MSCOMM_EV_CTS = 3
Global Const MSCOMM_EV_DSR = 4
Global Const MSCOMM_EV_CD = 5
Global Const MSCOMM_EV_RING = 6
Global Const MSCOMM_EV_EOF = 7
'Error code constants
Global Const MSCOMM_ER_BREAK = 1001
Global Const MSCOMM_ER_CTSTO = 1002
Global Const MSCOMM_ER_DSRTO = 1003
Global Const MSCOMM_ER_FRAME = 1004
Global Const MSCOMM_ER_OVERRUN = 1006
Global Const MSCOMM_ER_CDTO = 1007
Global Const MSCOMM_ER_RXOVER = 1008
Global Const MSCOMM_ER_RXPARITY = 1009
Global Const MSCOMM_ER_TXFULL = 1010
'Color Dialog Flags
Global Const CC_RGBINIT = &H1&
Global Const CC_FULLOPEN = &H2&
Global Const CC_PREVENTFULLOPEN = &H4&
Global Const CC_SHOWHELP = &H8&
'Fonts Dialog Flags
Global Const CF_SCREENFONTS = &H1&
Global Const CF_PRINTERFONTS = &H2&
Global Const CF_BOTH = &H3&
Global Const CF_SHOWHELP = &H4&
Global Const CF_INITTOLOGFONTSTRUCT = &H40&
Global Const CF_USESTYLE = &H80&
Global Const CF_EFFECTS = &H100&
Global Const CF_APPLY = &H200&
Global Const CF_ANSIONLY = &H400&
Global Const CF_NOVECTORFONTS = &H800&
Global Const CF_NOSIMULATIONS = &H1000&
Global Const CF_LIMITSIZE = &H2000&
Global Const CF_FIXEDPITCHONLY = &H4000&
Global Const CF_WYSIWYG = &H8000& 'must also have CF_SCREENFONTS & CF_PRINTERFONTS
Global Const CF_FORCEFONTEXIST = &H10000
Global Const CF_SCALABLEONLY = &H20000
Global Const CF_TTONLY = &H40000
Global Const CF_NOFACESEL = &H80000
Global Const CF_NOSTYLESEL = &H100000
Global Const CF_NOSIZESEL = &H200000
'File Open/Save Dialog Flags
Global Const OFN_READONLY = &H1&
Global Const OFN_OVERWRITEPROMPT = &H2&
Global Const OFN_HIDEREADONLY = &H4&
Global Const OFN_NOCHANGEDIR = &H8&
Global Const OFN_SHOWHELP = &H10&
Global Const OFN_NOVALIDATE = &H100&
Global Const OFN_ALLOWMULTISELECT = &H200&
Global Const OFN_EXTENSIONDIFFERENT = &H400&
Global Const OFN_PATHMUSTEXIST = &H800&
Global Const OFN_FILEMUSTEXIST = &H1000&
Global Const OFN_CREATEPROMPT = &H2000&
Global Const OFN_SHAREAWARE = &H4000&
Global Const OFN_NOREADONLYRETURN = &H8000&
' Key Codes
Global Const KEY_LBUTTON = &H1
Global Const KEY_RBUTTON = &H2
Global Const KEY_CANCEL = &H3
Global Const KEY_MBUTTON = &H4 ' NOT contiguous with L & RBUTTON
Global Const KEY_BACK = &H8
Global Const KEY_TAB = &H9
Global Const KEY_CLEAR = &HC
Global Const KEY_RETURN = &HD
Global Const KEY_SHIFT = &H10
Global Const KEY_CONTROL = &H11
Global Const KEY_MENU = &H12
Global Const KEY_PAUSE = &H13
Global Const KEY_CAPITAL = &H14
Global Const KEY_ESCAPE = &H1B
Global Const KEY_SPACE = &H20
Global Const KEY_PRIOR = &H21
Global Const KEY_NEXT = &H22
Global Const KEY_END = &H23
Global Const KEY_HOME = &H24
Global Const KEY_LEFT = &H25
Global Const KEY_UP = &H26
Global Const KEY_RIGHT = &H27
Global Const KEY_DOWN = &H28
Global Const KEY_SELECT = &H29
Global Const KEY_PRINT = &H2A
Global Const KEY_EXECUTE = &H2B
Global Const KEY_SNAPSHOT = &H2C
Global Const KEY_INSERT = &H2D
Global Const KEY_DELETE = &H2E
Global Const KEY_HELP = &H2F
' KEY_A thru KEY_Z are the same as their ASCII equivalents: 'A' thru 'Z'
' KEY_0 thru KEY_9 are the same as their ASCII equivalents: '0' thru '9'