Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- The Guide to Clip-4-Win version 3.0 - <b>setmenuitembitmaps()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
SetMenuItemBitmaps()
Set bitmaps for checked/unchecked menu items
------------------------------------------------------------------------------

Syntax
SetMenuItemBitmaps( <aMenu>, [ <cId> | <nId> ],
                    <hBmpUnchecked>, <hBmpChecked> )   -->  lSuccess

Arguments
<aMenu> is the existing menu, originally obtained from
CreateMenu() or CreatePopupMenu().

<cId> is an optional character string identifying the item
whose bitmaps are to be set.  Any string previously used with
the AppendMenu() function may be used, so long as it
identifies a pop-up menu item (i.e. not a top-level item).

<nId> is an optional number identifying the position of the
item whose bitmaps are to be set.  Specifying the position
this way is awkward, so is not recommended.

<hBmpUnchecked> and <hBmpChecked> are handles to bitmaps to be
used when the menu item is unchecked and checked
(respectively).  Use zero (0) if you don't want any bitmap
displayed for one of these.  (Using two zeroes makes Windows
display the default check mark.)

Returns
If successful, logical TRUE (.T.) is returned, otherwise FALSE
(.F.) is returned.

Description
The bitmaps are used with the indicated menu item, as
appropriate.

Example
aPopupMenu = CreatePopupMenu()
AppendMenu( aPopupMenu, "myitem", MF_ENABLED + MF_STRING,        ;
            "&MyItem", { | |  DoMyItem() } )
SetMenuItemBitmaps( aMenu, "myitem", hUnBmp, hChkBmp )


See Also: AppendMenu() CreatePopupMenu() GetMenuCheckMarkDimensions()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson