• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ ListBox_ResetContent函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: UpdateAllyLists

/*
 * UpdateAllyLists:  Helper function to clear and update the alliance info
 */
void UpdateAllyLists(HWND hDlg)
{
   ListBox_ResetContent(GetDlgItem(hDlg, IDC_ALLYGUILDS));
   ListBox_ResetContent(GetDlgItem(hDlg, IDC_GUILDS));
   ListBox_ResetContent(GetDlgItem(hDlg, IDC_ENEMYGUILDS));
   RequestGuildList();

   return;
}
开发者ID:Tatsujinichi,项目名称:Meridian59,代码行数:12,代码来源:guildaly.c


示例2: GetDlgItem

void CSetDlgNetwork::OnBnClickedButtonDelUdp()
{
	// TODO: ここにコントロール通知ハンドラー コードを追加します。
	HWND hItem = GetDlgItem(IDC_LIST_IP_UDP);
	int sel = ListBox_GetCurSel(hItem);
	if( sel != LB_ERR ){
		int index = (int)ListBox_GetItemData(hItem, sel);

		vector<NW_SEND_INFO>::iterator itr;
		itr = udpSendList.begin();
		advance(itr, index);
		udpSendList.erase(itr);

		ListBox_ResetContent(hItem);

		for( int i=0; i<(int)udpSendList.size(); i++ ){
			wstring add = L"";
			Format(add, L"%s:%d",udpSendList[i].ipString.c_str(), udpSendList[i].port);
			if( udpSendList[i].broadcastFlag == TRUE ){
				add+= L" ブロードキャスト";
			}
			index = ListBox_AddString(hItem, add.c_str());
			ListBox_SetItemData(hItem, index, i);
		}
	}
}
开发者ID:abt8WG,项目名称:EDCB,代码行数:26,代码来源:SetDlgNetwork.cpp


示例3: LookListSetContents

/* 
 * LookListSetContents: Set contents & highlight of list box in Look dialog.
 */
void LookListSetContents(HWND hwndListBox, list_type contents, int flags)
{
   list_type l;
   object_node *obj;
   
   WindowBeginUpdate(hwndListBox);
   ListBox_ResetContent(hwndListBox);
   
   /* Fill in list box with stuff from passed-in list */
   for (l = contents; l != NULL; l = l->next)
   {
      /* We need to make a copy of this object, because the original object
         might be freed by the game before this dialog ends */
      obj = ObjectCopy((object_node *) (l->data));
      ItemListAddItem(hwndListBox, obj, -1, !(flags & LD_AMOUNTS));  /* Add to end */
   }
   WindowEndUpdate(hwndListBox);
   
   /* In single selection box, make 1st item default.  In multiple selection,
    * only highlight 1st item if there is just 1 item AND item doesn't need an amount */
   if ((flags & LD_MULTIPLESEL) && contents->next == NULL)
   {
      obj = (object_node *) contents->data;
      if (!(info->flags & LD_AMOUNTS) || !IsNumberObj(obj->id))
      {
         ListBox_SetSel(hwndListBox, TRUE, 0);
         info->selected[0] = True;
      }
   }
   else ListBox_SetCurSel(hwndListBox, 0); 
}
开发者ID:AlleyCat1976,项目名称:Meridian59_103,代码行数:34,代码来源:lookdlg.c


示例4: ShDirProc

/////////////////////////////////////////
// Dir window callback
LRESULT CALLBACK ShDirProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
static const int tTabs[] = { 90, 125 };
struct S_DirectoryContent *pDir = (struct S_DirectoryContent *) lParam;
HWND hLBWnd = GetDlgItem (hWnd, IDC_LB_SHDIR);
int Ark;

  switch (message)
  {
       case WM_INITDIALOG :
	   	   // Set the window name to either tftpd32 or tftpd64
	       SetWindowText (hWnd, TFTPD_DIR_TITLE);

           ListBox_SetTabStops ( hLBWnd, SizeOfTab(tTabs), tTabs );
           ListBox_ResetContent ( hLBWnd );
           for ( Ark=0 ;  Ark < pDir->nb ;  Ark++ )
                ListBox_AddString ( hLBWnd, pDir->ent[Ark].file_descr );
           CenterChildWindow (hWnd, CCW_INSIDE | CCW_VISIBLE);
           // If GUI is in remote mode, deactivate Explorer Button
           if ( IsGuiConnectedToRemoteService () )
                Button_Enable (GetDlgItem (hWnd, IDC_SD_EXPLORER), FALSE);
           break;

       case WM_COMMAND :
            Handle_VM_Command (hWnd, wParam, lParam);
           break;
       case WM_CLOSE :
       case WM_DESTROY :
            EndDialog (hWnd, 0);
            break;

  } // switch

return FALSE;
} // ShDirProc
开发者ID:madnessw,项目名称:thesnow,代码行数:37,代码来源:gui_tftp_dir.c


示例5: update_disasm

static void update_disasm(HWND hwnd)
{
	SCROLLINFO si;
	int i,highlight = -1;
	char str[128];
	HWND hctrl = GetDlgItem(hwnd,IDC_DISASMLIST);
	u32 p = pc;

	//clear listbox
	ListBox_ResetContent(hctrl);

	//draw lines
	for(i=0;i<29;i++) {
		memset(str,0,128);
		sprintf(str,"%04X:\t",p);
		if(nes->cpu.pc == p)
			highlight = i;
		p = cpu_disassemble(&str[6],p);
		str[14] = '\t';
		str[18] = '\t';
		ListBox_AddString(hctrl,str);
	}
	if(highlight >= 0)
		ListBox_SetCurSel(hctrl,highlight);
	si.cbSize = sizeof(SCROLLINFO);
	si.fMask = SIF_POS;
	si.nPos = pc;
	SetScrollInfo(GetDlgItem(hwnd,IDC_DISASMSCROLL),SB_CTL,&si,TRUE);
}
开发者ID:Aleyr,项目名称:nesemu2,代码行数:29,代码来源:debugger.c


示例6: ShowWindow

void SymbolMap::FillSymbolListBox(HWND listbox,SymbolType symmask)
{
    ShowWindow(listbox,SW_HIDE);
    ListBox_ResetContent(listbox);

    //int style = GetWindowLong(listbox,GWL_STYLE);

    ListBox_AddString(listbox,"(0x80000000)");
    ListBox_SetItemData(listbox,0,0x80000000);

    //ListBox_AddString(listbox,"(0x80002000)");
    //ListBox_SetItemData(listbox,1,0x80002000);

    for (size_t i = 0; i < entries.size(); i++)
    {
        if (entries[i].type & symmask)
        {
            char temp[256];
            sprintf(temp,"%s (%d)",entries[i].name,entries[i].size);
            int index = ListBox_AddString(listbox,temp);
            ListBox_SetItemData(listbox,index,entries[i].vaddress);
        }
    }

    ShowWindow(listbox,SW_SHOW);
}
开发者ID:HomerSp,项目名称:ppsspp,代码行数:26,代码来源:SymbolMap.cpp


示例7: ShowWindow

void SymbolMap::FillSymbolListBox(HWND listbox,SymbolType symmask)
{
    ShowWindow(listbox,SW_HIDE);
    ListBox_ResetContent(listbox);

    //int style = GetWindowLong(listbox,GWL_STYLE);

    ListBox_AddString(listbox,"(0x80000000)");
    ListBox_SetItemData(listbox,0,0x80000000);

    //ListBox_AddString(listbox,"(0x80002000)");
    //ListBox_SetItemData(listbox,1,0x80002000);

    SendMessage(listbox, WM_SETREDRAW, FALSE, 0);
    SendMessage(listbox, LB_INITSTORAGE, (WPARAM)entries.size(), (LPARAM)entries.size() * 30);
    for (size_t i = 0; i < entries.size(); i++)
    {
        if (entries[i].type & symmask)
        {
            char temp[256];
            sprintf(temp,"%s (%d)",entries[i].name,entries[i].size);
            int index = ListBox_AddString(listbox,temp);
            ListBox_SetItemData(listbox,index,entries[i].vaddress);
        }
    }
    SendMessage(listbox, WM_SETREDRAW, TRUE, 0);
    RedrawWindow(listbox, NULL, NULL, RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN);

    ShowWindow(listbox,SW_SHOW);
}
开发者ID:jeid3,项目名称:ppsspp,代码行数:30,代码来源:SymbolMap.cpp


示例8: getSpellChecker

void LangListDialog::update()
{
  if (!isCreated ())
    return;

  auto status = getSpellChecker()->getStatus();
  ListBox_ResetContent(HLangList);
  for (auto &lang : status->languageList) ListBox_AddString(HLangList, lang.aliasName.c_str ());

  auto settingsCopy = *getSpellChecker()->getSettings();
  wchar_t *multiLangCopy = nullptr;
  wchar_t *context = nullptr;
  setString (multiLangCopy, settingsCopy.spellerSettings[SpellerType::hunspell].activeMultiLanguage.data ());
  int index = 0;
  auto token = _tcstok_s(multiLangCopy, _T ("|"), &context);
  while (token) {
    index = -1;
    for (int i = 0; i < static_cast<int> (status->languageList.size ()); ++i) {
      if (status->languageList[i].originalName == token) {
        index = i;
        break;
      }
    }
    if (index != -1)
      CheckedListBox_SetCheckState(HLangList, index, BST_CHECKED);
    token = _tcstok_s(NULL, _T ("|"), &context);
  }
  CLEAN_AND_ZERO_ARR (multiLangCopy);
}
开发者ID:edwpang,项目名称:DSpellCheck,代码行数:29,代码来源:LangListDialog.cpp


示例9: UpdateActiveSymbols

void SymbolMap::FillSymbolListBox(HWND listbox,SymbolType symType) {
	if (activeNeedUpdate_)
		UpdateActiveSymbols();

	wchar_t temp[256];
	std::lock_guard<std::recursive_mutex> guard(lock_);

	SendMessage(listbox, WM_SETREDRAW, FALSE, 0);
	ListBox_ResetContent(listbox);

	switch (symType) {
	case ST_FUNCTION:
		{
			SendMessage(listbox, LB_INITSTORAGE, (WPARAM)activeFunctions.size(), (LPARAM)activeFunctions.size() * 30);

			for (auto it = activeFunctions.begin(), end = activeFunctions.end(); it != end; ++it) {
				const FunctionEntry& entry = it->second;
				const char* name = GetLabelName(it->first);
				if (name != NULL)
					wsprintf(temp, L"%S", name);
				else
					wsprintf(temp, L"0x%08X", it->first);
				int index = ListBox_AddString(listbox,temp);
				ListBox_SetItemData(listbox,index,it->first);
			}
		}
		break;

	case ST_DATA:
		{
			int count = ARRAYSIZE(defaultSymbols)+(int)activeData.size();
			SendMessage(listbox, LB_INITSTORAGE, (WPARAM)count, (LPARAM)count * 30);

			for (int i = 0; i < ARRAYSIZE(defaultSymbols); i++) {
				wsprintf(temp, L"0x%08X (%S)", defaultSymbols[i].address, defaultSymbols[i].name);
				int index = ListBox_AddString(listbox,temp);
				ListBox_SetItemData(listbox,index,defaultSymbols[i].address);
			}

			for (auto it = activeData.begin(), end = activeData.end(); it != end; ++it) {
				const DataEntry& entry = it->second;
				const char* name = GetLabelName(it->first);

				if (name != NULL)
					wsprintf(temp, L"%S", name);
				else
					wsprintf(temp, L"0x%08X", it->first);

				int index = ListBox_AddString(listbox,temp);
				ListBox_SetItemData(listbox,index,it->first);
			}
		}
		break;
	}

	SendMessage(listbox, WM_SETREDRAW, TRUE, 0);
	RedrawWindow(listbox, NULL, NULL, RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN);
}
开发者ID:AmesianX,项目名称:ppsspp,代码行数:58,代码来源:SymbolMap.cpp


示例10: Free

void wxListBox::Clear()
{
    Free();

    ListBox_ResetContent(GetHwnd());

    m_noItems = 0;
    SetHorizontalExtent();
}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:9,代码来源:listbox.cpp


示例11: Free

void wxListBox::DoClear()
{
    Free();

    ListBox_ResetContent(GetHwnd());

    m_noItems = 0;
    m_updateHorizontalExtent = true;

    UpdateOldSelections();
}
开发者ID:czxxjtu,项目名称:wxPython-1,代码行数:11,代码来源:listbox.cpp


示例12: AdminStartResponse

/*
 * AdminStartResponse:  We've just started a new response of the given type.
 */
void AdminStartResponse(int type)
{
   num_lines = 0;
   switch (type)
   {
   case ADMIN_OBJECT:
      WindowBeginUpdate(hObjectList);
      ListBox_ResetContent(hObjectList);
      break;
   }
}
开发者ID:Tatsujinichi,项目名称:Meridian59,代码行数:14,代码来源:adminprs.c


示例13: ListBox_ResetContent

void plResponderProc::LoadList()
{
    ListBox_ResetContent(fhList);

    for (int i = 0; i < fStatePB->Count(kStateCmdParams); i++)
    {
        const char* name = GetCommandName(i);
        ListBox_AddString(fhList, name);
    }

    ListBox_SetCurSel(fhList, -1);
}
开发者ID:cwalther,项目名称:Plasma-nobink-test,代码行数:12,代码来源:plResponderComponent.cpp


示例14: GetDlgItem

void ProjectConfigDialog::updatePackagePath(void)
{
    HWND listbox = GetDlgItem(m_hwndDialog, IDC_LIST_PACKAGE_SEARCH_PATHS);
    ListBox_ResetContent(listbox);

    const vector<string> paths = m_project.getPackagePathArray();
    for (vector<string>::const_iterator it = paths.begin(); it != paths.end(); ++it)
    {
        wstring item;
        item.assign(it->begin(), it->end());
        ListBox_AddString(listbox, item.c_str());
    }
}
开发者ID:AlexYanJianhua,项目名称:quick-cocos2d-x,代码行数:13,代码来源:ProjectConfigDialog.cpp


示例15: GetDlgItem

void plMtlEventProc::ILoadUser(HWND hWnd, IParamBlock2* pb)
{
    HWND hList = GetDlgItem(hWnd, IDC_EVENT_LIST);
    ListBox_ResetContent(hList);

    //
    // If we don't have a valid material, we should be disabled
    //
    Mtl* mtl = pb->GetMtl(kMtlMtl);
    if (!mtl)
    {
        EnableWindow(hList, FALSE);
        return;
    }
    else
        EnableWindow(hList, TRUE);

    //
    // Load the events
    //
    int idx;

    idx = ListBox_AddStringData(hList, "(Begin)", kAnimEventBegin);
    if (pb->GetInt(kMtlBegin))
        ListBox_SetSel(hList, TRUE, idx);

    idx = ListBox_AddStringData(hList, "(End)", kAnimEventEnd);
    if (pb->GetInt(kMtlEnd))
        ListBox_SetSel(hList, TRUE, idx);

    if (mtl)
    {
        ST::string mtlAnim = ST::string::from_utf8(pb->GetStr(kMtlAnim));

        // Get the shared animations for all the nodes this component is applied to
        plNotetrackAnim anim(mtl, nil);
        plAnimInfo info = anim.GetAnimInfo(mtlAnim);

        RemoveDeadMarkers(pb, kMtlMarkers, info);

        // Get all the markers in this animation
        ST::string marker;
        while (!(marker = info.GetNextMarkerName()).is_empty())
        {
            idx = ListBox_AddStringData(hList, marker.c_str(), kAnimEventMarker);

            if (IsMarkerSelected(pb, kMtlMarkers, marker))
                ListBox_SetSel(hList, TRUE, idx);
        }
    }
}
开发者ID:H-uru,项目名称:Plasma,代码行数:51,代码来源:plAnimEventComponent.cpp


示例16: GetControl

/*
** Updates the list of skins.
**
*/
void DialogAbout::TabSkins::UpdateSkinList()
{
	// Delete all entries
	HWND item = GetControl(Id_SkinsListBox);
	ListBox_ResetContent(item);

	// Add entries for each skin
	std::wstring::size_type maxLength = 0;
	const std::map<std::wstring, Skin*>& windows = GetRainmeter().GetAllSkins();
	std::map<std::wstring, Skin*>::const_iterator iter = windows.begin();
	bool found = false;
	for ( ; iter != windows.end(); ++iter)
	{
		const std::wstring& skinName = (*iter).first;
		std::wstring::size_type curLength = skinName.length();
		if (curLength > maxLength)
		{
			maxLength = curLength;
		}
		
		const WCHAR* name = skinName.c_str();
		int index = ListBox_AddString(item, name);
		if (!found && m_SkinWindow == (*iter).second)
		{
			found = true;
			m_SkinWindow = (*iter).second;
			ListBox_SetCurSel(item, index);
		}
	}

	ListBox_SetHorizontalExtent(item, 6 * maxLength);

	if (!found)
	{
		if (windows.empty())
		{
			m_SkinWindow = nullptr;
			item = GetControl(Id_ItemsListView);
			ListView_DeleteAllItems(item);
		}
		else
		{
			// Default to first skin
			m_SkinWindow = (*windows.begin()).second;
			ListBox_SetCurSel(item, 0);
			UpdateMeasureList(m_SkinWindow);
		}
	}
}
开发者ID:AlonTzarafi,项目名称:rainmeter,代码行数:53,代码来源:DialogAbout.cpp


示例17: MailGetMessageList

/*
 * MailGetMessageList:  Load filenames of all mail messages, and store in a list box.
 */
void MailGetMessageList(void)
{
   HANDLE hFindFile;
   WIN32_FIND_DATA file_info;
   char path[MAX_PATH + FILENAME_MAX];
   int index, msgnum;
   MailHeader header;

   /* Load messages in, in sorted order */
   if (hMsgList == NULL)
      hMsgList = CreateWindow("listbox", "", WS_CHILD | LBS_SORT, 0, 0, 0, 0, 
                              cinfo->hMain, NULL, hInst, NULL);
   else ListBox_ResetContent(hMsgList);
   
   sprintf(path,"%s\\%s", MAIL_DIR, MAIL_SPEC);
   hFindFile = FindFirstFile(path, &file_info);
   if (hFindFile == INVALID_HANDLE_VALUE)
      return;
   
   while (1)
   {
      // Skip directories
      if (!(file_info.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY))
      {
         /* Set itemdata of each entry to message header info */
         msgnum = atoi(file_info.cFileName);
         sprintf(path, "%s\\%s", MAIL_DIR, file_info.cFileName);
         
         index = ListBox_AddString(hMsgList, path);
         
         ListBox_SetItemData(hMsgList, index, msgnum);
      }
      
      if (FindNextFile(hFindFile, &file_info) == FALSE)
         break;
   }
   FindClose(hFindFile);
   
   // Add messages to mail dialog
   for (index = 0; index < ListBox_GetCount(hMsgList); index++)
   {
      msgnum = ListBox_GetItemData(hMsgList, index);
      ListBox_GetText(hMsgList, index, path);
      
      // Send summary string to mail dialog
      if (hReadMailDlg != NULL && MailParseMessageHeader(msgnum, path, &header))
         SendMessage(hReadMailDlg, BK_NEWMAIL, msgnum, (LPARAM) &header); 
   }
}
开发者ID:MorbusM59,项目名称:Meridian59,代码行数:52,代码来源:mailfile.c


示例18: GetDlgItem

/*
** Updates the list of skins.
**
*/
void CDialogAbout::CTabSkins::UpdateSkinList()
{
	// Delete all entries
	HWND item = GetDlgItem(m_Window, IDC_ABOUTSKINS_ITEMS_LISTBOX);
	ListBox_ResetContent(item);

	// Add entries for each skin
	std::wstring::size_type maxLength = 0;
	const std::map<std::wstring, CMeterWindow*>& windows = Rainmeter->GetAllMeterWindows();
	std::map<std::wstring, CMeterWindow*>::const_iterator iter = windows.begin();
	bool found = false;
	for ( ; iter != windows.end(); ++iter)
	{
		const std::wstring& skinName = (*iter).first;
		std::wstring::size_type curLength = skinName.length();
		if (curLength > maxLength)
		{
			maxLength = curLength;
		}
		
		const WCHAR* name = skinName.c_str();
		int index = ListBox_AddString(item, name);
		if (!found && m_SkinWindow == (*iter).second)
		{
			found = true;
			m_SkinWindow = (*iter).second;
			ListBox_SetCurSel(item, index);
		}
	}

	ListBox_SetHorizontalExtent(item, 6 * maxLength);

	if (!found)
	{
		if (windows.empty())
		{
			m_SkinWindow = NULL;
			item = GetDlgItem(m_Window, IDC_ABOUTSKINS_ITEMS_LISTVIEW);
			ListView_DeleteAllItems(item);
		}
		else
		{
			// Default to first skin
			m_SkinWindow = (*windows.begin()).second;
			ListBox_SetCurSel(item, 0);
			UpdateMeasureList(m_SkinWindow);
		}
	}
}
开发者ID:testaccountx,项目名称:testrepo,代码行数:53,代码来源:DialogAbout.cpp


示例19: SendMessage

void UninstallerShortcutsListbox::updateListbox() const
{
	SendMessage(m_listbox, WM_SETREDRAW, FALSE, 0);
	ListBox_ResetContent(m_listbox);
	size_t maxWidth = 0;
	for (const wstring& file : m_files)
	{
		ListBox_AddString(m_listbox, file.data());
		maxWidth = __max(maxWidth, file.size());
	}
	ListBox_SetHorizontalExtent(m_listbox, getTextWidth(m_dialogbox, maxWidth));
	SendMessage(m_listbox, WM_SETREDRAW, TRUE, 0);
	RedrawWindow(m_listbox, NULL, NULL,
		RDW_ERASE | RDW_FRAME | RDW_INVALIDATE | RDW_ALLCHILDREN);
}
开发者ID:troiganto,项目名称:autosave,代码行数:15,代码来源:UninstallerShortcutsListbox.cpp


示例20: ListBox_ResetContent

void SymbolMap::FillListBoxBLinks(HWND listbox, int num)
{
    ListBox_ResetContent(listbox);

    int style = GetWindowLong(listbox,GWL_STYLE);

    MapEntry &e = entries[num];
#ifdef BWLINKS
    for (int i=0; i<e.backwardLinks.size(); i++)
    {
        u32 addr = e.backwardLinks[i];
        int index = ListBox_AddString(listbox,SymbolMap::GetSymbolName(SymbolMap::GetSymbolNum(addr)));
        ListBox_SetItemData(listbox,index,addr);
    }
#endif
}
开发者ID:HomerSp,项目名称:ppsspp,代码行数:16,代码来源:SymbolMap.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ ListBox_SetCurSel函数代码示例发布时间:2022-05-30
下一篇:
C++ ListBox_GetItemData函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap