Questions tagged [common-controls]

A set of extended windows desktop controls like TreeView, ListView, ProgressBar and TrackBar. Available as ActiveX mscomctl.ocx library and very popular in Visual Basic and Delphi. Superseeded by current ui libraries but still working today.

The Windows Common Controls are a set of standardized user interface components. They originated in Windows 3.11 and were implemented by COMMCTRL.DLL (later named COMCTL32.DLL in Windows 95). Information about the history of the common controls is available here.

Notable controls (which where fancy in the 1990s) are:

  • TreeView - display hierarchical data
  • ListView - display lists with icons (comparable to the lists in the windows explorer application)
  • ProgressBar - a component which displays application progress
  • StatusBar - a way to display status messages in a desktop application window.

MSDN has a complete list of the provided controls.

The controls are distributed with the operating system and coupled to the .

To maintain backwards compatibility, several versions of the controls may exist on a given system. Applications have to specify by an application manifest, which version of the controls should be used.

Nowadays the controls still work, but are replaced by modern user interface toolkits (like or )

102 questions
3
votes
1 answer

How to get the actual size of the toolbar button created with BTNS_AUTOSIZE style?

I created a toolbar with the following styles: DWORD dwStyle = WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN | WS_CLIPSIBLINGS | CCS_NODIVIDER | CCS_NOPARENTALIGN | CCS_NORESIZE | TBSTYLE_FLAT | TBSTYLE_LIST; Then I fill…
Ilia
  • 425
  • 2
  • 10
3
votes
1 answer

How do I get full unicode support including chinese characters in VCL controls or Windows Common Controls on XP like it is in Win7

I have an application that I have been testing for internationalization support. There is, for example, a standard TEdit control, with the font.Name = 'Arial'. On Windows 7, it seems to automatically grab the glyphs for CJK characters, from…
Warren P
  • 65,725
  • 40
  • 181
  • 316
3
votes
3 answers

In Windows 7 X64, statusBar does not show text for the panels starting from the 11th correctly

Summarization: (1) This is very likely to be a bug. However, I cannot say for sure whether it is more related to 64bit OS, or VCL, or MFC wrapper. Please check the answers and comments below from Delphi experts. (2) Workaround for me: a. The…
SOUser
  • 3,802
  • 5
  • 33
  • 63
3
votes
2 answers

Does LVS_EX_FULLROWSELECT have any compatibility issues with other styles?

I am trying to set the LVS_EX_FULLROWSELECT style on my grid list control as I want full row selection. However apparently it doesn't have any effect. Since I am using a number of other styles as well, I am wondering if LVS_EX_FULLROWSELECT has any…
Jahanzeb Farooq
  • 1,948
  • 4
  • 27
  • 27
3
votes
0 answers

GetSysColorBrush constant for background color of a tab control?

I'm using the following APIs to draw a small stock icon on the background of my tab control window (with class name SysTabControl32): DrawIconEx(hDC, rcIcon.left, rcIcon.top, hIconSmInfo, rcIcon.Width(), rcIcon.Height(), NULL, …
c00000fd
  • 20,994
  • 29
  • 177
  • 400
3
votes
1 answer

Win32: How to prevent DateTimePicker from accepting 2-digit years?

Microsoft's DateTimePicker common control shows ShortDate's according to the configured Locale settings. The customer's computer is configured with a 2-digit year ShortDateFormat (d/M/yy), so the DateTimePicker shows 2-digit years: When the user…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
3
votes
0 answers

How to place a toolbar inside an edit control?

My original goal was to place an X button inside an edit control (it later turned out that this edit control by itself must be a part of the combo box.) I've been suggested to use this article as a guidance. To make it look a little bit "prettier" I…
c00000fd
  • 20,994
  • 29
  • 177
  • 400
3
votes
1 answer

Install MSCOMCTL.OCX 2.1 on a naked system

How to install programmatically a current version of mscomctl.ocx on a Windows 8.1 system, so that version 2.1 of the type library is registered? Installing the ancient "Common controls" download only installs version 2.0. I think I need the update…
krlmlr
  • 25,056
  • 14
  • 120
  • 217
3
votes
3 answers

How do I prevent flickering on CListCtrl?

I'm using a CListCtrl/CListView report view (LVS_REPORT) in virtual mode (LVS_OWNERDATA) with LVS_EX_DOUBLEBUFFER enabled and I encounter ugly flickering. Double buffer have a real effect but it doesn't stop all flickering (without it very…
sorin
  • 161,544
  • 178
  • 535
  • 806
3
votes
3 answers

Progress bars with color and borders with common controls

I had colorful progress bars in my GUI that I liked: However, I wanted the GUI to look be in the Windows 7 style when on Windows 7, so I added this pragma #pragma comment( linker, "/manifestdependency:\"type='win32'…
Shaul
  • 437
  • 5
  • 17
3
votes
1 answer

Is it possible to simulate tri-state checkboxes in Microsoft TreeView Control 6.0 (MSComctlLib.TreeCtrl.2)?

I'm using the Microsoft TreeView Control 6.0 in Microsoft Access. It seems to work very well, except that it doesn't seem to have a greyed out state, indicating that some, but not all child nodes are checked. I've looked into using my own images to…
Matty Brown
  • 404
  • 3
  • 16
2
votes
1 answer

XP Common Controls Manifest: processorArchitecture='x86' vs. processorArchitecture='*'

What's the advantage of saying #pragma comment(linker, "/manifestdependency:\"type='win32'" \ "name='Microsoft.Windows.Common-Controls'" \ "version='6.0.0.0'" \ …
user541686
  • 205,094
  • 128
  • 528
  • 886
2
votes
0 answers

Turning Explorer Visual Style on and off does not restore ListView look

Because I don't like the way the ListView looks with the Explorer theme combined with grid-lines in report view I want to turn the theme off when grid-lines are on. The problem is that once the Explorer theme has been applied it is not possible to…
Anders
  • 97,548
  • 12
  • 110
  • 164
2
votes
1 answer

C/C++ Common Controls detecting double-click of TVItem

Is there any way to detect if a tree view control (and specifically a TVITEM) is double clicked using Common Controls & WINAPI? I mean in my wndproc function of a form. If so, what are the msg, wParam & lParam in that case?
aviad1
  • 354
  • 1
  • 10
2
votes
0 answers

VBCCR14.OCX error loading dll in VB6

I'm using VBCCR14.dll Activex Common Control in order to support Unicode. In the developed machine it works perfectly but when the program is running from a different machine it gives an error saying that, "Error loading dll". I've also registered…
Lishani
  • 57
  • 6