HeaderPane
Main
Hide
Share Link
Print

SFTBOX_DWORD_PTR Type Definition

Defines a type large enough to hold a DWORD or a pointer value.

typedef DWORD_PTR SFTBOX_DWORD_PTR;

Comments

SFTBOX_DWORD_PTR defines a type large enough to hold a DWORD or a pointer value. It is used for application-specific values, such as item data (SetItemData), cell data (SFTBOX_CELL) and the values passed to callback routines.

On 32-bit platforms, a DWORD and a pointer have the same size (4 bytes). On 64-bit platforms, a pointer is 8 bytes. A SFTBOX_DWORD_PTR value always has the size of a pointer on the platform the application is built for, so a pointer can safely be stored in a SFTBOX_DWORD_PTR value.

Examples

C View entire sample code

    SftBox_AddString(hwndBox, TEXT("Miami"));
    SftBox_AddString(hwndBox, TEXT("Tampa"));
}

/**********************************************************************/
/*                              Sorting                               */
/**********************************************************************/

int CALLBACK SortAscending(HWND hwnd, LPCTSTR lpszString1, LPCTSTR lpszString2, SFTBOX_DWORD_PTR itemData1, SFTBOX_DWORD_PTR itemData2)
{
    return lstrcmpi(lpszString1, lpszString2);
}

int CALLBACK SortDescending(HWND hwnd, LPCTSTR lpszString1, LPCTSTR lpszString2, SFTBOX_DWORD_PTR itemData1, SFTBOX_DWORD_PTR itemData2)
{
    return lstrcmpi(lpszString2, lpszString1);

C++ View entire sample code

    lpCol->colorBgEnd = lpCol->colorBgSelEnd = SFTBOX_NOCOLOR;
    lpCol->colorProgress = lpCol->colorProgressEnd = SFTBOX_NOCOLOR;
    lpCol->realPos = lpCol->dispPos = position;
}

/////////////////////////////////////////////////////////////////////////////
// Sorting

static int CALLBACK SortAscending(HWND hwnd, LPCTSTR lpszString1, LPCTSTR lpszString2, SFTBOX_DWORD_PTR itemData1, SFTBOX_DWORD_PTR itemData2)
{
    return lstrcmpi(lpszString1, lpszString2);
}

static int CALLBACK SortDescending(HWND hwnd, LPCTSTR lpszString1, LPCTSTR lpszString2, SFTBOX_DWORD_PTR itemData1, SFTBOX_DWORD_PTR itemData2)
{
    return lstrcmpi(lpszString2, lpszString1);

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


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