HeaderPane
Main
Hide
Share Link
Print

RealColumn

Returns the real column number given a display column number.

C

int WINAPI SftBox_GetRealColumn(HWND hwndCtl, int dispCol);

C++

int CSftBox::GetRealColumn(int dispCol) const;

Parameters

hwndCtl

The window handle of the combo box control.

dispCol

The zero-based display column number whose real column number is to be returned.

Returns

The return value is the real column number for a display column number, or -1 if dispCol is not a valid column number.

Comments

The GetRealColumn function returns the real column number given a display column number.

As a user reorders columns (see SetReorderColumns), this is completely transparent to the application. An application still references cells by the "real" column number, which is the original column number that the cell had before columns were reordered by the user. While columns appear in a new order after dragging a column to a new position, the application references columns and cells by their real column number which never changes.

If a user reorders columns using column drag & drop, the display column number, which is the column number as it appears to the user, may need to be translated into the real column number as used by an application.

GetDisplayColumn can be used to retrieve the display column number given a real column number.

See Also C/C++ API | Categories | Notifications


Last Updated 11/21/2026 - (email)
© 2026 Softel vdm, Inc.