您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ DeleteMenu函数代码示例

51自学网 2021-06-01 20:26:44
  C++
这篇教程C++ DeleteMenu函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中DeleteMenu函数的典型用法代码示例。如果您正苦于以下问题:C++ DeleteMenu函数的具体用法?C++ DeleteMenu怎么用?C++ DeleteMenu使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了DeleteMenu函数的27个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: UpdMenu

BOOL CALLBACKUpdMenu(HWND  hwnd,LPARAM lParam){    int i;    BOOL flag=lParam;    //    int Checked;    HMENU hSysMenu=GetSystemMenu(hwnd, FALSE);    for(i=0;i<GetMenuItemCount(hSysMenu) && hSysMenu;i++)        if(GetMenuItemID(hSysMenu,i)==IDM_TRAY) hSysMenu = 0;    if (hSysMenu && lParam)    {        InsertMenu (hSysMenu, GetMenuItemID(hSysMenu,0),MF_SEPARATOR,IDM_SEPARATOR, NULL) ;        if(GetWindowLong(hwnd,GWL_EXSTYLE)&WS_EX_TOPMOST)            InsertMenu (hSysMenu, GetMenuItemID(hSysMenu,0),MF_STRING|MF_CHECKED,IDM_ONTOP,"Always on top");        else            InsertMenu (hSysMenu, GetMenuItemID(hSysMenu,0),MF_STRING,IDM_ONTOP,"Always on top");        InsertMenu (hSysMenu, GetMenuItemID(hSysMenu,0),MF_STRING,IDM_TRAY,"Minimize in tray");        InsertMenu (hSysMenu, GetMenuItemID(hSysMenu,0),MF_STRING,IDM_SIZE,"My size");    }    if (hSysMenu && lParam==FALSE)    {        DeleteMenu (hSysMenu,IDM_TRAY,MF_BYCOMMAND);        DeleteMenu (hSysMenu,IDM_ONTOP,MF_BYCOMMAND);        DeleteMenu (hSysMenu,IDM_SEPARATOR,MF_BYCOMMAND);        DeleteMenu (hSysMenu,IDM_SIZE,MF_BYCOMMAND);    }    return TRUE;}
开发者ID:shelt,项目名称:RBXTray,代码行数:29,


示例2: Create

			//////////////////////////////////////			// Create the window			//////////////////////////////////////HWND Create(HINSTANCE hInst, int nCmdShow){ 	RECT Rect;	GetWindowRect(GetDesktopWindow(), &Rect);	long ScreenW = Rect.right, ScreenH = Rect.bottom;	global = (LPGLOBAL)malloc(sizeof(GLOBAL));  global->MainVar.MainhInst = hInst;    global->MainVar.MainHwnd = CreateWindow(MAINWINDOW, MAINWINDOW,                           WS_BORDER |                            WS_SYSMENU |                            WS_CAPTION |                           WS_MINIMIZEBOX |                            WS_MAXIMIZEBOX ,                           0, 0,                            ScreenW, ScreenH,                           NULL, NULL, hInst, NULL);	DeleteMenu(GetSystemMenu(global->MainVar.MainHwnd, FALSE),  SC_MOVE, MF_BYCOMMAND);	DeleteMenu(GetSystemMenu(global->MainVar.MainHwnd, FALSE),  SC_SIZE, MF_BYCOMMAND);  if (global->MainVar.MainHwnd == NULL)     return global->MainVar.MainHwnd;    ShowWindow(global->MainVar.MainHwnd, nCmdShow);  UpdateWindow(global->MainVar.MainHwnd);  return global->MainVar.MainHwnd;}
开发者ID:jstty,项目名称:OlderProjects,代码行数:33,


示例3: mh_deleteitem

static int mh_deleteitem (lua_State* l) {menu* m = lua_touserdata(l,1);if (lua_isnoneornil(l,2)) {const char* menuName = GetMenuName(m->parent, m->position);if (menuName) free(menuName);DeleteMenu(m->parent, m->command, MF_BYCOMMAND);if (!m->sub) {removeCustomCommand(m->command);removeAccelerator(m->command);} DrawMenuBar(win);return 0;}else {if (!m->sub) return 0;menu* x = lua_touserdata(l,2);const char* menuName = GetMenuName(m->menu, x->position);if (menuName) free(menuName);DeleteMenu(m->menu, x->command, MF_BYCOMMAND);DrawMenuBar(win);if (!x->sub) {removeCustomCommand(x->command);removeAccelerator(x->command);}lua_settop(l,1);return 1;}}
开发者ID:qtnc,项目名称:6pad,代码行数:27,


示例4: update_item_menu

void update_item_menu(short mode)//mode 0 - display item menus 1 - lock menus{	short i,j;	HMENU menu[10],big_menu;	char item_name[256];	big_menu = GetMenu(mainPtr);	for (i = 0; i < 10; i++)		menu[i] = GetSubMenu(big_menu,3 + i);	for(j=0;j<10;j++){  //first let's clean the menu       DeleteMenu(menu[j],1000 + j,MF_BYCOMMAND); //If there is any dummy, flush it	   for (i=0;i<40;i++)       		DeleteMenu(menu[j],600+(40*j)+i,MF_BYCOMMAND);    }    switch(mode){    case 0:	for (j = 0; j < 10; j++) { //then populate it		for (i = 0; i < 40; i++) {				sprintf(item_name, "%s",scen_item_list.scen_items[i + j * 40].full_name);				if ((i % 20 == 0) && (i > 0))					AppendMenu(menu[j],MF_MENUBREAK | MF_BYCOMMAND | MF_ENABLED | MF_STRING, 600 + (40 * j) + i, item_name);					else AppendMenu(menu[j],MF_BYCOMMAND | MF_ENABLED | MF_STRING, 600 + (40 * j) + i, item_name);				}		}    break;    case 1:    for (j = 0; j < 10; j++) //then lock menus	       AppendMenu(menu[j],MF_MENUBREAK | MF_BYCOMMAND | MF_GRAYED | MF_STRING, 600 + (40 * j), "None");    break;    }}
开发者ID:Ircher,项目名称:CBoE,代码行数:35,


示例5: FreeLogList

VOIDFreeLogList(void){    DWORD dwIndex;    if (!LogNames)    {        return;    }    for (dwIndex = 0; dwIndex < dwNumLogs; dwIndex++)    {        if (LogNames[dwIndex])        {            HeapFree(GetProcessHeap(), 0, LogNames[dwIndex]);        }        DeleteMenu(hMainMenu, ID_FIRST_LOG + dwIndex, MF_BYCOMMAND);    }    DeleteMenu(hMainMenu, ID_FIRST_LOG + dwIndex + 1, MF_BYCOMMAND);    HeapFree(GetProcessHeap(), 0, LogNames);    dwNumLogs = 0;    return;}
开发者ID:Strongc,项目名称:reactos,代码行数:28,


示例6: GetRecentFiles

/*****************************Private*Routine******************************/* GetRecentFiles** Reads at most MAX_RECENT_FILES from the app's registry entry. * Returns the number of files actually read.  * Updates the File menu to show the "recent" files.*/**************************************************************************/intGetRecentFiles(    int iLastCount,    int iMenuPosition   // Menu position of start of MRU list    ){    int     i;    TCHAR   FileName[MAX_PATH];    TCHAR   szKey[32];    HMENU   hSubMenu;    //    // Delete the files from the menu    //    hSubMenu = GetSubMenu(GetMenu(hwndApp), 0);    // Delete the separator at the requested position and all the other     // recent file entries    if(iLastCount != 0)    {        DeleteMenu(hSubMenu, iMenuPosition, MF_BYPOSITION);        for(i = 1; i <= iLastCount; i++)        {            DeleteMenu(hSubMenu, ID_RECENT_FILE_BASE + i, MF_BYCOMMAND);        }    }    for(i = 1; i <= MAX_RECENT_FILES; i++)    {        DWORD   len;        TCHAR   szMenuName[MAX_PATH + 3];        (void)StringCchPrintf(szKey, NUMELMS(szKey), TEXT("File %d/0"), i);        len = ProfileStringIn(szKey, TEXT(""), FileName, MAX_PATH * sizeof(TCHAR));        if(len == 0)        {            i = i - 1;            break;        }        StringCchCopy(aRecentFiles[i - 1], NUMELMS(aRecentFiles[i-1]), FileName);        (void)StringCchPrintf(szMenuName, NUMELMS(szMenuName), TEXT("&%d %s/0"), i, FileName);        if(i == 1)        {            InsertMenu(hSubMenu, iMenuPosition, MF_SEPARATOR | MF_BYPOSITION, (UINT)-1, NULL);        }        InsertMenu(hSubMenu, iMenuPosition + i, MF_STRING | MF_BYPOSITION,            ID_RECENT_FILE_BASE + i, szMenuName);    }    //    // i is the number of recent files in the array.    //    return i;}
开发者ID:Essjay1,项目名称:Windows-classic-samples,代码行数:67,


示例7: DestroyMenu

void CAppWindow::ShowContextMenu(){	if (!AllowContextMenu())	{		return;	}	if (CPopupWindow::Instance() != NULL)	{		CPopupWindow::Instance()->CancelAll();	}	if (m_hPopupMenus != NULL)	{		DestroyMenu(m_hPopupMenus);	}	m_hPopupMenus = LoadMenu(CApp::Instance()->GetInstance(), MAKEINTRESOURCE(IDR_POPUP_MENUS));	HMENU hSubMenu = GetSubMenu(m_hPopupMenus, 0);	if (m_lpSession->GetState() == WSS_ONLINE || m_lpSession->GetState() == WSS_RECONNECTING)	{		DeleteMenu(hSubMenu, ID_TRAYICON_LOGIN, MF_BYCOMMAND);	}	else	{		DeleteMenu(hSubMenu, ID_TRAYICON_SIGNOUT, MF_BYCOMMAND);		EnableMenuItem(hSubMenu, ID_TRAYICON_INBOX, MF_GRAYED | MF_BYCOMMAND);		EnableMenuItem(hSubMenu, ID_TRAYICON_CHECKWAVESNOW, MF_GRAYED | MF_BYCOMMAND);	}	if (CVersion::Instance()->GetState() != VS_NONE)	{		EnableMenuItem(hSubMenu, ID_TRAYICON_CHECKFORUPDATESNOW, MF_GRAYED | MF_BYCOMMAND);	}	POINT p;	GetCursorPos(&p);	SetForegroundWindow(GetHandle());	TrackPopupMenuEx(		hSubMenu,		TPM_VERTICAL | TPM_RIGHTALIGN,		p.x,		p.y,		GetHandle(),		NULL);	PostMessage(WM_NULL);}
开发者ID:pvginkel,项目名称:wave-notify,代码行数:55,


示例8: DeleteMenu

//---------------------------------------------------------------------// InitializePopup()://---------------------------------------------------------------------void WPDIRECTORY::InitializePopup(HMENU hmenuPopup){   // Call base class function.   WPFOLDER::InitializePopup(hmenuPopup);   // Delete menu item "Create another..." in folder popup menu.   DeleteMenu(hmenuPopup,IDM_CREATEANOTHER,MF_BYCOMMAND);   // Delete menu item "Create shadow..." in folder popup menu.   DeleteMenu(hmenuPopup,IDM_CREATESHADOW,MF_BYCOMMAND);   // Delete menu item "Delete..." in folder popup menu.   DeleteMenu(hmenuPopup,IDM_FIND,MF_BYCOMMAND);}
开发者ID:OS2World,项目名称:WIN16-Worplace-Shell-for-Windows,代码行数:15,


示例9: WMDeleteMenu

voidWMDeleteMenu(short menuID){	if (!CheckRunningInMainThread("WMDeleteMenu"))		return;	DeleteMenu(menuID);}
开发者ID:prheenan,项目名称:IgorUtil,代码行数:7,


示例10: BiasMenu

VOID NEAR PASCAL BiasMenu(HMENU hMenu, INT Bias){        INT pos, id, count;        HMENU hSubMenu;        CHAR szMenuString[80];        ENTER("BiasMenu");        count = GetMenuItemCount(hMenu);        if (count < 0)                return;        for (pos = 0; pos < count; pos++) {                id = GetMenuItemID(hMenu, pos);                if (id < 0) {                        // must be a popup, recurse and update all ID's here                        if (hSubMenu = GetSubMenu(hMenu, pos))                                BiasMenu(hSubMenu, Bias);                } else if (id) {                        // replace the item that was there with a new                        // one with the id adjusted                        GetMenuString(hMenu, (WORD)pos, szMenuString, sizeof(szMenuString), MF_BYPOSITION);                        DeleteMenu(hMenu, pos, MF_BYPOSITION);                        InsertMenu(hMenu, (WORD)pos, MF_BYPOSITION | MF_STRING, id + Bias, szMenuString);                }        }        LEAVE("BiasMenu");}
开发者ID:mingpen,项目名称:OpenNT,代码行数:32,


示例11: DeleteBlinkManagerEntry

/* Delete the specified blink manager entry. */void FASTCALL DeleteBlinkManagerEntry( LPBLINKENTRY lpbe ){   /* First unlink this entry from    * the list.    */   if( lpbe->lpbePrev )      lpbe->lpbePrev->lpbeNext = lpbe->lpbeNext;   else      lpbeFirst = lpbe->lpbeNext;   if( lpbe->lpbeNext )      lpbe->lpbeNext->lpbePrev = lpbe->lpbePrev;   /* Delete the associated command from the    * command table. This will also remove any    * toolbar button.    */   CTree_DeleteCommand( lpbe->iCommandID );   /* Delete from the Blink menu.    */   DeleteMenu( hBlinkMenu, lpbe->iCommandID, MF_BYCOMMAND );   /* Delete from the registry.    */   Amuser_WritePPString( szBlinkman, lpbe->szName, NULL );   /* Free the allocated memory.    */   FreeMemory( &lpbe );}
开发者ID:cixonline,项目名称:ameol,代码行数:32,


示例12: LuaGuiDeleteMenu

	static bool LuaGuiDeleteMenu(void *hMenu, uint32_t position, uint32_t flag)	{		return !! DeleteMenu(			reinterpret_cast<HMENU>(hMenu),			position,			flag);	}
开发者ID:myeang1,项目名称:YDWE,代码行数:7,


示例13: DeleteMenu

///// Merges the functional groups of another menu descriptor into this menu/// descriptor.////// Popups are DeepCopied and are then owned by this menu/// Group counts are merged too.//boolTMenuDescr::Merge(const TMenuDescr& srcMenuDescr){  int thisOffset = 0;  int srcOffset = 0;  for (int i = 0; i < NumGroups; i++) {    if (srcMenuDescr.GroupCount[i] != 0) {      // Delete same menu group in the dest. menudescr.      for (int j = GroupCount[i] - 1; j >= 0; j--) {        DeleteMenu(thisOffset+j, MF_BYPOSITION);      }      GroupCount[i] = 0;      if (srcMenuDescr.GroupCount[i] > 0) {        DeepCopy(*this, thisOffset, srcMenuDescr, srcOffset, srcMenuDescr.GroupCount[i]);        srcOffset += srcMenuDescr.GroupCount[i];        GroupCount[i] += srcMenuDescr.GroupCount[i];      }    }    if (GroupCount[i] > 0)      thisOffset += GroupCount[i];  }  return true;}
开发者ID:AlleyCat1976,项目名称:Meridian59_103,代码行数:33,


示例14: DeleteSubMenus

static void DeleteSubMenus(SubSysMenuHandle subSysMenus)	// Remove any sub-menus that we added to the menu bar.	// Basically this just walks subSysMenus (backwards, which	// isn't strictly necessary, but reassures me that the menu	// bar is somewhat consistent at each step), deleting each	// menu from the menu bar and reseting its parent to reference	// menu ID 0.{	ItemCount entryCount;	ItemCount entryIndex;	SubSysMenuEntry thisEntry;		// Have to handle both NULL and non-NULL case.	// This expression always evaluates to true,	// but it captures the semantics of what this	// routine must do.		assert(subSysMenus != NULL || subSysMenus == NULL);		entryCount = CountSubSysMenus(subSysMenus);	for (entryIndex = 0; entryIndex < entryCount; entryIndex++) {		thisEntry = (*subSysMenus)[entryCount - entryIndex - 1];		DeleteMenu( (**(thisEntry.childMenu)).menuID );		SetItemMark( thisEntry.parentMenu, thisEntry.itemInParent, 0);		// Recalculate the parent menu size, for consistency with		// the similar code in InsertSystemSubMenu.				CalcMenuSize(thisEntry.parentMenu);	}}
开发者ID:fruitsamples,项目名称:MoreIsBetter,代码行数:31,


示例15: GetSystemMenu

LRESULT CDuilib3dFrame::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled){	LONG styleValue = ::GetWindowLong(*this, GWL_STYLE);	styleValue &= ~WS_CAPTION;	styleValue &= ~WS_THICKFRAME;	::SetWindowLong(*this, GWL_STYLE, styleValue | WS_CLIPSIBLINGS | WS_CLIPCHILDREN);	HMENU hMenu = GetSystemMenu(m_hWnd,FALSE);	if (hMenu != NULL)	{		DeleteMenu(hMenu,SC_MAXIMIZE,MF_BYCOMMAND);	}	//根据skin.xml创建程序界面	m_PaintManager.Init(m_hWnd);	CDialogBuilder builder;	CDialogBuilderCallbackEx cb;	CControlUI* pRoot = builder.Create(_T("skin.xml"), (UINT)0,  &cb, &m_PaintManager);	ASSERT(pRoot && "Failed to parse XML");	m_PaintManager.AttachDialog(pRoot);	m_PaintManager.AddNotifier(this);	HICON hIcon = LoadIcon((HINSTANCE)GetWindowLong(m_hWnd,GWL_HINSTANCE),MAKEINTRESOURCE(IDI_ICON));	m_tray.Create(m_hWnd,WM_USER+1021,_T("360安全卫士"),hIcon,NULL);	return 0;}
开发者ID:likebeta,项目名称:code-snippets,代码行数:29,


示例16: StMObDeleteItem

/* to reflect the shift in position */void StMObDeleteItem(LVAL menu, LVAL item){  HMENU addr;  int n, i, j, id, flags;  LVAL items;  char *s;  if (StMObAllocated(menu)) {    addr = get_menu_address(menu);    id = get_menu_id(menu);    i = get_item_position(menu, item);    for (j = 0, items = slot_value(menu, s_items);	 j < i && consp(items);	 j++, items = cdr(items));    n = GetMenuItemCount((HMENU) addr);    for (; i < n; n--) DeleteMenu((HMENU) addr, i, MF_BYPOSITION);    if (consp(items)) items = cdr(items);    for (; consp(items); items = cdr(items), i++) {      item = car(items);      s = get_item_string(item);      if (s[0] == '-') AppendMenu((HMENU) addr, MF_SEPARATOR, 0, NULL);      else {	flags = MF_STRING;	if (slot_value(item, s_mark) != NIL) flags |= MF_CHECKED;	if (slot_value(item, s_enabled) == NIL) flags |= MF_GRAYED;	AppendMenu((HMENU) addr, flags, MAKEITEMINDEX(id, i), s);      }    }  }}
开发者ID:jhbadger,项目名称:xlispstat,代码行数:31,


示例17: DllMain

BOOL APIENTRY DllMain( HANDLE hModule,                        DWORD  ul_reason_for_call,                        LPVOID lpReserved					 ){    g_hModule = (HMODULE)hModule;    if (ul_reason_for_call == DLL_PROCESS_ATTACH)    {        ProcessAttach();        AddMenu();        ::MessageBox(NULL, "我来了", NULL, MB_OK);    }    else if (ul_reason_for_call == DLL_PROCESS_DETACH)    {        ProcessDetach();        assert(g_hMenu != NULL);        BOOL bRet = DeleteMenu(g_hMenu, g_nMenus - 1, MF_BYPOSITION);        if (!bRet)        {            MessageBox(NULL, "DeleteMenu Failed!!", NULL, MB_OK);        }        ::MessageBox(NULL, "我走了", NULL, MB_OK);    }    return TRUE;}
开发者ID:xuwenbo,项目名称:KR_Ph2,代码行数:31,


示例18: Handle

      /// <summary>Creates the console</summary>      ConsoleWnd::ConsoleWnd() : Handle(nullptr)      {         // Create console         if (AllocConsole())         {            // Get handle            SetConsoleTitle(L"Debug Console");            Handle = GetStdHandle(STD_OUTPUT_HANDLE);            // Increase buffer size            COORD buf { 200, 6*1000 };            SetConsoleScreenBufferSize(Handle, buf);            // Increate window size            //SMALL_RECT wnd { 0, 0, buf.X-2, buf.Y-2};            //SetConsoleWindowInfo(GetStdHandle(STD_OUTPUT_HANDLE), TRUE, &wnd);            // Disable close button            DeleteMenu(GetSystemMenu(GetConsoleWindow(), 0), SC_CLOSE, MF_BYCOMMAND);            // Maximize            ShowWindow(GetConsoleWindow(), SW_MAXIMIZE);#ifdef OFFICIAL_RELEASE            // Initially hide            Visible = false;#endif         }      }
开发者ID:CyberSys,项目名称:X-Studio-2,代码行数:30,


示例19: RemoveMenu

VOID RemoveMenu(HWND hwnd, HMENU menu){	if (bAddedMenu == false)		return;	HMENU systemMenu;	if ((systemMenu = GetSystemMenu(hwnd, FALSE)) == NULL)	{		return;	}	if (menu != INVALID_HANDLE_VALUE && menu != systemMenu)	{		return;	}	bAddedMenu = false;	MENUITEMINFO MoveToItem = { 0 };	MoveToItem.cbSize = sizeof(MoveToItem);	MoveToItem.fMask = MIIM_SUBMENU | MIIM_STATE | MIIM_ID | MIIM_STRING;	if (GetMenuItemInfo(systemMenu, MOVETOMENU_ID, MF_BYCOMMAND, &MoveToItem) == NULL)	{		return;	}	Log("Remove MoveToMenu");	DestroyMenu(MoveToItem.hSubMenu);	DeleteMenu(systemMenu, MoveToItem.wID, MF_BYCOMMAND);	}
开发者ID:Eun,项目名称:MoveToDesktop,代码行数:28,


示例20: LoadString

void Explorerplusplus::OnApplicationToolbarRClick(){	MENUITEMINFO mii;	TCHAR szTemp[64];	LoadString(m_hLanguageModule,IDS_APPLICATIONBUTTON_NEW,		szTemp,SIZEOF_ARRAY(szTemp));	mii.cbSize		= sizeof(mii);	mii.fMask		= MIIM_ID|MIIM_STRING;	mii.dwTypeData	= szTemp;	mii.wID			= IDM_APP_NEW;	/* Add the item to the menu. */	InsertMenuItem(m_hToolbarRightClickMenu,7,TRUE,&mii);	/* Set it to be owner drawn. */	SetMenuItemOwnerDrawn(m_hToolbarRightClickMenu,7);	OnMainToolbarRClick();	mii.cbSize	= sizeof(mii);	mii.fMask	= MIIM_DATA;	GetMenuItemInfo(m_hToolbarRightClickMenu,7,TRUE,&mii);	/* Free the owner drawn data. */	free((void *)mii.dwItemData);	/* Now, remove the item from the menu. */	DeleteMenu(m_hToolbarRightClickMenu,7,MF_BYPOSITION);}
开发者ID:3scp8,项目名称:explorerplusplus,代码行数:31,


示例21: FillBSPMenu

void FillBSPMenu( void ){	HMENU   hmenu;	epair_s*    ep;	int     i;	static int count;		hmenu = GetSubMenu( GetMenu( g_qeglobals.d_hwndMain ), MENU_BSP );		for ( i = 0 ; i < count ; i++ )		DeleteMenu( hmenu, CMD_BSPCOMMAND + i, MF_BYCOMMAND );	count = 0;		i = 0;	for ( ep = g_qeglobals.d_project_entity->epairs ; ep ; ep = ep->next )	{		if ( ep->key[0] == 'b' && ep->key[1] == 's' && ep->key[2] == 'p' )		{			bsp_commands[i] = ep->key;			AppendMenu( hmenu, MF_ENABLED | MF_STRING,						CMD_BSPCOMMAND + i, ( LPCTSTR )ep->key );			i++;		}	}	count = i;}
开发者ID:OnlyTheGhosts,项目名称:OWEngine,代码行数:26,


示例22: createWindowsConsole

void createWindowsConsole() {    if(consoleWindow !=0) return;    //create a console on Windows so users can see messages    //find an available name for our window    int console_suffix = 0;    char consoleTitle[512];    sprintf(consoleTitle, "%s", "Gource Console");    while(FindWindow(0, consoleTitle)) {        sprintf(consoleTitle, "Gource Console %d", ++console_suffix);    }    AllocConsole();    SetConsoleTitle(consoleTitle);    //redirect streams to console    freopen("conin$", "r", stdin);    freopen("conout$","w", stdout);    freopen("conout$","w", stderr);    consoleWindow = 0;    //wait for our console window    while(consoleWindow==0) {        consoleWindow = FindWindow(0, consoleTitle);        SDL_Delay(100);    }    //disable the close button so the user cant crash gource    HMENU hm = GetSystemMenu(consoleWindow, false);    DeleteMenu(hm, SC_CLOSE, MF_BYCOMMAND);}
开发者ID:shahn,项目名称:Gource,代码行数:34,


示例23: clickcolorpopup

boolean clickcolorpopup (Point pt, RGBColor *rgb) {		long result;	short lo, hi;		if (!flpopupinit)		flpopupinit = initcolorpopup ();		setcursortype (cursorisarrow);		CalcMenuSize (colormenu);		InsertMenu (colormenu, hierMenu);	LocalToGlobal (&pt);		result = PopUpMenuSelect (colormenu, pt.v, pt.h, -1);	DeleteMenu ((**colormenu).menuID);		lo = LoWord (result);		hi = HiWord (result);		if (hi > 0) { /*something was selected*/			*rgb = (*ctable) [lo - 1].rgb;				return (true);		}		return (false);	} /*clickcolorpopup*/
开发者ID:pombredanne,项目名称:Frontier,代码行数:33,


示例24: switch

void MenuWindow::MessageReceived(BMessage* message){	switch (message->what) {	case MSG_WIN_ADD_MENU:		AddMenu(message);		break;	case MSG_WIN_DELETE_MENU:		DeleteMenu(message);		break;	case MSG_TEST_ITEM:		TestMenu(message);		break;	case MSG_USER_ITEM:		UserMenu(message);		break;	case MSG_WIN_HIDE_USER_MENUS:		ToggleUserMenus(message);		break;	case MSG_WIN_LARGE_TEST_ICONS:		ToggleTestIcons(message);		break;	default:		BWindow::MessageReceived(message);		break;	}}
开发者ID:SummerSnail2014,项目名称:haiku,代码行数:26,


示例25: DeleteMenu

bool DeleteMenu(HMENU hMenu, int idx, int flag){  if (!hMenu) return false;  if (flag&MF_BYPOSITION)  {    if (hMenu->items.Get(idx))    {      hMenu->items.Delete(idx,true,HMENU__::freeMenuItem);      return true;    }    return false;  }  else  {    int x;    int cnt=0;    for (x=0;x<hMenu->items.GetSize(); x ++)    {      if (!hMenu->items.Get(x)->hSubMenu && hMenu->items.Get(x)->wID == idx)      {        hMenu->items.Delete(x--,true,HMENU__::freeMenuItem);        cnt++;      }    }    if (!cnt)    {      for (x=0;x<hMenu->items.GetSize(); x ++)      {        if (hMenu->items.Get(x)->hSubMenu) cnt += DeleteMenu(hMenu->items.Get(x)->hSubMenu,idx,flag)?1:0;      }    }    return !!cnt;  }}
开发者ID:aidush,项目名称:openmpt,代码行数:34,


示例26: Drt_OnContextMenu

万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。