Announcement

Collapse

Forum Guidelines

This forum is for finished source code that is working properly. If you have questions about this or any other source code, please post it in one of the Discussion Forums, not here.
See more
See less

MSFlexGrid ActiveX Control With PowerBASIC 9.0

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • MSFlexGrid ActiveX Control With PowerBASIC 9.0

    I havn't seen any source code yet of the above referenced control with the new compilers (9.0 - 5.0), so I'll post some below that seems to work (tested on Win 2000 and WinXP). Naturally, I have (we all have) to thank Jose Roca for the awesome work he did over the course of the past five years or so for bringing this all together (PowerBASIC deserves big time accolades too!). In the below source code I'm using his (Jose's) Atl.inc file from his new includes available at...

    http://www.jose.it-berater.org/smffo...hp?board=197.0.

    To generate the MSFlexGrid.inc file that contains the class declarations and event code I used the PowerBASIC COM Browser. I'm sure you could get it to work using Jose's TypeLib browser also, but for this example I used PowerBASIC's. One thing I did is cut the event code out of the include and place it at the top of the main source file. I also deleted most of the event procedures to save space, and put a couple message boxes in the one's left to demonstrate that the events are working. There is also some code in the main source to set a few property settings. All in all, the main source is a complete SDK style program that shows most of the necessary code in only a little over 100 lines or so. Oh, a couple other issues! In Jose's Atl.inc file near the top (about 15 or so lines down) is this equate...

    $ATL_DLLNAME = "ATL.DLL" ' --> change as needed

    That doesn't work so good for me. I changed it to "ATL71.DLL". For one thing, I don't think the ActiveX licensing functions are in the atl.dll file. They may have been added with 70 or 71.

    Also, when I generated the *.inc file with the COM Browser, I specified to use a suffix only when an illegal name and for a suffix I typed a simple capital I in the text box. This is rather important. In any case I'll supply the whole thing.

    Here's the main source...

    Code:
    #Compile            Exe
    #Include            "Win32api.inc"
    #Include Once       "Atl.inc"
    #Include Once       "MSFlexGrid.inc"
    %ID_CONTAINER       = 1250
    Global oGrid        As IMSFlexGrid
    Global oEvents      As DMSFlexGridEvents
    
    
    Type WndEventArgs
      wParam            As Long
      lParam            As Long
      hWnd              As Dword
      hInst             As Dword
    End Type
    
    
    Class Class_DMSFlexGridEvents $CLSID_Event_DMSFlexGridEvents As Event
      Interface DMSFlexGridEvents $IID_DMSFlexGridEvents : Inherit IDispatch
        Method KeyDown <-602> (ByRef KeyCode As Integer, ByRef PB_Shift As Integer)
          MsgBox("You Pressed Some Key!")
        End Method
        Method DblClick <-601> ()
          MsgBox("You Double Clicked Somewhere In The Grid!")
        End Method
      End Interface
    End Class
    
    
    Sub GridSetup(Byval oGrid As IMSFlexGrid)
      Local vCols As Variant,vRows As Variant
      Local vVnt As Variant,vText As Variant
      Local vCol As Variant,vRow As Variant
      Local Grid As Dispatch
    
      Grid=oGrid
      vCols=4                     : Object Let Grid.Cols=vCols
      vRows=20                    : Object Let Grid.Rows=vRows
      vVnt=200:vCol=0             : Object Let Grid.ColWidth(vCol)=vVnt
      vVnt="Times New Roman"      : Object Let Grid.FontName = vVnt
      vVnt=10                     : Object Let Grid.FontSize=vVnt
      vCol=1:vVnt=1200:vRow=0:    : Object Let Grid.ColWidth(vCol)=vVnt
      Object Let Grid.Col=vCol    : Object Let Grid.Row=vRow
      vText="Column 1"            : Object Let Grid.Text=vText
      vCol=2:vRow=0:vVnt=1200     : Object Let Grid.ColWidth(vCol)=vVnt
      Object Let Grid.Col=vCol    : Object Let Grid.Row=vRow
      vText="Column 2"            : Object Let Grid.Text=vText
      vCol=3:vRow=0:vVnt=1200     : Object Let Grid.ColWidth(vCol)=vVnt
      Object Let Grid.Col=vCol    : Object Let Grid.Row=vRow
      vText="Column 3"            : Object Let Grid.Text=vText
    End Sub
    
    
    Function fnWndProc_OnCreate(Wea As WndEventArgs) As Long
      Local pStream,ppUnkContainer As IUnknown
      Local lpCreateStruct As CREATESTRUCT Ptr
      Local hContainer,hCtrl As Dword
      Local strCtrl As String
    
      lpCreateStruct=Wea.lParam
      [email protected]
      Call AtlAxWinInit()
      hContainer=CreateWindowEx _
      ( _
        %WS_EX_OVERLAPPEDWINDOW,"static","",%WS_CHILD OR %WS_VISIBLE,10,10,280,250,Wea.hWnd,%ID_CONTAINER,Wea.hInst,Byval %NULL _
      )
      strCtrl=UCode$("MSFlexGridLib.MSFlexGrid") 'Program ID
      hCtrl=AtlAxCreateControl(Strptr(strCtrl),hContainer,pStream,ppUnkContainer)
      oEvents=Class "Class_DMSFlexGridEvents"
      oGrid=AtlAxGetDispatch(hContainer)
      If IsObject(oGrid) Then
         Events From oGrid Call oEvents
         Call GridSetup(oGrid)
      End If
    
      fnWndProc_OnCreate=0
    End Function
    
    
    Function fnWndProc_OnDestroy(Wea As WndEventArgs) As Long
      If IsObject(oEvents) Then
         Events End oEvents
         Set oEvents=Nothing
      End If
      If IsObject(oGrid) Then
         Set oGrid=Nothing
      End If
      Call PostQuitMessage(0)
    
      fnWndProc_OnDestroy=0
    End Function
    
    
    Function fnWndProc(ByVal hWnd As Long,ByVal wMsg As Long,ByVal wParam As Long,ByVal lParam As Long) As Long
      Local Wea As WndEventArgs
    
      Select Case As Long wMsg
        Case %WM_CREATE
          Wea.hWnd=hWnd : Wea.wParam=wParam : Wea.lParam=lParam
          fnWndProc=fnWndProc_OnCreate(Wea)
          Exit Function
        Case %WM_DESTROY
          Call PostQuitMessage(0)
          fnWndProc=fnWndProc_OnDestroy(Wea)
          Exit Function
      End Select
    
      fnWndProc=DefWindowProc(hWnd,wMsg,wParam,lParam)
    End Function
    
    
    Function WinMain(ByVal hIns As Long,ByVal hPrev As Long,ByVal lpCL As Asciiz Ptr,ByVal iShow As Long) As Long
      Local winclass As WndClassEx
      Local szAppName As Asciiz*16
      Local Msg As tagMsg
      Local hWnd As Dword
    
      szAppName="OCX Test"                                    : winclass.cbSize=SizeOf(winclass)
      winclass.style=%CS_HREDRAW Or %CS_VREDRAW               : winclass.lpfnWndProc=CodePtr(fnWndProc)
      winclass.cbClsExtra=0                                   : winclass.cbWndExtra=0
      winclass.hInstance=hIns                                 : winclass.hIcon=LoadIcon(%NULL,ByVal %IDI_APPLICATION)
      winclass.hCursor=LoadCursor(%NULL, ByVal %IDC_ARROW)    : winclass.hbrBackground=%COLOR_BTNFACE+1
      winclass.lpszMenuName=%NULL                             : winclass.lpszClassName=VarPtr(szAppName)
      Call RegisterClassEx(winclass)
      hWnd=CreateWindow(szAppName,"Try MSFlexGrid",%WS_OVERLAPPEDWINDOW Xor %WS_MAXIMIZEBOX,200,100,300,300,0,0,hIns,ByVal 0)
      Call ShowWindow(hWnd,iShow)
      While GetMessage(Msg,%NULL,0,0)
        TranslateMessage Msg
        DispatchMessage Msg
      Wend
    
      Function=msg.wParam
    End Function
    ...and here's the MSFlexGrid.inc file. As I said, I cut the events out of it and placed them at the top of the source. I did this so you could see a whole coherent source file all in one piece.

    Code:
    ' Generated by: PowerBASIC COM Browser v.2.00.0054
    ' DateTime    : 11/10/2008 at 2:38 PM
    ' ------------------------------------------------
    ' Library Name: MSFlexGridLib
    ' Library File: C:\WINDOWS\system32\MSFLXGRD.OCX
    ' Description : Microsoft FlexGrid Control 6.0 (SP3)
    ' Help File : C:\WINDOWS\system32\MSHFlx98.chm
    ' Help Context : 0
    ' GUID : {5E9E78A0-531B-11CF-91F6-C2863C385E30}
    ' LCID : 0
    ' Version : 1.0
    
    ' Version Dependant ProgID's
    $PROGID_MSFlexGrid1 = "MSFlexGridLib.MSFlexGrid.1"
    
    ' Version Independant ProgID's
    $PROGID_MSFlexGrid = "MSFlexGridLib.MSFlexGrid"
    
    ' Class Indentifiers
    $CLSID_DataObject = GUID$("{2334D2B2-713E-11CF-8AE5-00AA00C00905}")
    $CLSID_DataObjectFiles = GUID$("{2334D2B4-713E-11CF-8AE5-00AA00C00905}")
    $CLSID_MSFlexGrid = GUID$("{6262D3A0-531B-11CF-91F6-C2863C385E30}")
    $CLSID_Event_DMSFlexGridEvents = GUID$("{32C8CA3D-1D47-4C50-A0D3-C2DDB2691A9C}")
    
    ' Interface Indentifiers
    $IID_IVBDataObject = GUID$("{2334D2B1-713E-11CF-8AE5-00AA00C00905}")
    $IID_IVBDataObjectFiles = GUID$("{2334D2B3-713E-11CF-8AE5-00AA00C00905}")
    $IID_IRowCursor = GUID$("{9F6AA700-D188-11CD-AD48-00AA003C9CB6}")
    $IID_IMSFlexGrid = GUID$("{5F4DF280-531B-11CF-91F6-C2863C385E30}")
    $IID_DMSFlexGridEvents = GUID$("{609602E0-531B-11CF-91F6-C2863C385E30}")
    
    ' OLEDragConstants enumeration
    %flexOLEDragManual = 0
    %flexOLEDragAutomatic = 1
    
    ' OLEDropConstants enumeration
    %flexOLEDropNone = 0
    %flexOLEDropManual = 1
    
    ' DragOverConstants enumeration
    %flexEnter = 0
    %flexLeave = 1
    %flexOver = 2
    
    ' ClipBoardConstants enumeration
    %flexCFText = 1
    %flexCFBitmap = 2
    %flexCFMetafile = 3
    %flexCFDIB = 8
    %flexCFPalette = 9
    %flexCFEMetafile = 14
    %flexCFFiles = 15
    %flexCFRTF = -16639
    
    ' OLEDropEffectConstants enumeration
    %flexOLEDropEffectNone = 0
    %flexOLEDropEffectCopy = 1
    %flexOLEDropEffectMove = 2
    %flexOLEDropEffectScroll = -2147483648
    
    ' ErrorConstants enumeration
    %flexerrIllegaFunctionCall = 5
    %flexerrObjIllegalUse = 425
    %flexerrClipInvalidFormat = 461
    %flexerrDataObjectLocked = 672
    %flexerrExpectedAnArgument = 673
    %flexerrRecursiveOLEDrag = 674
    %flexerrUserFormatNotBinArray = 675
    %flexerrDataNotSetForFormat = 676
    %flexerrUnknownError = 600
    %flexerrSubscript = 381
    %flexerrBadValue = 380
    %flexerrGetNotSupported = 394
    %flexerrSetNotPermitted = 387
    %flexerrOutOfMemory = 7
    %flexerrVB30000 = 30000
    %flexerrVB30001 = 30001
    %flexerrVB30002 = 30002
    %flexerrVB30004 = 30004
    %flexerrVB30005 = 30005
    %flexerrVB30006 = 30006
    %flexerrVB30008 = 30008
    %flexerrVB30009 = 30009
    %flexerrVB30010 = 30010
    %flexerrVB30011 = 30011
    %flexerrVB30013 = 30013
    %flexerrVB30014 = 30014
    %flexerrVB30015 = 30015
    %flexerrVB30016 = 30016
    %flexerrVB30017 = 30017
    
    ' AppearanceSettings enumeration
    %flexFlat = 0
    %flex3D = 1
    
    ' BorderStyleSettings enumeration
    %flexBorderNone = 0
    %flexBorderSingle = 1
    
    ' FocusRectSettings enumeration
    %flexFocusNone = 0
    %flexFocusLight = 1
    %flexFocusHeavy = 2
    
    ' HighLightSettings enumeration
    %flexHighlightNever = 0
    %flexHighlightAlways = 1
    %flexHighlightWithFocus = 2
    
    ' ScrollBarsSettings enumeration
    %flexScrollBarNone = 0
    %flexScrollBarHorizontal = 1
    %flexScrollBarVertical = 2
    %flexScrollBarBoth = 3
    
    ' TextStyleSettings enumeration
    %flexTextFlat = 0
    %flexTextRaised = 1
    %flexTextInset = 2
    %flexTextRaisedLight = 3
    %flexTextInsetLight = 4
    
    ' FillStyleSettings enumeration
    %flexFillSingle = 0
    %flexFillRepeat = 1
    
    ' GridLineSettings enumeration
    %flexGridNone = 0
    %flexGridFlat = 1
    %flexGridInset = 2
    %flexGridRaised = 3
    
    ' SelectionModeSettings enumeration
    %flexSelectionFree = 0
    %flexSelectionByRow = 1
    %flexSelectionByColumn = 2
    
    ' MergeCellsSettings enumeration
    %flexMergeNever = 0
    %flexMergeFree = 1
    %flexMergeRestrictRows = 2
    %flexMergeRestrictColumns = 3
    %flexMergeRestrictAll = 4
    
    ' PictureTypeSettings enumeration
    %flexPictureColor = 0
    %flexPictureMonochrome = 1
    
    ' AllowUserResizeSettings enumeration
    %flexResizeNone = 0
    %flexResizeColumns = 1
    %flexResizeRows = 2
    %flexResizeBoth = 3
    
    ' MousePointerSettings enumeration
    %flexDefault = 0
    %flexArrow = 1
    %flexCross = 2
    %flexIBeam = 3
    %flexIcon = 4
    %flexSize = 5
    %flexSizeNESW = 6
    %flexSizeNS = 7
    %flexSizeNWSE = 8
    %flexSizeEW = 9
    %flexUpArrow = 10
    %flexHourglass = 11
    %flexNoDrop = 12
    %flexArrowHourGlass = 13
    %flexArrowQuestion = 14
    %flexSizeAll = 15
    %flexCustom = 99
    
    ' SortSettings enumeration
    %flexSortNone = 0
    %flexSortGenericAscending = 1
    %flexSortGenericDescending = 2
    %flexSortNumericAscending = 3
    %flexSortNumericDescending = 4
    %flexSortStringNoCaseAscending = 5
    %flexSortStringNoCaseDescending = 6
    %flexSortStringAscending = 7
    %flexSortStringDescending = 8
    
    ' AlignmentSettings enumeration
    %flexAlignLeftTop = 0
    %flexAlignLeftCenter = 1
    %flexAlignLeftBottom = 2
    %flexAlignCenterTop = 3
    %flexAlignCenterCenter = 4
    %flexAlignCenterBottom = 5
    %flexAlignRightTop = 6
    %flexAlignRightCenter = 7
    %flexAlignRightBottom = 8
    %flexAlignGeneral = 9
    
    
    ' Interface Name  : IVBDataObject
    ' ClassID         : $CLSID_DataObject
    Interface IDBind IVBDataObject
      Member Call Clear <1> ()
      Member Call GetData <2> (In sFormat As Integer<0>) As Variant
      Member Call GetFormat <3> (In sFormat As Integer<0>) As Integer
      Member Call SetData <4> (Opt In vValue As Variant<0>, Opt In vFormat As Variant<1>)
      Member Get Files <5> () As IVBDataObjectFiles
    End Interface
    
    ' Interface Name  : IVBDataObjectFiles
    ' ClassID         : $CLSID_DataObjectFiles
    Interface IDBind IVBDataObjectFiles
      Member Get Item <0> (In lIndex As Long<0>) As String
      Member Get Count <1> () As Long
      Member Call Add <2> (In bstrFilename As String<0>, Opt In vIndex As Variant<1>)
      Member Call Clear <3> ()
      Member Call Remove <4> (In vIndex As Variant<0>)
      Member Call Meth__NewEnum <-4> () As IUnknown
    End Interface
    
    ' Interface Name  : IRowCursor
    Interface IDBind IRowCursor
    End Interface
    
    ' Interface Name  : IMSFlexGrid
    ' Description     : Dispatch interface for Microsoft FlexGrid Control
    ' ClassID         : $CLSID_MSFlexGrid
    ' ProgID          : $PROGID_MSFlexGrid
    ' Version ProgID  : $PROGID_MSFlexGrid1
    Interface IDBind IMSFlexGrid
      Member Get Rows <4> () As Long
      Member Let Rows <4> (In Rows As Long<0>)
      Member Get Cols <5> () As Long
      Member Let Cols <5> (In Cols As Long<0>)
      Member Get FixedRows <6> () As Long
      Member Let FixedRows <6> (In FixedRows As Long<0>)
      Member Get FixedCols <7> () As Long
      Member Let FixedCols <7> (In FixedCols As Long<0>)
      Member Get Version <1> () As Integer
      Member Get FormatString <2> () As String
      Member Let FormatString <2> (In FormatString As String<0>)
      Member Get TopRow <8> () As Long
      Member Let TopRow <8> (In TopRow As Long<0>)
      Member Get LeftCol <9> () As Long
      Member Let LeftCol <9> (In LeftCol As Long<0>)
      Member Get Row <10> () As Long
      Member Let Row <10> (In Row As Long<0>)
      Member Get Col <11> () As Long
      Member Let Col <11> (In Col As Long<0>)
      Member Get RowSel <12> () As Long
      Member Let RowSel <12> (In RowSel As Long<0>)
      Member Get ColSel <13> () As Long
      Member Let ColSel <13> (In ColSel As Long<0>)
      Member Get Text <0> () As String
      Member Let Text <0> (In Text As String<0>)
      Member Get BackColor <-501> () As DWord
      Member Let BackColor <-501> (In BackColor As DWord<0>)
      Member Get ForeColor <-513> () As DWord
      Member Let ForeColor <-513> (In ForeColor As DWord<0>)
      Member Get BackColorFixed <14> () As DWord
      Member Let BackColorFixed <14> (In BackColorFixed As DWord<0>)
      Member Get ForeColorFixed <15> () As DWord
      Member Let ForeColorFixed <15> (In ForeColorFixed As DWord<0>)
      Member Get BackColorSel <16> () As DWord
      Member Let BackColorSel <16> (In BackColorSel As DWord<0>)
      Member Get ForeColorSel <17> () As DWord
      Member Let ForeColorSel <17> (In ForeColorSel As DWord<0>)
      Member Get BackColorBkg <18> () As DWord
      Member Let BackColorBkg <18> (In BackColorBkg As DWord<0>)
      Member Get WordWrap <19> () As Integer
      Member Let WordWrap <19> (In WordWrap As Integer<0>)
      Member Get Font <-512> () As IDispatch
      Member Let PutRef_Font <-512> (In PB_Font As IDispatch<0>)
      Member Get FontWidth <84> () As Single
      Member Let FontWidth <84> (In FontWidth As Single<0>)
      Member Get CellFontName <77> () As String
      Member Let CellFontName <77> (In CellFontName As String<0>)
      Member Get CellFontSize <78> () As Single
      Member Let CellFontSize <78> (In CellFontSize As Single<0>)
      Member Get CellFontBold <79> () As Integer
      Member Let CellFontBold <79> (In CellFontBold As Integer<0>)
      Member Get CellFontItalic <80> () As Integer
      Member Let CellFontItalic <80> (In CellFontItalic As Integer<0>)
      Member Get CellFontUnderline <81> () As Integer
      Member Let CellFontUnderline <81> (In CellFontUnderline As Integer<0>)
      Member Get CellFontStrikeThrough <82> () As Integer
      Member Let CellFontStrikeThrough <82> (In CellFontStrikeThrough As Integer<0>)
      Member Get CellFontWidth <83> () As Single
      Member Let CellFontWidth <83> (In CellFontWidth As Single<0>)
      Member Get TextStyle <20> () As Long
      Member Let TextStyle <20> (In TextStyle As Long<0>)
      Member Get TextStyleFixed <21> () As Long
      Member Let TextStyleFixed <21> (In TextStyleFixed As Long<0>)
      Member Get ScrollTrack <22> () As Integer
      Member Let ScrollTrack <22> (In ScrollTrack As Integer<0>)
      Member Get FocusRect <23> () As Long
      Member Let FocusRect <23> (In FocusRect As Long<0>)
      Member Get HighLight <24> () As Long
      Member Let HighLight <24> (In HighLight As Long<0>)
      Member Get Redraw <25> () As Integer
      Member Let Redraw <25> (In PB_Redraw As Integer<0>)
      Member Get ScrollBars <26> () As Long
      Member Let ScrollBars <26> (In ScrollBars As Long<0>)
      Member Get MouseRow <27> () As Long
      Member Get MouseCol <28> () As Long
      Member Get CellLeft <29> () As Long
      Member Get CellTop <30> () As Long
      Member Get CellWidth <31> () As Long
      Member Get CellHeight <32> () As Long
      Member Get RowHeightMin <33> () As Long
      Member Let RowHeightMin <33> (In RowHeightMin As Long<0>)
      Member Get FillStyle <-511> () As Long
      Member Let FillStyle <-511> (In FillStyle As Long<0>)
      Member Get GridLines <34> () As Long
      Member Let GridLines <34> (In GridLines As Long<0>)
      Member Get GridLinesFixed <35> () As Long
      Member Let GridLinesFixed <35> (In GridLinesFixed As Long<0>)
      Member Get GridColor <36> () As DWord
      Member Let GridColor <36> (In GridColor As DWord<0>)
      Member Get GridColorFixed <37> () As DWord
      Member Let GridColorFixed <37> (In GridColorFixed As DWord<0>)
      Member Get CellBackColor <38> () As DWord
      Member Let CellBackColor <38> (In CellBackColor As DWord<0>)
      Member Get CellForeColor <39> () As DWord
      Member Let CellForeColor <39> (In CellForeColor As DWord<0>)
      Member Get CellAlignment <40> () As Integer
      Member Let CellAlignment <40> (In CellAlignment As Integer<0>)
      Member Get CellTextStyle <41> () As Long
      Member Let CellTextStyle <41> (In CellTextStyle As Long<0>)
      Member Get CellPictureAlignment <43> () As Integer
      Member Let CellPictureAlignment <43> (In CellPictureAlignment As Integer<0>)
      Member Get Clip <45> () As String
      Member Let Clip <45> (In Clip As String<0>)
      Member Let Sort <46> (In Rhs As Integer<0>)
      Member Get SelectionMode <47> () As Long
      Member Let SelectionMode <47> (In SelectionMode As Long<0>)
      Member Get MergeCells <48> () As Long
      Member Let MergeCells <48> (In MergeCells As Long<0>)
      Member Get AllowBigSelection <51> () As Integer
      Member Let AllowBigSelection <51> (In AllowBigSelection As Integer<0>)
      Member Get AllowUserResizing <52> () As Long
      Member Let AllowUserResizing <52> (In AllowUserResizing As Long<0>)
      Member Get BorderStyle <-504> () As Long
      Member Let BorderStyle <-504> (In BorderStyle As Long<0>)
      Member Get hWnd <-515> () As Long
      Member Get Enabled <-514> () As Integer
      Member Let Enabled <-514> (In Enabled As Integer<0>)
      Member Get Appearance <-520> () As Long
      Member Let Appearance <-520> (In Appearance As Long<0>)
      Member Get MousePointer <53> () As Long
      Member Let MousePointer <53> (In MousePointer As Long<0>)
      Member Get MouseIcon <54> () As IDispatch
      Member Let PutRef_MouseIcon <54> (In MouseIcon As IDispatch<0>)
      Member Get PictureType <50> () As Long
      Member Let PictureType <50> (In PictureType As Long<0>)
      Member Get Picture <49> () As IDispatch
      Member Get CellPicture <42> () As IDispatch
      Member Let PutRef_CellPicture <42> (In CellPicture As IDispatch<0>)
      Member Call AboutBox <-552> ()
      Member Get TextArray <55> (In index As Long<0>) As String
      Member Let TextArray <55> (In index As Long<0>, In TextArray As String<1>)
      Member Get ColAlignment <56> (In index As Long<0>) As Integer
      Member Let ColAlignment <56> (In index As Long<0>, In ColAlignment As Integer<1>)
      Member Get ColWidth <57> (In index As Long<0>) As Long
      Member Let ColWidth <57> (In index As Long<0>, In ColWidth As Long<1>)
      Member Get RowHeight <58> (In index As Long<0>) As Long
      Member Let RowHeight <58> (In index As Long<0>, In RowHeight As Long<1>)
      Member Get MergeRow <59> (In index As Long<0>) As Integer
      Member Let MergeRow <59> (In index As Long<0>, In MergeRow As Integer<1>)
      Member Get MergeCol <60> (In index As Long<0>) As Integer
      Member Let MergeCol <60> (In index As Long<0>, In MergeCol As Integer<1>)
      Member Let RowPosition <61> (In index As Long<0>, In Rhs As Long<1>)
      Member Let ColPosition <62> (In index As Long<0>, In Rhs As Long<1>)
      Member Get RowData <63> (In index As Long<0>) As Long
      Member Let RowData <63> (In index As Long<0>, In RowData As Long<1>)
      Member Get ColData <64> (In index As Long<0>) As Long
      Member Let ColData <64> (In index As Long<0>, In ColData As Long<1>)
      Member Get TextMatrix <65> (In Row As Long<0>, In Col As Long<1>) As String
      Member Let TextMatrix <65> (In Row As Long<0>, In Col As Long<1>, In TextMatrix As String<2>)
      Member Call AddItem <66> (In Item As String<0>, Opt In index As Variant<1>)
      Member Call RemoveItem <67> (In index As Long<0>)
      Member Call Clear <68> ()
      Member Call Refresh <-550> ()
      Member Get DataSource <76> () As IRowCursor
      Member Let DataSource <76> (In DataSource As IRowCursor<0>)
      Member Get RowIsVisible <85> (In index As Long<0>) As Integer
      Member Get ColIsVisible <86> (In index As Long<0>) As Integer
      Member Get RowPos <87> (In index As Long<0>) As Long
      Member Get ColPos <88> (In index As Long<0>) As Long
      Member Get GridLineWidth <89> () As Integer
      Member Let GridLineWidth <89> (In GridLineWidth As Integer<0>)
      Member Get FixedAlignment <90> (In index As Long<0>) As Integer
      Member Let FixedAlignment <90> (In index As Long<0>, In FixedAlignment As Integer<1>)
      Member Get FontName <91> () As String
      Member Let FontName <91> (In FontName As String<0>)
      Member Get FontSize <92> () As Single
      Member Let FontSize <92> (In FontSize As Single<0>)
      Member Get FontBold <93> () As Integer
      Member Let FontBold <93> (In FontBold As Integer<0>)
      Member Get FontItalic <94> () As Integer
      Member Let FontItalic <94> (In FontItalic As Integer<0>)
      Member Get FontStrikethru <95> () As Integer
      Member Let FontStrikethru <95> (In FontStrikethru As Integer<0>)
      Member Get FontUnderline <96> () As Integer
      Member Let FontUnderline <96> (In FontUnderline As Integer<0>)
      Member Get RightToLeft <-611> () As Integer
      Member Let RightToLeft <-611> (In RightToLeft As Integer<0>)
      Member Get OLEDropMode <1551> () As Long
      Member Let OLEDropMode <1551> (In psOLEDropMode As Long<0>)
      Member Call OLEDrag <1552> ()
    End Interface
    Last edited by Fred Harris; 10 Nov 2008, 04:25 PM.
    Fred
    "fharris"+Chr$(64)+"evenlink"+Chr$(46)+"com"

  • #2
    Oh, a couple other issues! In Jose's Atl.inc file near the top (about 15 or so lines down) is this equate...

    $ATL_DLLNAME = "ATL.DLL" ' --> change as needed

    That doesn't work so good for me. I changed it to "ATL71.DLL". For one thing, I don't think the ActiveX licensing functions are in the atl.dll file. They may have been added with 70 or 71.
    It is between #IF... #ENDIF

    Code:
    #IF NOT %DEF($ATL_DLLNAME)
    $ATL_DLLNAME = "ATL.DLL"   ' --> change as needed
    #ENDIF
    So, if you want to use ATL71.DLL, you just need to define $ATL_DLLNAME before including "ATL.INC", instead of having to modify the include file, i.e.

    Code:
    $ATL_DLLNAME = "ATL71.DLL"
    #INCLUDE ONCE "ATL.INC"
    Forum: http://www.jose.it-berater.org/smfforum/index.php

    Comment


    • #3
      Thanks for clarifying that Jose! I'm guilty of not having looked close enough!
      Fred
      "fharris"+Chr$(64)+"evenlink"+Chr$(46)+"com"

      Comment

      Working...
      X