-
Re: CommonControls (Replacement of the MS common controls)
Excuse me , but I couldn`t find a description for the method in comments in activex version or even in mountainman`s documentation . Where can I find it ?
And for commandbuttonw , my bad . I have forgotten to set it at first .
Edit :
I found it in object browser . Thanks krool .
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
OldClock
If so, it would be good to rename that function to InitVisualStyleFixes to make things more clear.
I will make things more clear and followed your suggestion. Therefore VisualStyles.bas got updated.
* InitVisualStyles -> InitVisualStylesFixes
* SetupVisualStyles -> SetupVisualStylesFixes
Info:
I really thought about the renaming. Rather to rename as 'VisualStylesFixes' or as you suggested 'VisualStyleFixes'.
However, looking at this as a single noun phrase rather than "two words in plural" brought me to the conclusion to 'VisualStylesFixes', because a 'fix' is a relationship between multiple components.
Thus, the singular form is "visual styles fix". (There is never just 1 single visual style affected, thus this always refer to plural visual styles)
And as there are different kind of fixes the plural is "visual styles fixes".
-
5 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
Krool, Great!
Now a different topic - migration.
In my effort to migrate my large project to use VBCCR, I got the idea of simply replacing every occurrence of standard MS widgets with VBCCR ones using sed (tested in Linux using sed-4.5).
The script is:
Code:
sed -i -E \
-e "s/(Begin[[:blank:]]+)MSComCtl2.DTPicker([[:blank:]]+)/\1VBCCR16.DTPicker\2/" \
-e "s/(Begin[[:blank:]]+)MSComCtl2.MonthView([[:blank:]]+)/\1VBCCR16.MonthView\2/" \
-e "/[[:blank:]]+StartOfWeek[[:blank:]]+=[[:blank:]]+[[:digit:]]+/d" \
-e "s/(Begin[[:blank:]]+)MSComCtl2.UpDown([[:blank:]]+)/\1VBCCR16.UpDown\2/" \
-e "s/(Begin[[:blank:]]+)MSComctlLib.ListView([[:blank:]]+)/\1VBCCR16.ListView\2/" \
-e "s/(Begin[[:blank:]]+)MSComctlLib.ProgressBar([[:blank:]]+)/\1VBCCR16.ProgressBar\2/" \
-e "s/(Begin[[:blank:]]+)MSComctlLib.Slider([[:blank:]]+)/\1VBCCR16.Slider\2/" \
-e "s/(Begin[[:blank:]]+)MSComctlLib.TreeView([[:blank:]]+)/\1VBCCR16.TreeView\2/" \
-e "s/(Begin[[:blank:]]+)RichTextLib.RichTextBox([[:blank:]]+)/\1VBCCR16.RichTextBox\2/" \
-e "s/(Begin[[:blank:]]+)VB.CheckBox([[:blank:]]+)/\1VBCCR16.CheckBoxW\2/" \
-e "s/(Begin[[:blank:]]+)VB.ComboBox([[:blank:]]+)/\1VBCCR16.ComboBoxW\2/" \
-e "s/(Begin[[:blank:]]+)VB.CommandButton([[:blank:]]+)/\1VBCCR16.CommandButtonW\2/" \
-e "s/(Begin[[:blank:]]+)VB.Frame([[:blank:]]+)/\1VBCCR16.FrameW\2/" \
-e "s/(Begin[[:blank:]]+)VB.Label([[:blank:]]+)/\1VBCCR16.LabelW\2/" \
-e "s/(Begin[[:blank:]]+)VB.ListBox([[:blank:]]+)/\1VBCCR16.ListBoxW\2/" \
-e "s/(Begin[[:blank:]]+)VB.OptionButton([[:blank:]]+)/\1VBCCR16.OptionButtonW\2/" \
-e "s/(Begin[[:blank:]]+)VB.TextBox([[:blank:]]+)/\1VBCCR16.TextBoxW\2/" \
foo.frm
Test-project:
Attachment 173633
This seems to work well in the test-project. To prove it:
1. Open the mscc.vbp in the attached project, then open Form1 in the VB6 IDE.
Attachment 173619
2. Run the script on mscc.frm. All it does is to replace the MS widgets with the VBCCR ones, e.g.:
Code:
- Begin VB.OptionButton Option1
+ Begin VBCCR16.OptionButtonW Option1
3. Open mscc.vbp in the VB6 IDE, open Form1. Still works well, and all the widgets are now VBCCR, great.
Attachment 173627
However, when I do the same to my real project, then when I open the project in the VB6 IDE and try to open the form I get this error:
Quote:
Run-time error '713':
Class not registered.
Attachment 173629
When I try opening the form again, I now get this error:
Quote:
Run-time error '429':
ActiveX component can't create object
Attachment 173631
Any idea what this means, or where to look, or how to get VB6 to tell me which class is not registered?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
OldClock
Any idea what this means, or where to look, or how to get VB6 to tell me which class is not registered?
There are quite some other "naming swaps" needed.
Example: 'MSComctlLib.Node' -> 'VBCCR16.TvwNode'
and so on..
-
Re: CommonControls (Replacement of the MS common controls)
Those would cause problems at compile time, but not while just attempting to open a form, no?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
OldClock
Those would cause problems at compile time, but not while just attempting to open a form, no?
Which compile time errors? Then you know the spot which is causing the error and you can fix it.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
Which compile time errors? Then you know the spot which is causing the error and you can fix it.
Having MSComctlLib.Node in the code would cause errors at compile-time, but that is not the problem. The problem I'm experiencing is an error when trying to open a form in the IDE, and as far as I know the form has no MSComctlLib.Node (I searched through the form code).
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
OldClock
Having MSComctlLib.Node in the code would cause errors at compile-time, but that is not the problem. The problem I'm experiencing is an error when trying to open a form in the IDE, and as far as I know the form has no MSComctlLib.Node (I searched through the form code).
The .frx file is the problem in this case.
You can only delete it and supply then the lost information again in the properties.
-
Re: CommonControls (Replacement of the MS common controls)
Ah that's a pity - would have been so easy otherwise.
-
Re: CommonControls (Replacement of the MS common controls)
I managed to pull it off, and documented the process in the "How I migrated my project to VBCCR" thread:
http://www.vbforums.com/showthread.p...45#post5444945
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
OldClock
Good one. :thumb:
Update released. The migration problem for 'PasswordChar' got fixed. So you can update your script accordingly that the removal is not necessary anymore.
-
Re: CommonControls (Replacement of the MS common controls)
Thanks, script updated - PasswordChar line removed.
-
1 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
Krool, thank you for these controls, they saved my app.
I have a problem with the status bar control, the "Spring" autosize parameter seems to not work like the standard control.
When all the panels of the bar have the "Spring" parameter and you resize the container window, in the standard controls they resize proportionally, but in your control all but the last panel remain of the design-time size, while the last one fills all the new space.
What can I do to reproduce the standard control behavior?
Attached a sample project.
Attachment 173667
-
2 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
kr00l is centering text in textboxes broken in 1.6.58? I can't get it centered...
Attachment 173669
Attachment 173671
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
sbri
I have a problem with the status bar control, the "Spring" autosize parameter seems to not work like the standard control.
When all the panels of the bar have the "Spring" parameter and you resize the container window, in the standard controls they resize proportionally, but in your control all but the last panel remain of the design-time size, while the last one fills all the new space.
What can I do to reproduce the standard control behavior?
Fixed. Thanks!! (Update released)
Quote:
Originally Posted by
OldClock
kr00l is centering text in textboxes broken in 1.6.58? I can't get it centered...
I can't reproduce. For me it's centering and no problem in your demo... :confused:
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
Fixed. Thanks!! (Update released)
Thank you for the fix!
-
Re: CommonControls (Replacement of the MS common controls)
(duplicate please delete)
-
3 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
Hi kr00l
In relation to http://www.vbforums.com/showthread.p...=1#post5446145
My MainForm.frm is very large. Editing it in the VB6 IDE was slow when using Microsoft Windows Common Controls(-2) 6.0, but now with VBCCR16 (currently on 1.06.0058 OCX) it has become unusably slow (>20 seconds to open the MainForm for editing in the IDE). I suspect my program is larger than most, so it's no surprise that these issues appear.
Sometimes a crash occurs while opening the main form in the IDE or in the compiled program. The first time I run the compiled EXE after booting Windows (XP SP3 in VBox), the login screen shows correctly, and when I log it and the program tries to show the MainForm it crashes with a VBCCR window appearing with the error message
Quote:
Run-time error '0'
The login screen should look like this:
Attachment 173803
When it crashes, it becomes like this, with those diagonal lines and horrible kerning:
Attachment 173805
The error signature:
Quote:
AppName: cannonfodder.exe AppVer: 3.0.0.5 ModName: msvbvm60.dll
ModVer: 6.0.98.2 Offset: 00063f5a
If I re-run the EXE and re-login, the MainForm shows correctly.
These crashes do not result from the program's code, as it has been stable for a long time, and only appeared after switching to VBCCR. I suppose they come from a combination of factors: the main form containing a huge number of controls (2500 in total), perhaps more than VB6 was designed for; imperfections in VBCCR; and bugs in Windows.
Sometimes the same sort of crash happens from within the IDE, with the diagonal lines and bad kerning, but there the error signature says:
Quote:
AppName: vb6.exe AppVer: 6.0.97.82 ModName: unknown
ModVer: 0.0.0.0 Offset: 1110a460
Is this a known issue, and is there anything I can do to mitigate it?
Unfortunately I am not allowed to upload the code.
I also ran into this error:
Quote:
Run-time error '7':
Out of memory
Attachment 173807
It turns out this has nothing to do with memory, and appears only if the OCX file is not placed alongside my program's executable (I use side-by-side loading via the manifest file embedded in the resource file). It would be better if the error message actually said that the OCX file is missing.
Kind regards
-
Re: CommonControls (Replacement of the MS common controls)
OldClock,
The run time error '0' we had already a few times in this thread.
Its an incompatibility of 32 bit icons loaded at design time on in Vista+ (ok so far) but then later crashes when you attempt to use them in Win XP. (MS issue)
-
4 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
Hi Krool,
Thank you for your effort to keep this project alive and up-to-date, it's a huge commitment, also huge time-consumer. Appreciate it.
Today I decided to replace some of components in my application with a ListView control. Since dark theme is widely used nowadays, my app also support it. However, when I added Groups to my listview, the result wasn't very beautiful as you can see below:
Attachment 173811
Initially, I tried to set fore color of the Group text as follows:
Code:
Friend Property Let FGroupForeColor(ByVal Value As OLE_COLOR)
Dim groupMetrics As LVGROUPMETRICS
groupMetrics.cbSize = Len(groupMetrics)
groupMetrics.Mask = LVGMF_TEXTCOLOR
groupMetrics.crHeader = Value
If ListViewHandle <> 0 Then
SendMessage ListViewHandle, LVM_SETGROUPMETRICS, 0, ByVal VarPtr(groupMetrics)
Me.Refresh
End If
End Property
Unfortunately, LVGMF_TEXTCOLOR is not implemented (really) and the result was...none.
Most of the Google results state that changing color of group text is not possible (like this). However, I found that article in MSDN forum:
https://social.msdn.microsoft.com/Fo...orum=vbgeneral
and after some time, I had this:
Attachment 173813
After adding centered blank header title:
Attachment 173817
The code is quite ugly but it works somehow, just to prove that it is completely possible to draw a custom Group header:
Code:
Case NM_CUSTOMDRAW
Dim FontHandle As Long, Bold As Boolean, ForeColor As OLE_COLOR
Dim NMLVCD As NMLVCUSTOMDRAW
CopyMemory NMLVCD, ByVal lParam, LenB(NMLVCD)
Select Case NMLVCD.NMCD.dwDrawStage
Case CDDS_PREPAINT
WindowProcUserControl = CDRF_NOTIFYITEMDRAW
If NMLVCD.dwItemType = LVCDI_GROUP Then
Dim rectHeader As RECT: rectHeader.Top = LVGGR_HEADER
Dim nItem As Long: nItem = NMLVCD.NMCD.dwItemSpec
Dim nRet As Long: nRet = SendMessage(ListViewHandle, LVM_GETGROUPRECT, nItem, rectHeader)
Dim hPen As Long: hPen = CreatePen(0, 1, vbRed)
Dim OldhPen As Long: OldhPen = SelectObject(NMLVCD.NMCD.hDC, hPen)
Dim hBrush As Long: hBrush = CreateSolidBrush(&H80FF&)
Dim OldhBrush As Long: OldhBrush = SelectObject(NMLVCD.NMCD.hDC, hBrush)
Rectangle NMLVCD.NMCD.hDC, rectHeader.Left, rectHeader.Top, rectHeader.Right, rectHeader.Bottom
Call SetTextColor(NMLVCD.NMCD.hDC, vbGreen)
Call DrawText(NMLVCD.NMCD.hDC, "TEST1-2-3", Len("TEST1-2-3"), rectHeader, DT_SINGLELINE Or DT_CENTER Or DT_VCENTER)
DeleteObject hPen: DeleteObject hBrush
End If
Exit Function
I believe that many people will appreciate a custom Group Header. My knowledge is not enough to make it bullet-proof, I just copy-paste. For example, now adding a footer doesn't work - IDE crash.
Dark theme really doesn't look good with blue group header :)
Thank you.
Edit: the code above doesn't break Group.Footer, in my case the Footer works only when SubsetLink is set, otherwise, the IDE crashes. It's the same with Standard EXE Version sample.
Code:
With .Groups.Add(, , "Header Title")
'.SubsetLink = "Subset Link?"
.Footer = "Footer Title"
.FooterAlignment = LvwGroupFooterAlignmentCenter
End With
-
1 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
Code:
If NMLVCD.dwItemType = LVCDI_GROUP Then
Dim rectHeader As RECT: rectHeader.Top = LVGGR_HEADER
Dim nItem As Long: nItem = NMLVCD.NMCD.dwItemSpec
Dim nRet As Long: nRet = SendMessage(ListViewHandle, LVM_GETGROUPRECT, nItem, rectHeader)
Dim hPen As Long: hPen = CreatePen(5, 1, vb3DFace)
Dim OldhPen As Long: OldhPen = SelectObject(NMLVCD.NMCD.hDC, hPen)
Dim hBrush As Long: hBrush = CreateSolidBrush(&H80FF&)
Dim OldhBrush As Long: OldhBrush = SelectObject(NMLVCD.NMCD.hDC, hBrush)
Dim lvg As LVGROUP: With lvg
.cbSize = Len(lvg)
.Mask = LVGF_STATE Or LVGF_GROUPID Or LVGF_HEADER
End With
nRet = SendMessage(ListViewHandle, LVM_GETGROUPINFO, nItem, lvg)
Dim sText As String: sText = GetStringFromPointer(lvg.pszHeader)
Call Rectangle(NMLVCD.NMCD.hDC, rectHeader.Left, rectHeader.Top, rectHeader.Right, rectHeader.Bottom)
Call SetTextColor(NMLVCD.NMCD.hDC, vbGreen)
Call DrawText(NMLVCD.NMCD.hDC, sText, Len(sText), rectHeader, DT_SINGLELINE Or DT_CENTER Or DT_VCENTER Or DT_NOCLIP)
DeleteObject hPen: DeleteObject hBrush
WindowProcUserControl = CDRF_SKIPDEFAULT
Else
WindowProcUserControl = CDRF_NOTIFYITEMDRAW
End If
Attachment 173823
It's a fun to experiment :)
-
Re: CommonControls (Replacement of the MS common controls)
Now that LabelW is Windowless, does it no longer support OLEDragDrop?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
dseaman
Now that LabelW is Windowless, does it no longer support OLEDragDrop?
My bad. It was not Automatic. I can set Caption via Private Sub LabelW1_OLEDragDrop Event.
-
Re: CommonControls (Replacement of the MS common controls)
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
dseaman
My bad. It was not Automatic. I can set Caption via Private Sub LabelW1_OLEDragDrop Event.
Glad you figured it out. But, LabelW was from the beginning windowless. Just for the records..
-
Re: CommonControls (Replacement of the MS common controls)
Hi!
I am looking at the Checkbox ownerdraw event, could you please give a description of the paramaters
OwnerDraw(ByVal Action As Long, ByVal State As Long, ByVal hDC As Long, ByVal Left As Long, ByVal Top As Long, ByVal Right As Long, ByVal Bottom As Long)
thanks
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
npac4o
the code above doesn't break
Group.Footer, in my case the
Footer works only when
SubsetLink is set, otherwise, the IDE crashes. It's the same with
Standard EXE Version sample.
Code:
With .Groups.Add(, , "Header Title")
'.SubsetLink = "Subset Link?"
.Footer = "Footer Title"
.FooterAlignment = LvwGroupFooterAlignmentCenter
End With
Interesting. However, it applies only when the ListView1.GroupSubsetCount is > 0. (feature is enabled)
I don't know how to solve it, seems like a comctl32.dll bug.
But, you can workaround it by going way 1 or way 2:
Way1:
Code:
With .Groups.Add(, , "Header Title")
.SubsetLink = "" ' StrPtr <> 0
.Footer = "Footer Title"
.FooterAlignment = LvwGroupFooterAlignmentCenter
End With
Way2: (can be done of course already at design time. A new ListView has GroupSubsetCount = 0 by default)
Code:
ListView1.GroupSubsetCount = 0
Quote:
Originally Posted by
Semke
Hi!
I am looking at the Checkbox ownerdraw event, could you please give a description of the paramaters
OwnerDraw(ByVal Action As Long, ByVal State As Long, ByVal hDC As Long, ByVal Left As Long, ByVal Top As Long, ByVal Right As Long, ByVal Bottom As Long)
Certain members of the DRAWITEMSTRUCT are passed to the OwnerDraw event.
Code:
typedef struct tagDRAWITEMSTRUCT {
UINT CtlType;
UINT CtlID;
UINT itemID;
UINT itemAction;
UINT itemState;
HWND hwndItem;
HDC hDC;
RECT rcItem;
ULONG_PTR itemData;
} DRAWITEMSTRUCT, *PDRAWITEMSTRUCT, *LPDRAWITEMSTRUCT;
itemAction -> Action
itemState -> State
hDC -> hDC
rcItem -> Left, Top, Right, Bottom
You may find plenty of examples on the net about subclassing a checkbox and handling WM_DRAWITEM.
So just look at those snippets and implement them accordingly into the OwnerDraw event.
-
4 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
Hey
I'm making a UserControl button using VBCCR 1.06.0059 widgets.
The button has three states:
The button is made using the Image, LabelW and FrameW widgets. Some VBCCR widgets, such as LabelW and FrameW, support the MouseEnter and MouseLeave events, however the UserControl itself does not. I created procedures for LabelW and FrameW to support the MouseEnter and MouseLeave events, however they never fire. What am I doing wrong?
I need the UserControl to change the image to "hover" when the user moves the mouse over it, and to revert the image to "normal" when the mouse leaves. Since the picture doesn't change on MouseEnter/MouseLeave, I made it change on Click to just show that the Click event works while the others don't.
The project is attached. Note how the FrameW1_MouseMove and LabelW1_MouseMove events fire (if you uncomment them), while UserControl_MouseMove and none of the MouseEnter/MouseLeave events ever fire.
Attachment 174097
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
OldClock
I'm making a UserControl button using VBCCR 1.06.0059 widgets.
The button has three states:
The button is made using the Image, LabelW and FrameW widgets. Some VBCCR widgets, such as LabelW and FrameW, support the MouseEnter and MouseLeave events, however the UserControl itself does not. I created procedures for LabelW and FrameW to support the MouseEnter and MouseLeave events, however they never fire. What am I doing wrong?
I need the UserControl to change the image to "hover" when the user moves the mouse over it, and to revert the image to "normal" when the mouse leaves. Since the picture doesn't change on MouseEnter/MouseLeave, I made it change on Click to just show that the Click event works while the others don't.
The project is attached. Note how the
FrameW1_MouseMove and
LabelW1_MouseMove events fire (if you uncomment them), while
UserControl_MouseMove and none of the
MouseEnter/
MouseLeave events ever fire.
Set .MouseTrack = True for FrameW and LabelW and try again.
-
Re: CommonControls (Replacement of the MS common controls)
-
2 Attachment(s)
Re: CommonControls (Replacement of the MS common controls)
Hello Krool, I'm using some of your controls in a project so thank you very much.
I want to ask you what's the purpose of having two properties in the ScrollBar control: RightToLeft and RightToLeftLayout that need to be both set to True to set the direction RTL?
Also I want to report that with the last version of the controls, opening the main form, selecting the ProgressBar, and pressing F4 to show the property screen, I get this error message:
Attachment 174233
The message says: Expected Function or variable.
I think it might be because you updated OLEGuids.tlb and I'm using an old version.
Anyway the controls that I am actually using in my project are from the older version (I downloaded it about two months ago), so I don't know if it would be a good idea to register the newer OLEGuids.tlb in my case.
I attached the image full scaled.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Eduardo-
I'm using some of your controls in a project so thank you very much.
I want to ask you what's the purpose of having two properties in the ScrollBar control: RightToLeft and RightToLeftLayout that need to be both set to True to set the direction RTL?
It's a complex story. Every control has it's unique treatment.
In general, when a RightToLeft = True then apply WS_EX_RTLREADING and if RightToLeft and RightToLeftLayout = True then apply only WS_EX_LAYOUTRTL.
Here is my internal documentation about the RightToLeft handling for each control:
Code:
> CoolBar
dwMask : RightToLeftLayout = True WS_EX_LAYOUTRTL; CDDS_PREPAINT in NM_CUSTOMDRAW SetTextAlign
Extra : RightToLeftLayout property
> LinkLabel
dwMask : CDDS_PREPAINT in NM_CUSTOMDRAW SetTextAlign
Extra : InitReverse .Alignment; ToolTip
> DTPicker
dwMask : RightToLeftLayout = True WS_EX_LAYOUTRTL; EditHandle: WS_EX_RTLREADING
Extra : RightToLeftLayout property; Reverse .CalendarRightAligned;
> MonthView
dwMask : RightToLeftLayout = True WS_EX_LAYOUTRTL
Extra : RightToLeftLayout property
> Pager
dwMask : RightToLeftLayout = True WS_EX_LAYOUTRTL
Extra : RightToLeftLayout property
> ListView
dwMask : RightToLeftLayout = True WS_EX_LAYOUTRTL; WS_EX_RTLREADING
Extra : RightToLeftLayout property; ToolTip; HDF_RTLREADING
> ComboBoxW/FontCombo
dwMask : WS_EX_RTLREADING Or WS_EX_RIGHT Or WS_EX_LEFTSCROLLBAR
Extra : Clear ES_RIGHT in .hWndEdit
> ImageCombo
dwMask : RightToLeftLayout = True WS_EX_LAYOUTRTL; WS_EX_RTLREADING Or WS_EX_RIGHT Or WS_EX_LEFTSCROLLBAR
Extra : RightToLeftLayout property; Clear ES_RIGHT in .hWndEdit
> ToolBar
dwMask : RightToLeftLayout = True WS_EX_LAYOUTRTL; TB_SETDRAWTEXTFLAGS DT_RTLREADING
Extra : RightToLeftLayout property; TPM_RIGHTALIGN+TPM_LAYOUTRTL in ShowButtonMenuItems; ToolTip; Call ReCreateToolBar
> Slider
dwMask : RightToLeftLayout = True WS_EX_LAYOUTRTL
Extra : RightToLeftLayout property; ToolTip; Call ReCreateSlider
> UpDown
dwMask : RightToLeftLayout = True WS_EX_LAYOUTRTL
Extra : RightToLeftLayout property
> ProgressBar
dwMask : RightToLeftLayout = True WS_EX_LAYOUTRTL
Extra : RightToLeftLayout property
> CommandLink
dwMask : RightToLeftLayout = True WS_EX_LAYOUTRTL; WS_EX_RTLREADING
Extra : RightToLeftLayout property
> Animation
dwMask : RightToLeftLayout = True WS_EX_LAYOUTRTL
Extra : RightToLeftLayout property; Call ReCreateAnimation
> TreeView
dwMask : RightToLeftLayout = True WS_EX_LAYOUTRTL; TVS_RTLREADING
Extra : RightToLeftLayout property
> StatusBar
dwMask : RightToLeftLayout = True WS_EX_LAYOUTRTL; 0
Extra : RightToLeftLayout property; ToolTip; DrawPanel SetTextAlign
> TabStrip
dwMask : RightToLeftLayout = True WS_EX_LAYOUTRTL; WS_EX_RTLREADING
Extra : RightToLeftLayout property; MapWindowPoints; ToolTip; Call ReCreateTabStrip
> SpinBox
dwMask : Edit: WS_EX_RTLREADING; UpDown: 0
Extra : InitReverse/Reverse .Alignment; InitReverse/Reverse .TextAlignment; Remove .Orientation
> CheckBoxW
dwMask : WS_EX_RTLREADING
Extra : InitReverse .Alignment; InitReverse/Reverse .TextAlignment; InitReverse/Reverse .ImageListAlignment
> CommandButtonW
dwMask : WS_EX_RTLREADING
Extra : Reverse .Alignment; InitReverse/Reverse .ImageListAlignment; InitReverse/Reverse .SplitButtonAlignment
> LabelW
dwMask : DT_RTLREADING
Extra : InitReverse .Alignment
> ListBoxW
dwMask : WS_EX_RTLREADING Or WS_EX_RIGHT Or WS_EX_LEFTSCROLLBAR
Extra : vbListBoxCheckbox SetTextAlign
> FrameW
dwMask : WS_EX_RTLREADING
Extra : InitReverse/Reverse .Alignment
> TextBoxW
dwMask : WS_EX_RTLREADING Or WS_EX_LEFTSCROLLBAR
Extra : InitReverse .Alignment
> RichTextBox
dwMask : WS_EX_RTLREADING Or WS_EX_RIGHT Or WS_EX_LEFTSCROLLBAR
Extra : Call ReCreateRichTextBox()
> OptionButtonW
dwMask : WS_EX_RTLREADING
Extra : InitReverse .Alignment; InitReverse/Reverse .TextAlignment; InitReverse/Reverse .ImageListAlignment
Quote:
Originally Posted by
Eduardo-
I think it might be because you updated OLEGuids.tlb and I'm using an old version.
Yes, just copy/paste the new OLEGuids.tlb and replace the old one.
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
It's a complex story. Every control has it's unique treatment.
In general, when a RightToLeft = True then apply WS_EX_RTLREADING and if RightToLeft and RightToLeftLayout = True then apply only WS_EX_LAYOUTRTL.
I think I understand that you added the RightToLeft property to all controls that need to have a RightToLeftLayout property even if they are not displaying any text, just to standardize the controls properties and how they work.
The rule is: first set RightToLeft to True, then you are allowed to also set RightToLeftLayout to True.
Is that right?
Quote:
Originally Posted by
Krool
Yes, just copy/paste the new OLEGuids.tlb and replace the old one.
But can I have any problem if I stay using the old version of the controls with the new version of OLEGuids.tlb?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Eduardo-
I think I understand that you added the RightToLeft property to all controls that need to have a RightToLeftLayout property even if they are not displaying any text, just to standardize the controls properties and how they work.
The rule is: first set RightToLeft to True, then you are allowed to also set RightToLeftLayout to True.
Is that right?
Yes
Quote:
Originally Posted by
Eduardo-
But can I have any problem if I stay using the old version of the controls with the new version of OLEGuids.tlb?
Yes you can have problems. What's the reason to only update one thing but not the other?
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
Yes
OK.
Quote:
Originally Posted by
Krool
Yes you can have problems. What's the reason to only update one thing but not the other?
I didn't update anything.
I just wanted to see something and for it I downloaded and opened your latest version of Common Controls project, and then I saw the error and wanted to report it.
But no, I'm not planning to change the controls in my project often unless I have a reason. I'm just using some LabelWs, ComboBoxWs and a ProgressBar in a quite straightforward manner, mainly for supporting Unicode and RightToLeft (I'm not using the OCX version but the source code, and just what I need).
What problem can I have if I ever register the new TLB? (I guess a lot of people can be in the same situation because I don't think that everybody is updating their projects to the latest version of the controls continuously, but they could eventually register the new TLB -on purpose or perhaps unintentionally)
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Eduardo-
(I guess a lot of people can be in the same situation because I don't think that everybody is updating their projects to the latest version of the controls continuously, but they could eventually register the new TLB -on purpose or perhaps unintentionally)
It should have been perfect from the beginning. Somehow this was not possible and I am sorry for the continuously updates..
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
It should have been perfect from the beginning. Somehow this was not possible and I am sorry for the continuously updates..
Sorry, but I think you got me wrong, I was answering to the question:
Quote:
Originally Posted by
Krool
What's the reason to only update one thing but not the other?
not complaining.
I was trying to help when I reported what I thought it could be an error.
-
Re: CommonControls (Replacement of the MS common controls)
Is Windows XP supposed to be supported? I fired up a small XP VM and get some runtime errors with the Toolbar or maybe the related ImageList. I'm not planning to deploy to XP, so I won't bother looking into it any further if that OS isn't supported by VBCCR16.OCX.
-
Re: CommonControls (Replacement of the MS common controls)
-
Re: CommonControls (Replacement of the MS common controls)
Quote:
Originally Posted by
Krool
It should have been perfect from the beginning. Somehow this was not possible and I am sorry for the continuously updates..
Sorry Krool if you got offended. It wasn't my intention.
Sometimes we as programmers expect that everybody will update to the latest version, but for the users sometimes it is not so easy due to different reasons.
I want to comment that I tested updating to your latest version but I experienced an issue, so I went back to the previous one.
The issue can be seen also in your demo project.
To do so please open MainForm and go to the code in Form_Load.
Then put a stop watch in the first line (Call SetupVisualStylesFixes(Me)) by pressing F9.
Press F5 to run.
When it stops on that line, press F8 to continue step by step.
If the problem is reproduced successfully there, you'll see that the code flow goes to the line:
Code:
Private Function IOleControl_AddRef(ByRef This As Long) As Long
in VTableHandle module and does not move further by pressing F8 more times. It only resumes by pressing F5, but then lossing the possibility to run step by step.
I also found by chance an error in your demo project: to see it click on the button "RichTextBox Demo". The test program is trying to assign a read-only property.
HTH