INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES

indexing

title: "Visual Eiffel Library.", "Win32 API: Menu Functions"
project: "Visual Eiffel Win32 Library"
revision: "$Revision: 1.1 $"
copyright: "Copyright (C) 1996-2005 Object Tools Group"
license: "http://visual-eiffel.com/license"
cluster: winlib
class WAPI_MENU_FUNCTIONS
inherit

WAPI_ERROR_SERVER
end
feature -- Access

AppendMenu (hmenu: INTEGER; uflags: BIT 32; uidnewitem: INTEGER; lpnewitem: STRING)
-- The `AppendMenu' function appends a new item to the end
-- of the specified menu. You can use this function to specify the content,
-- appearance, and behavior of the menu item.
require
correct_hmenu: hmenu /= null_ and then ismenu (hmenu) = true_
correct_lpnewitem: lpnewitem /= void

CheckMenuItem (hmenu, idcheckitem: INTEGER; fuflags: BIT 32): INTEGER
-- The 'CheckMenuItem' function sets the state of the specified
-- menu item's check mark attribute to either checked or unchecked.
require
correct_hmenu: hmenu /= null_ and then ismenu (hmenu) = true_

CreateMenu: INTEGER
-- The `CreateMenu' function creates a menu.
-- The menu is initially empty, but it can be filled with menu items
-- by using the `AppendMenu' and `InsertMenu' functions.
ensure
correct_result: Result /= null_ and then ismenu (Result) = true_

CreatePopupMenu: INTEGER
-- The `CreatePopupMenu' function creates a pop-up menu.
-- The menu is initially empty. You can fill it with menu items by using
-- the `InsertMenu' and `AppendMenu' functions.
ensure
correct_result: Result /= null_ and then ismenu (Result) = true_

DestroyMenu (hmenu: INTEGER)
-- The `DestroyMenu' function destroys the specified menu and frees
-- any memory that the menu occupies.
require
correct_hmenu: hmenu /= null_ and then ismenu (hmenu) = true_

DrawMenuBar (hwnd: INTEGER)
-- The 'DrawMenuBar' procedure redraws the menu bar of the specified
-- window. If the menu bar changes after Windows has created the window,
-- this procedure must be called to draw the changed menu bar.
require
correct_hwnd: hwnd /= null_

EnableMenuItem (hmenu, uitem: INTEGER; fuflags: BIT 32): INTEGER
-- The 'EnableMenuItem' function enables, disables, or grays the given
-- menu item.
require
correct_hmenu: hmenu /= null_ and then ismenu (hmenu) = true_

GetMenu (hwnd: INTEGER): INTEGER
-- The 'GetMenu' function retrieves the handle of the menu assigned
-- to the given window.
require
correct_hwnd: hwnd /= null_

GetMenuState (hmenu, uid, uflags: INTEGER): BIT 32
-- The `GetMenuState' function retrieves the menu flags associated
-- with the specified menu item. If the menu item activates a pop-up menu,
-- this function also returns the number of items in the pop-up menu.
require
correct_hmenu: hmenu /= null_ and then ismenu (hmenu) = true_

GetSubMenu (hmenu, npos: INTEGER): INTEGER
-- The 'GetSubMenu' function retrieves the handle of the pop-up menu
-- activated by the specified menu item.
require
correct_hmenu: hmenu /= null_ and then ismenu (hmenu) = true_

GetSystemMenu (hwnd: INTEGER; frevert: BOOLEAN): INTEGER
-- The `GetSystemMenu' function allows the application to access
-- the System menu (also known as the Control menu)
-- for copying and modifying.
require
correct_hwnd: hwnd /= null_

InsertMenu (hmenu: INTEGER; uposition: INTEGER; uflags: BIT 32; uidnewitem: INTEGER; lpnewitem: STRING)
-- The `InsertMenu' function inserts a new menu item into a menu,
-- moving other items down the menu.
require
correct_hmenu: hmenu /= null_ and then ismenu (hmenu) = true_
correct_lpnewitem: lpnewitem /= void

IsMenu (hmenu: INTEGER): INTEGER
-- The 'IsMenu' function determines whether a handle is a menu handle.
require
correct_hmenu: hmenu /= null_

LoadMenu (hinst: INTEGER; lpmenuname: POINTER): INTEGER
-- The 'LoadMenu' function loads the specified menu resource from
-- the executable (.EXE) file associated with an application instance.
require
correct_hinst: hinst /= null_
correct_lpmenuname: lpmenuname /= default_pointer

ModifyMenu (hmenu: INTEGER; uitem: INTEGER; fuflags: BIT 32; idnewitem: INTEGER; lpsznewitem: POINTER)
-- The 'ModifyMenu' procedure changes an existing menu item.
-- This procedure is used to specify the content, appearance,
-- and behavior of the menu item.
require
correct_hmenu: hmenu /= null_ and then ismenu (hmenu) = true_
correct_lpsznewitem: lpsznewitem /= default_pointer
feature -- Implementation

wAppendMenu (hmenu: INTEGER; uflags: BIT 32; uidnewitem: INTEGER; lpnewitem: POINTER): INTEGER

wCreateMenu: INTEGER

wCreatePopupMenu: INTEGER

wDestroyMenu (hmenu: INTEGER): INTEGER

wDrawMenuBar (hwnd: INTEGER): INTEGER

wGetSystemMenu (hwnd: INTEGER; frevert: INTEGER): INTEGER

wInsertMenu (hmenu: INTEGER; uposition: INTEGER; uflags: BIT 32; uidnewitem: INTEGER; lpnewitem: POINTER): INTEGER

wModifyMenu (hmenu: INTEGER; uitem: INTEGER; fuflags: BIT 32; idnewitem: INTEGER; lpsznewitem: POINTER): INTEGER
end -- class WAPI_MENU_FUNCTIONS

INDEX CLUSTER FEATURES SHORT FRAMES NO FRAMES