-
-
Notifications
You must be signed in to change notification settings - Fork 26
Closed
Labels
bugSomething isn't workingSomething isn't workingconfirmedthe issue has been verifiedthe issue has been verifiedtypeinfo
Description
Describe the bug
There seems to be a difference between tB OLE_COLOR and VBx OLE_COLOR.
Maybe OLE_COLOR is only treated as Long in tB and in VBx something different?
Because a color property page is blank in tB as can be proofed in below code.
To Reproduce
Module MainModule
Private Type CLSID
Data1 As Long
Data2 As Integer
Data3 As Integer
Data4(0 To 7) As Byte
End Type
Private Declare Function OleCreatePropertyFrame Lib "olepro32" (ByVal hWndOwner As Long, ByVal X As Long, ByVal Y As Long, ByVal lpszCaption As Long, ByVal cObjects As Long, ByRef pUnk As IUnknown, ByVal cPages As Long, ByRef pPageCLSID As Any, ByVal LCID As Long, ByVal dwReserved As Long, ByVal pvReserved As Long) As Long
Private Declare Function CLSIDFromString Lib "ole32" (ByVal lpszProgID As Long, ByRef pCLSID As Any) As Long
Private Const CLSID_StandardColorPage As String = "{7EBDAAE1-8120-11CF-899F-00AA00688B10}"
Public Sub Main()
Dim This As ColorProps = New ColorProps
This.FInit vbRed, vbBlue
Dim CLSID As CLSID, OldColor As OLE_COLOR
CLSIDFromString StrPtr(CLSID_StandardColorPage), CLSID
OleCreatePropertyFrame 0, 0, 0, StrPtr("test color properties"), 1, This, 1, CLSID, 0, 0, 0
MsgBox This.BackColor & "/" & This.ForeColor
End Sub
End Module
Class ColorProps
Attribute VB_Name = "ColorProps"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
Private PropBackColor As OLE_COLOR, PropForeColor As OLE_COLOR
Friend Sub FInit(ByVal BackColor As OLE_COLOR, ByVal ForeColor As OLE_COLOR)
PropBackColor = BackColor
PropForeColor = ForeColor
End Sub
Public Property Get BackColor() As OLE_COLOR
Attribute BackColor.VB_Description = "Returns/sets the background color used to display text and graphics in an object."
BackColor = PropBackColor
End Property
Public Property Let BackColor(ByVal Value As OLE_COLOR)
PropBackColor = Value
End Property
Public Property Get ForeColor() As OLE_COLOR
Attribute ForeColor.VB_Description = "Returns/sets the foreground color used to display text and graphics in an object."
ForeColor = PropForeColor
End Property
Public Property Let ForeColor(ByVal Value As OLE_COLOR)
PropForeColor = Value
End Property
End Class
Expected behavior
in VB6 the following window appears:
Desktop (please complete the following information):
- OS: [e.g. Windows 10]
- twinBASIC compiler version [e.g. 0.10.5021]
Additional context
n/a
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingconfirmedthe issue has been verifiedthe issue has been verifiedtypeinfo