Spread 8.0 Documentation
Example
Support Options

Glossary Item Box

Example


The following example illustrates the method used for drawing an owner-drawn cell.

switch (Msg)
    {
    case SSM_DRAWITEM:
        {
        LPSS_DRAWITEMSTRUCT lpDrawItem;
        HBRUSH hBrush;
        lpDrawItem = (LPSS_DRAWITEMSTRUCT)lParam;
        hBrush = CreateSolidBrush(RGBCOLOR_RED);
        FillRect(lpDrawItem->hDC, &lpDrawItem->Rect, hBrush);
        DeleteObject(hBrush);
        SetBkMode(lpDrawItem->hDC, TRANSPARENT);
        DrawText(lpDrawItem->hDC, "Owner", -1, &lpDrawItem->Rect,DT_SINGLELINE|DT_LEFT);
    }

    case WM_COMMAND:
        .
        .
        .
}

Copyright © GrapeCity, inc. All rights reserved.