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

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

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

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

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

示例1: wxCHECK_MSG

wxMenuItem* wxMenu::DoInsert(size_t pos, wxMenuItem *item){    if (m_menuWidget)    {        // this is a dynamic Append#ifndef XmNpositionIndex    wxCHECK_MSG( pos == GetMenuItemCount(), -1, wxT("insert not implemented"));#endif        item->CreateItem(m_menuWidget, GetMenuBar(), m_topLevelMenu, pos);    }    if ( item->IsSubMenu() )    {        item->GetSubMenu()->m_topLevelMenu = m_topLevelMenu;    }    return pos == GetMenuItemCount() ? wxMenuBase::DoAppend(item) :                                       wxMenuBase::DoInsert(pos, item);}
开发者ID:LuaDist,项目名称:wxwidgets,代码行数:19,


示例2: RecursiveDeleteMenu

int RecursiveDeleteMenu(HMENU hMenu){	int cnt = GetMenuItemCount(hMenu);	for (int i = 0; i < cnt; i++) {		HMENU submenu = GetSubMenu(hMenu, 0);		if (submenu) DestroyMenu(submenu);		DeleteMenu(hMenu, 0, MF_BYPOSITION);	}	return 0;}
开发者ID:martok,项目名称:miranda-ng,代码行数:10,


示例3: GetSubMenuByChildID

HMENU GetSubMenuByChildID(HMENU menu, UINT id) {  int i, j, items, subitems, cur_id;  HMENU m;  items = GetMenuItemCount(menu);  for (i=0; i<items; i++) {    if (m = GetSubMenu(menu, i)) {      subitems = GetMenuItemCount(m);      for (j=0; j<subitems; j++) {        cur_id = GetMenuItemID(m, j);	if (cur_id == id) {	  return m;	}      }    }  }  return NULL;}
开发者ID:pakls,项目名称:teraterm-ttssh2,代码行数:19,


示例4: wxASSERT_MSG

// function appends a new item or submenu to the menu// append a new item or submenu to the menubool wxMenu::DoInsertOrAppend(wxMenuItem *item, size_t pos){    wxASSERT_MSG( item != NULL, wxT("can't append NULL item to the menu") );    GetPeer()->InsertOrAppend( item, pos );    wxMenu *pSubMenu = item->GetSubMenu() ;    if ( pSubMenu != NULL )    {        wxASSERT_MSG( pSubMenu->GetHMenu() != NULL , wxT("invalid submenu added"));        pSubMenu->m_menuParent = this ;        pSubMenu->DoRearrange();    }    else if ( item->GetId() == idMenuTitle )    {        item->GetMenu()->Enable( idMenuTitle, false );    }    if ( pos == (size_t)-1 )    {        pos = GetMenuItemCount() - 1;    }    // Update radio groups if we're inserting a new menu item.    // Inserting radio and non-radio item has a different impact    // on radio groups, so we have to handle each case separately.    // (Inserting a radio item in the middle of existing groups extends this group,    // but inserting a non-radio item breaks it into two subgroups.)    bool check = false;    if ( item->IsRadio() )    {        if ( !m_radioData )            m_radioData = new wxMenuRadioItemsData;        if ( m_radioData->UpdateOnInsertRadio(pos) )            check = true; // ensure that we have a checked item in the radio group    }    else if ( m_radioData )    {        if ( m_radioData->UpdateOnInsertNonRadio(pos) )        {            // One of the existing groups has been split into two subgroups.            wxFAIL_MSG(wxS("Inserting non-radio item inside a radio group?"));        }    }    // if we're already attached to the menubar, we must update it    if ( IsAttached() && GetMenuBar()->IsAttached() )        GetMenuBar()->Refresh();    if ( check )        item->Check(true);    return true ;}
开发者ID:CodeSmithyIDE,项目名称:wxWidgets,代码行数:57,


示例5: add_user_menu_items

static void add_user_menu_items(HMENU menu){    MENUITEMINFO mii;    memset(&mii, 0, sizeof(MENUITEMINFO));    mii.type = MFT_SEPARATOR;    InsertMenuItem(menu, GetMenuItemCount(menu), TRUE, &mii);#if 1    memset(&mii, 0, sizeof(MENUITEMINFO));    mii.type = MFT_STRING;    mii.hsubmenu = 0;    mii.id = IDM_POP_NEW_TAB;    mii.state = MFS_ENABLED;    mii.cch = strlen("New Tab");    mii.typedata = (DWORD)"New Tab";    InsertMenuItem(menu, GetMenuItemCount(menu), TRUE, &mii);#endif    memset(&mii, 0, sizeof(MENUITEMINFO));    mii.type = MFT_STRING;    mii.hsubmenu = 0;    mii.id =  IDM_POP_SAVE_AS;    mii.state = MFS_ENABLED;    mii.cch = strlen("Save As...");    mii.typedata = (DWORD)"Save As...";    InsertMenuItem(menu, GetMenuItemCount(menu), TRUE, &mii);        memset(&mii, 0, sizeof(MENUITEMINFO));    mii.type = MFT_STRING;    mii.hsubmenu = 0;    mii.id = IDM_POP_CLOSE_TAB;        int count = SendMessage(propsheet_hwnd, PSM_GETPAGECOUNT, 0, 0);    if (count >1) {        mii.state &= ~MFS_DISABLED;        mii.state |= MFS_ENABLED;    } else {        mii.state &= ~MFS_ENABLED;        mii.state |= MFS_DISABLED;    }    mii.cch = strlen("Close Tab");    mii.typedata = (DWORD)"Close Tab";    InsertMenuItem(menu, GetMenuItemCount(menu), TRUE, &mii);}
开发者ID:bytewang,项目名称:vitas,代码行数:42,


示例6: GetBorderSize

//*********************************************************************************************************void CBCGPBaseFilterPopupMenu::RecalcLayout(BOOL bNotify /* = TRUE */){	CBCGPPopupMenu::RecalcLayout(bNotify);	if (m_wndMenuBar.GetSafeHwnd() != NULL)	{		m_wndMenuBar.m_arColumns.RemoveAll();		m_wndMenuBar.AdjustLayout();	}	if (m_wndList.GetSafeHwnd() == NULL)	{		return;	}	const int nShadowSize = CBCGPToolBar::IsCustomizeMode () ? 0 : m_iShadowSize;	const int nBorderSize = GetBorderSize();	CRect rectClient;	GetClientRect(rectClient);	rectClient.DeflateRect (nBorderSize, nBorderSize);	if (GetExStyle() & WS_EX_LAYOUTRTL)	{		rectClient.left += nShadowSize;	}	else	{		rectClient.right -= nShadowSize;	}		rectClient.top += m_nMenuBarHeight;	rectClient.bottom -= nShadowSize;#ifndef _BCGSUITE_	rectClient.left += m_wndMenuBar.GetGutterWidth();#endif	if (!m_rectResize.IsRectEmpty())	{		if (m_bIsResizeBarOnTop)		{			rectClient.top += m_rectResize.Height();		}		else		{			rectClient.bottom -= m_rectResize.Height();		}	}	m_wndList.SetWindowPos(NULL, rectClient.left, rectClient.top, rectClient.Width(), rectClient.Height(), SWP_NOZORDER | SWP_NOACTIVATE);	m_wndList.m_bIsEmptyMenu = GetMenuItemCount() == 0;}
开发者ID:iclosure,项目名称:jframework,代码行数:55,


示例7: SWELL_Menu_AddMenuItem

void SWELL_Menu_AddMenuItem(HMENU hMenu, const char *name, int idx, int flags){  MENUITEMINFO mi={sizeof(mi),MIIM_ID|MIIM_STATE|MIIM_TYPE,MFT_STRING,    (flags)?MFS_GRAYED:0,idx,NULL,NULL,NULL,0,(char *)name};  if (!name)  {    mi.fType = MFT_SEPARATOR;    mi.fMask&=~(MIIM_STATE|MIIM_ID);  }  InsertMenuItem(hMenu,GetMenuItemCount(hMenu),TRUE,&mi);}
开发者ID:aidush,项目名称:openmpt,代码行数:11,


示例8: FillMarkerRegionMenu

// _flags: &1=marker, &2=regionvoid FillMarkerRegionMenu(ReaProject* _proj, HMENU _menu, int _msgStart, int _flags, UINT _uiState){	int x=0, lastx=0;	char desc[SNM_MAX_MARKER_NAME_LEN]="";	while ((x = EnumMarkerRegionDesc(_proj, x, desc, SNM_MAX_MARKER_NAME_LEN, _flags, true, true, true))) {		if (*desc) AddToMenu(_menu, desc, _msgStart+lastx, -1, false, _uiState);		lastx=x;	}	if (!GetMenuItemCount(_menu))		AddToMenu(_menu, __LOCALIZE("(No region!)","sws_menu"), 0, -1, false, MF_GRAYED);}
开发者ID:AusRedNeck,项目名称:sws,代码行数:12,


示例9: winMouseOn

void MainWnd::OnContextMenu(CWnd* pWnd, CPoint point) {  winMouseOn();  if(theApp.skin) {    if(theApp.popup == NULL) {      theApp.winAccelMgr.UpdateMenu(theApp.menu);      theApp.popup = CreatePopupMenu();      if(theApp.menu != NULL) {        int count = GetMenuItemCount(theApp.menu);        OSVERSIONINFO info;        info.dwOSVersionInfoSize = sizeof(info);        GetVersionEx(&info);        if(info.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS) {          for(int i = 0; i < count; i++) {            char buffer[256];            MENUITEMINFO info;            ZeroMemory(&info, sizeof(info));            info.cbSize = sizeof(info) - sizeof(HBITMAP);            info.fMask = MIIM_STRING | MIIM_SUBMENU;            info.dwTypeData = buffer;            info.cch = 256;            if(!GetMenuItemInfo(theApp.menu, i, MF_BYPOSITION, &info)) {            }            if(!AppendMenu(theApp.popup, MF_POPUP|MF_STRING, (UINT)info.hSubMenu, buffer)) {            }          }        } else {          for(int i = 0; i < count; i++) {            wchar_t buffer[256];            MENUITEMINFOW info;            ZeroMemory(&info, sizeof(info));            info.cbSize = sizeof(info) - sizeof(HBITMAP);            info.fMask = MIIM_STRING | MIIM_SUBMENU;            info.dwTypeData = buffer;            info.cch = 256;            if(!GetMenuItemInfoW(theApp.menu, i, MF_BYPOSITION, &info)) {            }            if(!AppendMenuW(theApp.popup, MF_POPUP|MF_STRING, (UINT)info.hSubMenu, buffer)) {            }          }        }      }    }    int x = point.x;    int y = point.y;    if(x == -1 && y == -1) {      x = (theApp.dest.left + theApp.dest.right) / 2;      y = (theApp.dest.top + theApp.dest.bottom) / 2;    }    if(!TrackPopupMenu(theApp.popup, 0, x, y, 0, m_hWnd, NULL)) {    }  }}
开发者ID:BackupTheBerlios,项目名称:vbastep-svn,代码行数:54,


示例10: get_menu_position

/* find index in menu bar; returns -1 if not installed */static int get_menu_position(HMENU addr){  int n, i;  if (addr == NULL) return -1;    n = GetMenuItemCount(hMainMenu);  for (i = 0; i < n; i++)    if (addr == GetSubMenu(hMainMenu, i))      return(i);  return(-1);}
开发者ID:jhbadger,项目名称:xlispstat,代码行数:12,


示例11: mh_additem

static int mh_additem (lua_State* l) {menu* m = lua_touserdata(l,1);if (!m->sub) return 0;int k = 2, pos = 0;if (lua_isnumber(l,k)) pos = lua_tointeger(l,k++);if (pos==0) pos = -1;else if (pos>0) pos--;else if (pos<-1) pos += GetMenuItemCount(m->menu);const char* str = luaL_checkstring(l,k++);const char* sShortcut = NULL;if (lua_isstring(l,k)) sShortcut = lua_tostring(l,k++);else if (lua_isnoneornil(l,k)) k++;if (!lua_isfunction(l,k)) luaL_typerror(l, k, "function");void* p = lua_topointer(l,k++);if (!p) return 0;const wchar_t* wstr = strcvt(str, CP_UTF8, CP_UTF16, NULL);int command = addCustomCommand(p) + IDM_CUSTOMCOMMAND;int kFlags = 0, key=0;if (parseKeyName(sShortcut, &kFlags, &key)) {addAccelerator(kFlags, key, command);const wchar_t* z = mh_buildLabel(wstr, kFlags, key);if (z!=wstr) {free(wstr);wstr = z;}}menu it;it.sub = FALSE;it.parent = m->menu;it.origin = m->origin;it.position = (pos==-1? GetMenuItemCount(m->menu) -1 : pos);it.command = command;InsertMenu(m->menu, pos, MF_STRING | MF_BYPOSITION, command, wstr);DrawMenuBar(win);free(wstr);lua_pushlightuserdata(l, command);lua_pushluafunction(l, p);lua_rawset(l, LUA_REGISTRYINDEX);lua_settop(l,0);lua_pushfulluserdata(l, &it, sizeof(it), "menuhandle");return 1;}
开发者ID:qtnc,项目名称:6pad,代码行数:41,


示例12: while

unsigned int Win32Popup::findInsertionPoint( unsigned int pos ) const{    // For this simple algorithm, we rely on the fact that in the final state    // of the menu, the ID of each item is equal to its position in the menu    int i = 0;    while( i < GetMenuItemCount( m_hMenu ) &&           GetMenuItemID( m_hMenu, i ) < pos )    {        i++;    }    return i;}
开发者ID:mstorsjo,项目名称:vlc,代码行数:12,


示例13: SWSGetMenuPosFromID

int SWSGetMenuPosFromID(HMENU hMenu, UINT id){	// Replacement for deprecated windows func GetMenuPosFromID	MENUITEMINFO mi={sizeof(MENUITEMINFO),};	mi.fMask = MIIM_ID;	for (int i = 0; i < GetMenuItemCount(hMenu); i++)	{		GetMenuItemInfo(hMenu, i, true, &mi);		if (mi.wID == id)			return i;	}	return -1;}
开发者ID:AusRedNeck,项目名称:sws,代码行数:12,


示例14: EventArea_DrawWorker

static int EventArea_DrawWorker(HWND hWnd, HDC hDC){	RECT rc;	HFONT hOldFont;	GetClientRect(hWnd, &rc);	if (g_CluiData.fDisableSkinEngine)		sttDrawEventAreaBackground(hWnd, hDC, &rc);	else		SkinDrawGlyph(hDC, &rc, &rc, "Main,ID=EventArea");	hOldFont = g_clcPainter.ChangeToFont(hDC, NULL, FONTID_EVENTAREA, NULL);	SetBkMode(hDC, TRANSPARENT);	int iCount = GetMenuItemCount(g_CluiData.hMenuNotify);	rc.left += 26;	if (g_CluiData.hUpdateContact != 0) {		TCHAR *szName = pcli->pfnGetContactDisplayName(g_CluiData.hUpdateContact, 0);		int iIcon = cli_GetContactIcon(g_CluiData.hUpdateContact);		ske_ImageList_DrawEx(g_himlCListClc, iIcon, hDC, rc.left, (rc.bottom + rc.top - GetSystemMetrics(SM_CYSMICON)) / 2, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), CLR_NONE, CLR_NONE, ILD_NORMAL);		rc.left += 18;		ske_DrawText(hDC, szName, -1, &rc, DT_VCENTER | DT_SINGLELINE);		ske_ImageList_DrawEx(g_himlCListClc, (int)g_CluiData.iIconNotify, hDC, 4, (rc.bottom + rc.top - 16) / 2, 16, 16, CLR_NONE, CLR_NONE, ILD_NORMAL);	}	else if (iCount > 0) {		MENUITEMINFO mii = { 0 };		struct NotifyMenuItemExData *nmi;		TCHAR *szName;		int iIcon;		mii.cbSize = sizeof(mii);		mii.fMask = MIIM_DATA;		GetMenuItemInfo(g_CluiData.hMenuNotify, iCount - 1, TRUE, &mii);		nmi = (struct NotifyMenuItemExData *) mii.dwItemData;		szName = pcli->pfnGetContactDisplayName(nmi->hContact, 0);		iIcon = cli_GetContactIcon(nmi->hContact);		ske_ImageList_DrawEx(g_himlCListClc, iIcon, hDC, rc.left, (rc.bottom + rc.top - GetSystemMetrics(SM_CYSMICON)) / 2, GetSystemMetrics(SM_CXSMICON), GetSystemMetrics(SM_CYSMICON), CLR_NONE, CLR_NONE, ILD_NORMAL);		rc.left += 18;		ske_ImageList_DrawEx(g_himlCListClc, nmi->iIcon, hDC, 4, (rc.bottom + rc.top) / 2 - 8, 16, 16, CLR_NONE, CLR_NONE, ILD_NORMAL);		ske_DrawText(hDC, szName, -1, &rc, DT_VCENTER | DT_SINGLELINE);	}	else {		HICON hIcon = (HICON)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_BLANK), IMAGE_ICON, 16, 16, 0);		TCHAR *ptszEvents = TranslateT("No events");		ske_DrawText(hDC, ptszEvents, (int)mir_tstrlen(ptszEvents), &rc, DT_VCENTER | DT_SINGLELINE);		ske_DrawIconEx(hDC, 4, (rc.bottom + rc.top - 16) / 2, hIcon, 16, 16, 0, 0, DI_NORMAL | DI_COMPAT);		DestroyIcon(hIcon);	}	ske_ResetTextEffect(hDC);	SelectObject(hDC, hOldFont);	return 0;}
开发者ID:martok,项目名称:miranda-ng,代码行数:53,


示例15:

OMenu::~OMenu() {	if (::IsMenu(m_hMenu)) {		for (int i = 0; i < GetMenuItemCount(); ++i)			CheckOwnerDrawn(i, TRUE);	} else {		// How can we end up here??? it sure happens sometimes..		for (OMenuItem::Iter i = items.begin(); i != items.end(); ++i) {			delete *i;		}	}	//pUnMap();}
开发者ID:inetra,项目名称:peers1,代码行数:12,


示例16: CreateVdmMenu

/*static*/ VOIDCreateVdmMenu(HANDLE ConOutHandle){    hConsoleMenu = ConsoleMenuControl(ConOutHandle,                                      ID_SHOWHIDE_MOUSE,                                      ID_VDM_QUIT);    if (hConsoleMenu == NULL) return;    VdmMenuPos = GetMenuItemCount(hConsoleMenu);    AppendMenuItems(hConsoleMenu, VdmMainMenuItems);    DrawMenuBar(GetConsoleWindow());}
开发者ID:staring,项目名称:RosFE,代码行数:12,


示例17: GetMenuItemCount

int CCustomMenu::GetTopMenuWidth(){	int Count = GetMenuItemCount();	int width = 0;	CRect rc;	for (int i=0; i<Count; i++)	{		::GetMenuItemRect(AfxGetMainWnd()->m_hWnd,m_hMenu,i,rc);		width += rc.Width();	}	return width;}
开发者ID:wuzhipeng2014,项目名称:FiveChess,代码行数:12,


示例18: while

OMenu::~OMenu() {	if (::IsMenu(m_hMenu)) {		while(GetMenuItemCount() != 0)			RemoveMenu(0, MF_BYPOSITION);	} else {		// How can we end up here??? it sure happens sometimes..		for (OMenuItem::Iter i = items.begin(); i != items.end(); ++i) {			delete *i;		}	}	//pUnMap();}
开发者ID:strogo,项目名称:StrongDC,代码行数:12,


示例19: DestroyTrayMenu

void DestroyTrayMenu(HMENU hMenu){	int i, cnt;	cnt = GetMenuItemCount(hMenu);	for (i = 0; i < cnt; ++i) {		HMENU hSubMenu = GetSubMenu(hMenu, i);		if (hSubMenu == hMainStatusMenu || hSubMenu == hMainMenu)			RemoveMenu(hMenu, i--, MF_BYPOSITION);	}	DestroyMenu(hMenu);}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:12,


示例20: GetIndexOfItem

INT GetIndexOfItem(HMENU menu, UINT id){	for (int i = GetMenuItemCount(menu) - 1; i >= 0; i--)	{		int x = GetMenuItemID(menu, i);		if (id == x)		{			return i;		}	}	return -1;}
开发者ID:Eun,项目名称:MoveToDesktop,代码行数:12,


示例21: Show

	BOOL Show(HINSTANCE hInstance, int nCmdShow)	{		hInst = hInstance; // Store instance handle in our global variable		int zoom = g_Config.iWindowZoom;		if (zoom < 1) zoom = 1;		if (zoom > 4) zoom = 4;				RECT rc,rcOrig;		GetWindowRectAtZoom(zoom, rcOrig, rc);		u32 style = WS_OVERLAPPEDWINDOW;		hwndMain = CreateWindowEx(0,szWindowClass, "", style,			rc.left, rc.top, rc.right-rc.left, rc.bottom-rc.top, NULL, NULL, hInstance, NULL);		SetTimer(hwndMain, TIMER_CURSORUPDATE, CURSORUPDATE_INTERVAL_MS, 0);		SetPlaying(0);		if (!hwndMain)			return FALSE;		menu = GetMenu(hwndMain);#ifdef FINAL		RemoveMenu(menu,2,MF_BYPOSITION);		RemoveMenu(menu,2,MF_BYPOSITION);#endif		MENUINFO info;		ZeroMemory(&info,sizeof(MENUINFO));		info.cbSize = sizeof(MENUINFO);		info.cyMax = 0;		info.dwStyle = MNS_CHECKORBMP;		info.fMask = MIM_STYLE;		for (int i = 0; i < GetMenuItemCount(menu); i++)		{			SetMenuInfo(GetSubMenu(menu,i),&info);		}		hwndDisplay = CreateWindowEx(0,szDisplayClass,TEXT(""),			WS_CHILD|WS_VISIBLE,			0,0,/*rcOrig.left,rcOrig.top,*/rcOrig.right-rcOrig.left,rcOrig.bottom-rcOrig.top,hwndMain,0,hInstance,0);		ShowWindow(hwndMain, nCmdShow);		//accept dragged files		DragAcceptFiles(hwndMain, TRUE);#if ENABLE_TOUCH		RegisterTouchWindow(hwndDisplay, TWF_WANTPALM);#endif		SetFocus(hwndMain);		SetFocus(hwndDisplay);		return TRUE;	}
开发者ID:CPkmn,项目名称:ppsspp,代码行数:53,


示例22: FindMenuGroup

HMENU CUserMeetingDlg::FindMenuGroup(HMENU hParent, LPCTSTR lpszMenu){	for ( int nItem = GetMenuItemCount( hParent ); nItem > 0; nItem-- )	{		TCHAR strItem[64];		GetMenuString( hParent, nItem - 1, strItem, 64, MF_BYPOSITION );				if ( ! _tcsicmp( strItem, lpszMenu ) ) return GetSubMenu( hParent, nItem - 1 );	}		return NULL;}
开发者ID:pics860,项目名称:callcenter,代码行数:12,


示例23: GetMenuItemPosition

int GetMenuItemPosition(HMENU menu, UINT id) {  for (int i = 0; i < GetMenuItemCount(menu); i++) {    MENUITEMINFO info = { 0 };    info.cbSize = sizeof(info);    info.fMask = MIIM_ID;    GetMenuItemInfo(menu, i, TRUE, &info);    if (info.wID == id)      return i;  }  ATLASSERT(FALSE);  return -1;}
开发者ID:BackupTheBerlios,项目名称:sfsipua-svn,代码行数:12,


示例24: wxCHECK_MSG

wxMenuItem* wxMenu::DoAppend(wxMenuItem *item){    wxCHECK_MSG( item, NULL, wxT("NULL item in wxMenu::DoAppend") );    bool check = false;    if ( item->GetKind() == wxITEM_RADIO )    {        int count = GetMenuItemCount();        if ( m_startRadioGroup == -1 )        {            // start a new radio group            m_startRadioGroup = count;            // for now it has just one element            item->SetAsRadioGroupStart();            item->SetRadioGroupEnd(m_startRadioGroup);            // ensure that we have a checked item in the radio group            check = true;        }        else // extend the current radio group        {            // we need to update its end item            item->SetRadioGroupStart(m_startRadioGroup);            wxMenuItemList::compatibility_iterator node = GetMenuItems().Item(m_startRadioGroup);            if ( node )            {                node->GetData()->SetRadioGroupEnd(count);            }            else            {                wxFAIL_MSG( wxT("where is the radio group start item?") );            }        }    }    else // not a radio item    {        EndRadioGroup();    }    if ( !wxMenuBase::DoAppend(item) || !DoInsertOrAppend(item) )        return NULL;    if ( check )        // check the item initially        item->Check(true);    return item;}
开发者ID:iokto,项目名称:newton-dynamics,代码行数:52,


示例25: Show

	BOOL Show(HINSTANCE hInstance) {		hInst = hInstance; // Store instance handle in our global variable.		RECT rc = DetermineWindowRectangle();		u32 style = WS_OVERLAPPEDWINDOW;		hwndMain = CreateWindowEx(0,szWindowClass, L"", style,			rc.left, rc.top, rc.right - rc.left, rc.bottom - rc.top, NULL, NULL, hInstance, NULL);		if (!hwndMain)			return FALSE;		SetWindowLong(hwndMain, GWL_EXSTYLE, WS_EX_APPWINDOW);		RECT rcClient;		GetClientRect(hwndMain, &rcClient);		hwndDisplay = CreateWindowEx(0, szDisplayClass, L"", WS_CHILD | WS_VISIBLE,			0, 0, rcClient.right - rcClient.left, rcClient.bottom - rcClient.top, hwndMain, 0, hInstance, 0);		if (!hwndDisplay)			return FALSE;		menu = GetMenu(hwndMain);		MENUINFO info;		ZeroMemory(&info,sizeof(MENUINFO));		info.cbSize = sizeof(MENUINFO);		info.cyMax = 0;		info.dwStyle = MNS_CHECKORBMP;		info.fMask = MIM_STYLE;		for (int i = 0; i < GetMenuItemCount(menu); i++) {			SetMenuInfo(GetSubMenu(menu,i), &info);		}		UpdateMenus();		// Accept dragged files.		DragAcceptFiles(hwndMain, TRUE);		hideCursor = true;		SetTimer(hwndMain, TIMER_CURSORUPDATE, CURSORUPDATE_INTERVAL_MS, 0);		ToggleFullscreen(hwndMain, g_Config.bFullScreen);		W32Util::MakeTopMost(hwndMain, g_Config.bTopMost);		touchHandler.registerTouchWindow(hwndDisplay);		WindowsRawInput::Init();		SetFocus(hwndMain);		return TRUE;	}
开发者ID:jduranmaster,项目名称:ppsspp,代码行数:52,


示例26: IsStartMenu

/*--------------------------------------------------  HMENU is start menu ?----------------------------------------------------*/BOOL IsStartMenu(HMENU hmenu){	int i, count, id;		count = GetMenuItemCount(hmenu);	for(i = 0; i < count; i++)	{		id = GetMenuItemID(hmenu, i);		// "Help" item		if(id == 503) return TRUE;	}	return FALSE;}
开发者ID:k-takata,项目名称:TClockLight,代码行数:16,


示例27: AddBookMark

static int AddBookMark(char *Path){	HMENU hMenu;	int MarkID;	int Sts;	Sts = FAIL;	hMenu = GetSubMenu(GetMenu(GetMainHwnd()), BMARK_SUB_MENU);	MarkID = (GetMenuItemCount(hMenu) - DEFAULT_BMARK_ITEM) + MENU_BMARK_TOP;	if(AppendMenu(hMenu, MF_STRING, MarkID, Path) == TRUE)		Sts = SUCCESS;	return(Sts);}
开发者ID:umorigu,项目名称:ffftp-mirror,代码行数:13,


示例28: WdeEnableAllMenuItems

static void WdeEnableAllMenuItems( HMENU menu, Bool enable ){    int count;    count = GetMenuItemCount( menu );    for( count--; count >= 0; count-- ) {        if( enable ) {            EnableMenuItem( menu, count, MF_ENABLED | MF_BYPOSITION );        } else {            EnableMenuItem( menu, count, MF_GRAYED | MF_BYPOSITION );        }    }}
开发者ID:Ukusbobra,项目名称:open-watcom-v2,代码行数:13,


示例29: GetMenuItemCount

	/*static*/	int Win32MenuItem::GetNativeMenuItemPosition(NativeItemBits* bits)	{		int count = GetMenuItemCount(bits->parentMenu);		for (int i = 0; i < count; i++)		{			if ((bits->submenu && GetSubMenu(bits->parentMenu, i) == bits->submenu) ||				(bits->id == GetMenuItemID(bits->parentMenu, i)))				return i;		}		throw ValueException::FromString("Could not find native item index in native menu.");	}
开发者ID:JamesHayton,项目名称:titanium_desktop,代码行数:14,



注:本文中的GetMenuItemCount函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


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