当前位置: 首页>>代码示例>>C++>>正文


C++ CUIntArray::GetData方法代码示例

本文整理汇总了C++中CUIntArray::GetData方法的典型用法代码示例。如果您正苦于以下问题:C++ CUIntArray::GetData方法的具体用法?C++ CUIntArray::GetData怎么用?C++ CUIntArray::GetData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CUIntArray的用法示例。


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

示例1: LoadIcons

void CXTPRibbonBuilder::LoadIcons(int nId, CUIntArray& arrIcons)
{
	CXTPImageManager* pImageManager = m_pCommandBars->GetImageManager();


	HBITMAP hBitmap = CXTPImageManagerIcon::LoadBitmapFromResource(MAKEINTRESOURCE(nId), NULL);
	if (hBitmap)
	{
		BITMAP bmpInfo;
		::GetObject(hBitmap, sizeof(BITMAP), &bmpInfo);

		CSize szBitmap = CSize(bmpInfo.bmWidth, bmpInfo.bmHeight);

		int nCount = 0;

		if (szBitmap.cy >= 15 && szBitmap.cy <= 16)
		{
			nCount = szBitmap.cx / 16;
		}
		else if (szBitmap.cy == 32)
		{
			nCount = szBitmap.cx / 32;
		}

		while (arrIcons.GetSize() < nCount)
			arrIcons.Add(0);

		DeleteObject(hBitmap);
	}

	pImageManager->SetIcons(nId, arrIcons.GetData(), (int)arrIcons.GetSize(), CSize(0, 0), xtpImageNormal);

}
开发者ID:lai3d,项目名称:ThisIsASoftRenderer,代码行数:33,代码来源:XTPRibbonBuilder.cpp

示例2: OnRclickList


//.........这里部分代码省略.........
							m.AppendMenu(MF_STRING | MF_ENABLED, id++, key);
						}
					}
				}
				break;
		}

		CPoint p = lpnmlv->ptAction;
		::MapWindowPoints(pNMHDR->hwndFrom, HWND_DESKTOP, &p, 1);

		UINT id = m.TrackPopupMenu(TPM_LEFTBUTTON | TPM_RETURNCMD, p.x, p.y, this);

		bool fNeedsUpdate = false;

		POSITION pos = m_list.GetFirstSelectedItemPosition();
		while (pos) {
			int iItem = m_list.GetNextSelectedItem(pos);

			SubTime& st = m_subtimes[iItem];

			switch (id) {
				case TOGSEP:
					m_list.SetItemData(iItem, m_list.GetItemData(iItem) ^ TSEP);
					m_list.Invalidate();
					fNeedsUpdate = true;
					break;
				case DUPITEM: {
					CUIntArray items;
					pos = m_list.GetFirstSelectedItemPosition();
					while (pos) {
						items.Add(m_list.GetNextSelectedItem(pos));
					}

					qsort(items.GetData(), items.GetCount(), sizeof(UINT), uintcomp);

					for (INT_PTR i = 0, l = items.GetCount(); i < l; i++) {
						iItem = items[i];

						STSEntry stse = m_sts[iItem];
						m_sts.InsertAt(iItem + 1, stse);

						SubTime st = m_subtimes[iItem];
						m_subtimes.InsertAt(iItem + 1, st);

						CHeaderCtrl* pHeader = (CHeaderCtrl*)m_list.GetDlgItem(0);
						int nColumnCount = pHeader->GetItemCount();

						CStringArray sa;
						sa.SetSize(nColumnCount);
						for (int col = 0; col < nColumnCount; col++) {
							sa[col] = m_list.GetItemText(iItem, col);
						}

						DWORD_PTR data = m_list.GetItemData(iItem);
						m_list.InsertItem(iItem + 1, sa[0]);
						m_list.SetItemData(iItem + 1, data);
						for (int col = 1; col < nColumnCount; col++) {
							m_list.SetItemText(iItem + 1, col, sa[col]);
						}
					}
				}

				fNeedsUpdate = true;
				break;
				case DELITEM: {
					CUIntArray items;
开发者ID:Tphive,项目名称:mpc-be,代码行数:67,代码来源:PlayerSubresyncBar.cpp

示例3: OnRclickList


//.........这里部分代码省略.........
                            m.AppendMenu(MF_STRING | MF_ENABLED, id++, key);
                        }
                    }
                }
                break;
        }

        CPoint p = lpnmlv->ptAction;
        ::MapWindowPoints(pNMHDR->hwndFrom, HWND_DESKTOP, &p, 1);

        UINT id = m.TrackPopupMenu(TPM_LEFTBUTTON | TPM_RETURNCMD, p.x, p.y, this);

        bool bNeedsUpdate = false;

        POSITION pos = m_list.GetFirstSelectedItemPosition();
        while (pos) {
            int iItem = m_list.GetNextSelectedItem(pos);

            SubTime& st = m_subtimes[iItem];

            switch (id) {
                case TOGSEP:
                    m_displayData[iItem].flags ^= TSEP;
                    m_list.Invalidate();
                    bNeedsUpdate = true;
                    break;
                case DUPITEM: {
                    CUIntArray items;
                    pos = m_list.GetFirstSelectedItemPosition();
                    while (pos) {
                        items.Add(m_list.GetNextSelectedItem(pos));
                    }

                    qsort(items.GetData(), items.GetCount(), sizeof(UINT), uintcomp);

                    for (INT_PTR i = 0, l = items.GetCount(); i < l; i++) {
                        iItem = items[i];

                        STSEntry entry = m_sts[iItem];
                        m_sts.InsertAt(iItem + 1, entry);
                        SubTime subtime = m_subtimes[iItem];
                        m_subtimes.InsertAt(iItem + 1, subtime);
                        DisplayData displayData = m_displayData[iItem];
                        m_displayData.InsertAt(iItem + 1, displayData);
                    }

                    m_list.SetItemCount((int)m_sts.GetCount());

                    bNeedsUpdate = true;
                    break;
                }
                case DELITEM: {
                    CUIntArray items;
                    pos = m_list.GetFirstSelectedItemPosition();
                    while (pos) {
                        items.Add(m_list.GetNextSelectedItem(pos));
                    }

                    qsort(items.GetData(), items.GetCount(), sizeof(UINT), uintcomp);

                    for (INT_PTR i = 0, l = items.GetCount(); i < l; i++) {
                        iItem = items[i];
                        m_sts.RemoveAt(iItem);
                        m_subtimes.RemoveAt(iItem);
                        m_displayData.RemoveAt(iItem);
                    }
开发者ID:Murder66,项目名称:mpc-hc-master,代码行数:67,代码来源:PlayerSubresyncBar.cpp


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