| 发表于:2007-07-23 14:47:403楼 得分:10 |
getsystemmenu this function is implemented as a macro to maintain compatibility with existing code. use the menu handle returned by this macro to disable the close button. there is no other use for the return value. hmenu getsystemmenu( hwnd hwnd, bool brevert ); parameters hwnd [in] handle to the window that will own a copy of the window menu. brevert [in] boolean that specifies the action to be taken. if this parameter is false, getsystemmenu returns the handle to the copy of the window menu currently in use. the copy is initially identical to the window menu, but it can be modified. if this parameter is true, getsystemmenu resets the window menu back to the default state. the previous window menu, if any, is destroyed. return values if the brevert parameter is false, the return value is the handle to a copy of the window menu. if the brevert parameter is true, the return value is null. remarks use the following code to disable the close button: enablemenuitem (getsystemmenu(hwnd, false), sc_close,mf_bycommand ¦ mf_grayed); requirements runs on versions defined in include link to windows ce os 1.0 and later winuser.h menu.lib note this api is part of the complete windows ce os package as provided by microsoft. the functionality of a particular platform is determined by the original equipment manufacturer (oem) and some devices may not support this api. | | |
|