Win32-GUI

 view release on metacpan or  search on metacpan

Combobox.xs  view on Meta::CPAN

    # (@)METHOD:GetEditControl()
    # Retrieves the handle to the edit control portion of a ComboBoxEx control.
HWND
GetEditControl(handle)
    HWND handle
CODE:
    RETVAL = (HWND) SendMessage(handle, CBEM_GETEDITCONTROL, 0, 0);
OUTPUT:
    RETVAL

    ###########################################################################
    # (@)METHOD:GetImageList()
    # Retrieves the handle to an image list assigned to a ComboBoxEx.
HIMAGELIST
GetImageList(handle)
    HWND handle
CODE:
    RETVAL = (HIMAGELIST) SendMessage(handle, CBEM_GETIMAGELIST, 0, 0);
OUTPUT:
    RETVAL

    ###########################################################################
    # (@)METHOD:GetExtendedStyle()
    # Retrieves the extended styles that are in use for a ComboBoxEx control. 
HWND
GetExtendedStyle(handle)
    HWND handle
CODE:
    RETVAL = (HWND) SendMessage(handle, CBEM_GETEXTENDEDSTYLE, 0, 0);
OUTPUT:
    RETVAL

    ###########################################################################
    # (@)METHOD:GetItem(NODE)
    # Retrieves item information for a given ComboBoxEx item.
void
GetItem(handle,item)
    HWND handle
    int item
PREINIT:
    COMBOBOXEXITEM cb_item;
    char pszText[1024];
PPCODE:
    ZeroMemory(&cb_item, sizeof(COMBOBOXEXITEM));
    cb_item.iItem = item;
    cb_item.mask = CBEIF_DI_SETITEM | CBEIF_IMAGE | CBEIF_INDENT
                 | CBEIF_LPARAM | CBEIF_OVERLAY 
                 | CBEIF_SELECTEDIMAGE | CBEIF_TEXT;
    cb_item.pszText = pszText;
    cb_item.cchTextMax = 1024;
    if(SendMessage(handle, CBEM_GETITEM, 0, (LPARAM) &item) != 0) {
        EXTEND(SP, 14);
        XST_mPV(0, "-text");
        XST_mPV(1, cb_item.pszText);
        XST_mPV(2, "-image");
        XST_mIV(3, cb_item.iImage);
        XST_mPV(4, "-selectedimage");
        XST_mIV(5, cb_item.iSelectedImage);
        XST_mPV(6, "-item");
        XST_mIV(7, cb_item.iItem);
        XST_mPV(8, "-overlay");
        XST_mIV(9, cb_item.iOverlay);
        XST_mPV(10, "-indent");
        XST_mIV(11, cb_item.iIndent);
        XST_mPV(12, "-lparam");
        XST_mIV(13, cb_item.lParam);
        XSRETURN(14);
    } else {
        XSRETURN_UNDEF;
    }

    ###########################################################################
    # (@)METHOD:GetUnicodeFormat()
    # Retrieves the UNICODE character format flag for the control. 
LRESULT
GetUnicodeFormat(handle)
    HWND handle
CODE:
    RETVAL = SendMessage(handle, CBEM_GETUNICODEFORMAT, 0, 0);
OUTPUT:
    RETVAL

    ###########################################################################
    # (@)METHOD:HasEditChanged()
    # Determines if the user has changed the contents of the ComboBoxEx edit control by typing.
LRESULT
HasEditChanged(handle)
    HWND handle
CODE:
    RETVAL = SendMessage(handle, CBEM_HASEDITCHANGED, 0, 0);
OUTPUT:
    RETVAL

    ###########################################################################
    # (@)METHOD:InsertItem(%OPTIONS)
    # Inserts a new item in the ComboboxEx control. Returns the newly created
    # item zero-based index or -1 on errors.
    #
    # B<%OPTIONS> can be:
    #   -index => position (-1 for the end of the list)
    #   -image => index of an image from the associated ImageList
    #   -selectedimage => index of an image from the associated ImageList
    #   -text => string
    #   -indent => indentation spaces (1 space == 10 pixels)
LRESULT
InsertItem(handle,...)
    HWND handle
PREINIT:
    COMBOBOXEXITEM Item;
CODE:
    ZeroMemory(&Item, sizeof(COMBOBOXEXITEM));
    Item.iItem = -1;
    ParseComboboxExItemOptions(NOTXSCALL sp, mark, ax, items, 1, &Item);
    RETVAL = SendMessage(handle, CBEM_INSERTITEM, 0, (LPARAM) &Item);
OUTPUT:
    RETVAL

    ###########################################################################
    # (@)METHOD:SetExtendedStyle(mask, exstyle)
    # Sets extended styles within a ComboBoxEx control.
LRESULT



( run in 1.212 second using v1.01-cache-2.11-cpan-39bf76dae61 )