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


C++ ListBox_ResetContent函数代码示例

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


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


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