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
1
vote
1 answer

Runtime Error 429 - ActiveX Component Can't Create Object

We have a VB6 program being run on Windows 2008 R2 Server. We are getting the error: Runtime Error 429 -ActiveX Component Can't Create Object ActiveX component: MSCOMCTL.OCX The same program is running successfully on another Windows 2008 R2…
user2106568
  • 93
  • 1
  • 3
  • 10
1
vote
2 answers

vb6 not able to load forms with status bar control on windows 7 64 bit

I am trying to load open vb6 form but it says cannot find project or library and the cursor is pointing to statusbar. This particular line of code: Private mStatus As StatusBar I have installed the common controls for vb6 update from Microsoft but…
rlee923
  • 758
  • 3
  • 14
  • 28
1
vote
1 answer

DTM_SETFORMAT for a Time Picker control doesn't honor format specifier

I'm using the following code to set the format of the Time Picker control (with the Win32 class name SysDateTimePick32) to display time in US English format only: LCID lcid = MAKELCID(MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US),…
c00000fd
  • 20,994
  • 29
  • 177
  • 400
1
vote
1 answer

Listview Item return after delete pure win32

My problem with Listview on pure Win32 program When i delete the item then click at it location before delete the item return. So the Listview Can't delete any items actually This the program and source : #include #include…
1
vote
1 answer

MS Header control still draws border for custom-drawn items

We are developing a custom grid control in VB6 (still need to use the classic VB - sorry :). It has a custom header based on the standard OS MS Header Control from ComCtl created using the corresponding WinAPI call to CreateWindowEx. The header…
TecMan
  • 2,743
  • 2
  • 30
  • 64
1
vote
1 answer

TVM_SETBKCOLOR and TreeView_SetBkColor not declared in this scope?

I'm getting the strange scope error: 'TVM_SETBKCOLOR' was not declared in this scope and similar 'TreeView_SetBkColor' was not declared in this scope. I can't figure out why this is happening: I have included commctrl.h Other treeview macros work…
Ben
  • 54,723
  • 49
  • 178
  • 224
1
vote
1 answer

GetThemeFont function not working

I'm working on a custom header control CMyHeaderCtrl which is derived from the MFC class CHeaderCtrl and overrides the DrawItem method to do some custom drawing when the application is themed. At first I try to determine the theme font for header…
alexfr
  • 1,161
  • 3
  • 12
  • 23
1
vote
2 answers

ComboBox Subclassing Listbox

I am trying to Subclass the Listbox and the Edit Control of a Combobox for some customasing reasons. Below is the code work . Subclassing for Edit Control is working perfect but Listbox is not getting the messeage of MouseDown. void Subclass(HWND…
Murat Tutu
  • 41
  • 2
  • 4
0
votes
0 answers

Do we need to call InitCommonControls/InitCommonControlsEx before drawing OS-styled controls with DrawThemeBackground?

I am working on a legacy ActiveX control that implements custom drawing of elementary Windows controls like combo button and check box. If the Windows visual styles are available, these controls are drawn with the DrawThemeBackground function like…
TecMan
  • 2,743
  • 2
  • 30
  • 64
0
votes
0 answers

Long multi-line tooltips cut off if first line is too short

Trying to show a balloon hint in Windows normally works fine: Looket here • This is a short line And you can have very long balloon hints: Looket here • This is a a very long line, certainly longer than the last example And you can have…
Ian Boyd
  • 246,734
  • 253
  • 869
  • 1,219
0
votes
1 answer

How to change the font style of the text of a common control like button, label, etc. in c++ using GDI+?

I am trying to change the font style of a button using GDI+ but I don't know how to do it. My button - HWND btn = CreateWindow(L"BUTTON", L"My button", WS_TABSTOP | WS_VISIBLE | WS_CHILD | BS_DEFPUSHBUTTON, 50, 50, 100, 300, hWnd, NULL, NULL,…
0
votes
0 answers

Image in button isn't scaled to the size of the button (WIN32 API)

So I was trying to make an image button using the WIN32 API. The problem is, that the image gets cropped, because the button is smaller than the image. In a statics control, I would user the SS_REALSIZECONTROL tag, but in a button that doesn't seem…
aviad1
  • 354
  • 1
  • 10
0
votes
1 answer

Color specific treeview item using WIN32 API (C/C++)

I wanted to create a tree view where specific items have a different back & text colors. I did found the following solution in the internet: Win32 Custom Draw Treeview Control, but here they color each item according to its level. This is close to…
aviad1
  • 354
  • 1
  • 10
0
votes
0 answers

VBA ListView column autosize after UserForm .Hide then .Show

I have a UserForm that uses a ListView control (from Microsoft Common Controls). To autosize the columns of this ListView I use the following WinAPI call within the UserForm, which works fine and correctly sets the size of the column: Private…
Mrfence
  • 350
  • 2
  • 12
0
votes
1 answer

Creating a simple tree view using Common Controls in C

So I was trying to create a simple tree view using the Win32 API and CommnoControls. I've created a simple window, and in its WM_CREATE event, I've done the following: HWND treeView = CreateWindowA(WC_TREEVIEWA, NULL, WS_VISIBLE | WS_CHILD, 10, 10, …
aviad1
  • 354
  • 1
  • 10