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
2
votes
1 answer

How to know offsets within EDIT control to draw text?

I'm subclassing the EDIT common control to add some special placeholder text behavior in the background and I'm curious how to know offsets to draw text within in? h and w in this diagram:
c00000fd
  • 20,994
  • 29
  • 177
  • 400
2
votes
1 answer

Can not Set URL or ID to SysLink in C++ Win32

Here is my code , but it does not compile and gives out two errors : error C2440: '=' : cannot convert from 'WCHAR' to 'WCHAR [2084]' IntelliSense: expression must be a modifiable lvalue I have Read link below but it did not help me…
BlueFlower
  • 83
  • 1
  • 7
2
votes
2 answers

creating rebar control and introduction a band with toolbar into the rebar

I use this code to create a rebar control, and introduction a band with toolbar into the rebar. But when window is shown up, I can not see the toolbar. and when I check the height of the rebar, in this line of code: int height =…
user1544067
  • 1,676
  • 2
  • 19
  • 30
1
vote
1 answer

Set button text color in Win32 API using custom drawing

I wanted to create some sort of a dark-mode button using Common Controls & Win32 API. I wanted to use custom drawing to set my button's background & text color. As for the background, it seems to work fine, but I can't figure out how to set the text…
aviad1
  • 354
  • 1
  • 10
1
vote
2 answers

How do I toggle word-wrap in a EditBox

How can I toggle word-wrap in a multiline EditBox? I can create it with or without but I don't know which message I should use to toggle the wrapping mode.
1
vote
1 answer

Custom trackbar ticks

I'm using the stock Trackbar control. I would like to custom draw the ticks. Here I made an experiment, just trying to draw in the right place: case WM_NOTIFY: { NMHDR* nMhdr = (NMHDR*) lParam; NMCUSTOMDRAW* nMcd = (NMCUSTOMDRAW*) lParam; …
TheNextman
  • 12,428
  • 2
  • 36
  • 75
1
vote
3 answers

ActiveX component can’t create object : PCOMM.autECLConnList

I am trying to automate the sending keystrokes to a mainframe application which is being connected using PCOMM iSeries emulator. I am not sure on what I am doing wrong here, as the same code works on a different machine. Below are the…
Pulkit Shah
  • 81
  • 1
  • 10
1
vote
0 answers

ListView accessibility issue -- how to make Windows Narrator read the entire selected row, including subitems?

I'm trying to add accessibility support to the WC_LISTVIEW control in my Win32/MFC application. I'm using Windows Narrator tool in Windows 10 to test the results. And by default it only reads the main item name of a selected row. For instance, in…
c00000fd
  • 20,994
  • 29
  • 177
  • 400
1
vote
0 answers

WinAPI Toolbar Control: Increase Width of Drop Down Chevron

Ist is possible to extend the width of the dropdown button for a Toolbarctrl button with BTNS_DROPDOWN style? Reason: for this particular button, there is a default action (basically "use the same device as before") executed immediately, which is…
peterchen
  • 40,917
  • 20
  • 104
  • 186
1
vote
0 answers

64-bit version of CTL3D32.DLL?

I've been tasked with producing a 64-bit version of an old-style Win32 Windows application, written in C/C++ and packaged as a DLL. The 64-bit app now runs but the controls in the dialog boxes don't look the same on Win64 as Win32. The reason is…
UweBaemayr
  • 1,861
  • 1
  • 18
  • 21
1
vote
1 answer

Do I need to select HBRUSH when replacing background in the edit control?

My goal is to replace a background for the common-control's edit control. My current code does this: HBITMAP hBmp = ::LoadBitmap(hInstance, MAKEINTRESOURCE(BKGND_ID)); HBRUSH hBkgndBrush = ::CreatePatternBrush(hBmp); ::DeleteObject(hBmp); HBRUSH…
c00000fd
  • 20,994
  • 29
  • 177
  • 400
1
vote
0 answers

Enabling Visual Styles

I'm currently trying to work through the Windows GUI API and the more I see... let's come the the point: Basically i'm following this guide by msdn to enable the visual styles from Win7, but InitCommandcontrolsEx returns false: I'm doing the…
Matze
  • 533
  • 7
  • 16
1
vote
3 answers

Why am I getting black background when displaying a list-view icon?

I'm not sure why I'm getting this black outline when I add an icon to the CListCtrl (or list-view control)? I load it as such: //HICON hIcon; LoadIconWithScaleDown(theApp.m_hInstance, MAKEINTRESOURCE(Icon_ID), 15, 15, &hIcon); I then create my…
c00000fd
  • 20,994
  • 29
  • 177
  • 400
1
vote
0 answers

Windows Common Control Bug?

Recently I have faced with very strange behavior of the Windows "Button" control having BS_MULTILINE style, which looks like bug in Windows. To reproduce it, make the following: (1) Create new project with Visual Studio 2012 Project Wizard; choose…
Ilia
  • 425
  • 2
  • 10
1
vote
0 answers

Direct2D and Windows common controls

I'm still kind of new to Direct2D so this may be a stupid question. I want the UI of my application to support things like partial transparency and hardware acceleration. To do proper transparency I need to use the UpdateLayeredWindow API, which…
Jehjoa
  • 551
  • 8
  • 23