Returns the display column number given a real column number.
C
int WINAPI SftBox_GetDisplayColumn(HWND hwndCtl, int realCol);
C++
int CSftBox::GetDisplayColumn(int realCol) const;
hwndCtl
The window handle of the combo box control.
realCol
The real column number whose display column number is to be returned.
The return value is the display column number for a real column number, or -1 if realCol is not a valid column number.
The GetDisplayColumn function returns the display column number given a real 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 (real) column number, which is the column number as it appears to the application, may need to be translated into the display column number as seen by the user. GetRealColumn translates a display column number into a real column number.
See Also C/C++ API | Categories | Notifications