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

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

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

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

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

示例1: ConfigPageProc

static INT_PTR CALLBACK ConfigPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam){    switch (uMsg)    {    case WM_COMMAND:        switch (LOWORD(wParam))        {        case IDCFULLSCREEN:            settings.fullscreen = !settings.fullscreen;            PopulateForm();            return TRUE;        case IDC2DVMODE:            if (HIWORD(wParam) == CBN_SELCHANGE)            {                int32_t i;                i = ComboBox_GetCurSel((HWND)lParam);                if (i != CB_ERR) i = ComboBox_GetItemData((HWND)lParam, i);                if (i != CB_ERR)                {                    settings.xdim2d = validmode[i].xdim;                    settings.ydim2d = validmode[i].ydim;                }            }            return TRUE;        case IDC3DVMODE:            if (HIWORD(wParam) == CBN_SELCHANGE)            {                int32_t i;                i = ComboBox_GetCurSel((HWND)lParam);                if (i != CB_ERR) i = ComboBox_GetItemData((HWND)lParam, i);                if (i != CB_ERR)                {                    settings.xdim3d = validmode[i].xdim;                    settings.ydim3d = validmode[i].ydim;                    settings.bpp3d  = validmode[i].bpp;                }            }            return TRUE;        case IDCALWAYSSHOW:            settings.forcesetup = IsDlgButtonChecked(hwndDlg, IDCALWAYSSHOW) == BST_CHECKED;            return TRUE;        default:            break;        }        break;    default:        break;    }    return FALSE;}
开发者ID:Daedolon,项目名称:erampage,代码行数:50,


示例2: ConfigPageProc

static INT_PTR CALLBACK ConfigPageProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam){	switch (uMsg) {		case WM_COMMAND:			switch (LOWORD(wParam)) {				case IDCFULLSCREEN:					settings.fullscreen = !settings.fullscreen;					PopulateForm(1<<TAB_CONFIG);					return TRUE;				case IDCVMODE:					if (HIWORD(wParam) == CBN_SELCHANGE) {						int i;						i = ComboBox_GetCurSel((HWND)lParam);						if (i != CB_ERR) i = ComboBox_GetItemData((HWND)lParam, i);						if (i != CB_ERR) {							settings.xdim = validmode[i].xdim;							settings.ydim = validmode[i].ydim;							settings.bpp  = validmode[i].bpp;						}					}					return TRUE;				case IDCSOUNDQUAL:				    if (HIWORD(wParam) == CBN_SELCHANGE) {                        int i;                        i = ComboBox_GetCurSel((HWND)lParam);                        if (i != CB_ERR) i = ComboBox_GetItemData((HWND)lParam, i);                        if (i != CB_ERR) {                            settings.samplerate = soundQualities[i].frequency;                            settings.bitspersample = soundQualities[i].samplesize;                            settings.channels = soundQualities[i].channels;                        }				    }				    return TRUE;				case IDCALWAYSSHOW:					settings.forcesetup = IsDlgButtonChecked(hwndDlg, IDCALWAYSSHOW) == BST_CHECKED;					return TRUE;				case IDCINPUTMOUSE:					settings.usemouse = IsDlgButtonChecked(hwndDlg, IDCINPUTMOUSE) == BST_CHECKED;					return TRUE;				case IDCINPUTJOY:					settings.usejoy = IsDlgButtonChecked(hwndDlg, IDCINPUTJOY) == BST_CHECKED;					return TRUE;				default: break;			}			break;		default: break;	}	return FALSE;}
开发者ID:TheCycoONE,项目名称:jfsw,代码行数:49,


示例3: OnOk

void OnOk(HWND hW) {	int i = ComboBox_GetCurSel(GetDlgItem(hW, IDC_ETHDEV));	if (i == -1)	{		//adapter not selected		if (Button_GetCheck(GetDlgItem(hW, IDC_ETHENABLED)))		{			//Trying to use an ethernet without			//selected adapter, we can't have that			SysMessage("Please select an ethernet adapter");			return;		}		else 		{			//user not planning on using			//ethernet anyway			strcpy(config.Eth, ETH_DEF);		}	}	else 	{		//adapter is selected		char* ptr = (char*)ComboBox_GetItemData(GetDlgItem(hW, IDC_ETHDEV), i);		strcpy(config.Eth, ptr);	}		Edit_GetText(GetDlgItem(hW, IDC_HDDFILE), config.Hdd, 256);	config.ethEnable = Button_GetCheck(GetDlgItem(hW, IDC_ETHENABLED));	config.hddEnable = Button_GetCheck(GetDlgItem(hW, IDC_HDDENABLED));	SaveConf();	EndDialog(hW, TRUE);}
开发者ID:Aced14,项目名称:pcsx2,代码行数:35,


示例4: GetDlgItem

// Set the selected filter to be displayed in the filter Combo Boxvoid SppTabFltr::SelFilter(int FilterId){	// Get the index of the filter (By ID)	int i=0, data;	HWND hCombo = GetDlgItem(m_hDlg,  IDC_COMBO_FILTERS);	HWND hFilterCB		= GetDlgItem(m_hDlg,  IDC_CH_FILTER);	while ((data = (int)ComboBox_GetItemData(hCombo, i)) != CB_ERR)	{		if (data == FilterId)		{			// Select			int res = ComboBox_SetCurSel(hCombo, i);			// Checks the checkbox			EnableWindow(hFilterCB, true);			Button_SetCheck(hFilterCB, BST_CHECKED);			ShowChannelArea( m_hDlg, true);						// Inform Parent			ComboBox_GetLBText (hCombo,i,m_FilterName);			m_FilterActive = true;			break;		};		i++;	};	SentFilterInfo2Parent();}
开发者ID:shauleiz,项目名称:SmartPropoPlus,代码行数:29,


示例5: ComboBox_GetSelectedItemData

LRESULT ComboBox_GetSelectedItemData(HWND hWnd){	int selIdx = ComboBox_GetCurSel(hWnd);	if (selIdx == LB_ERR)		return LB_ERR;	return ComboBox_GetItemData(hWnd, selIdx);}
开发者ID:beru,项目名称:pngquant_gui,代码行数:7,


示例6: Cleanup8021xControls

void Cleanup8021xControls(HWND hDlg, WLAN_CFG_PROPS *pWCP){    PWZC_EAP_CB_ITEMDATA pEapCbItemData;    HWND                 hwndCbEAPType = GetDlgItem(hDlg, IDC_WZC_COMBO_EAP_TYPE);    int                  i, cnTypes;        cnTypes = ComboBox_GetCount(hwndCbEAPType);    for ( i = 0; i < cnTypes; i++)     {        pEapCbItemData = (WZC_EAP_CB_ITEMDATA *)ComboBox_GetItemData(hwndCbEAPType, i);        if (pEapCbItemData && ((int)pEapCbItemData != CB_ERR))        {            if (pEapCbItemData->pbAuthData)             {                LocalFree(pEapCbItemData->pbAuthData);            }            LocalFree(pEapCbItemData);        }    }        if (pWCP->pEapExtInfo)     {        LocalFree(pWCP->pEapExtInfo);        pWCP->pEapExtInfo = NULL;    }}
开发者ID:NemProjects,项目名称:WLAN,代码行数:26,


示例7: atoi

	LRESULT CComWnd::on_device_change( WPARAM event, DEV_BROADCAST_HDR* pDBH )	{		if(event==DBT_DEVICEARRIVAL || event==DBT_DEVICEREMOVECOMPLETE){			if (pDBH->dbch_devicetype == DBT_DEVTYP_PORT){				DEV_BROADCAST_PORT* pPort = reinterpret_cast<DEV_BROADCAST_PORT*>(pDBH);				const char* name = &pPort->dbcp_name[0];				if (_strnicmp("COM", name, 3) == 0){					int comid = atoi(name + 3);					if (event == DBT_DEVICEARRIVAL){						update_status("串口设备 %s 已插入!", name);						if (!_comm.is_opened()){							com_update_comport_list_and_select_current();						}					}					else{						update_status("串口设备 %s 已移除!", name);						// 保持当前选中的设备依然为选中状态						if (!_comm.is_opened()){							com_update_comport_list_and_select_current();						}						else{ // 如果移除的是当前COM							int index = ComboBox_GetCurSel(_hCP);							c_comport* cp = index >= 0 ? (c_comport*)ComboBox_GetItemData(_hCP, index) : nullptr;							int comidcur = (int)cp > 0xFFFF ? cp->get_i() : 0;							if (comid == comidcur){								com_openclose();							}						}					}				}			}		}		return 0;	}
开发者ID:faver2014,项目名称:common,代码行数:35,


示例8: Button_SetCheck

void GroupGeneralPage::loadPage(Group *pGroup){	Button_SetCheck(m_hCheckAdmin,pGroup->isAdmin());	Button_SetCheck(m_hCheckBrowser,pGroup->isBrowser());	Button_SetCheck(m_hCheckBypassLimits,pGroup->isBypassLimits());	Button_SetCheck(m_hCheckMaxSessions,pGroup->isMaxSessionsEnabled());	SetWindowText(m_hEditMaxSessions,		Util::ConvertUtil::toString(pGroup->getMaxSessions()).c_str());	Button_SetCheck(m_hCheckMaxSessionsPerIp,pGroup->isMaxSessionsPerIpEnabled());	SetWindowText(m_hEditMaxSessionsPerIp,		Util::ConvertUtil::toString(pGroup->getMaxSessionsPerIp()).c_str());	Button_SetCheck(m_hCheckMaxDownload,pGroup->isMaxDownloadEnabled());	SetWindowText(m_hEditMaxDownload,		Util::ConvertUtil::toString(pGroup->getMaxDownloadBytes()/1024/1024).c_str());	ComboBox_SetCurSel(m_hComboMaxDownloadPeriod,0);	int maxDownloadPeriodCount = ComboBox_GetCount(m_hComboMaxDownloadPeriod);	for ( int i=0; i<maxDownloadPeriodCount; i++ ) {		if ( ComboBox_GetItemData(m_hComboMaxDownloadPeriod,i)==pGroup->getMaxDownloadPeriod() ) {			ComboBox_SetCurSel(m_hComboMaxDownloadPeriod,i);			break;		}	}	Button_SetCheck(m_hCheckMaxBandwidth,pGroup->isMaxBandwidthEnabled());	SetWindowText(m_hEditMaxBandwidth,		Util::ConvertUtil::toString(pGroup->getMaxBandwidth()).c_str());	updateDialog();}
开发者ID:CIHANGIRCAN,项目名称:vibestreamer,代码行数:33,


示例9: ComboBox_GetCurSel

char *ModuleConfigControl::GetPszValue(){    int selected = ComboBox_GetCurSel( combo );    if( selected != -1 )        return (char *)ComboBox_GetItemData( combo, selected );    else return NULL;}
开发者ID:FLYKingdom,项目名称:vlc,代码行数:7,


示例10: memset

void GroupGeneralPage::savePage(Group *pGroup){	char sz[255];	pGroup->setAdmin(Button_GetCheck(m_hCheckAdmin));	pGroup->setBrowser(Button_GetCheck(m_hCheckBrowser));	pGroup->setBypassLimits(Button_GetCheck(m_hCheckBypassLimits));	pGroup->setMaxSessionsEnabled(Button_GetCheck(m_hCheckMaxSessions));	memset(sz,0,sizeof(sz));	GetWindowText(m_hEditMaxSessions,sz,sizeof(sz));	pGroup->setMaxSessions(Util::ConvertUtil::toInt(sz));	pGroup->setMaxSessionsPerIpEnabled(Button_GetCheck(m_hCheckMaxSessionsPerIp));	memset(sz,0,sizeof(sz));	GetWindowText(m_hEditMaxSessionsPerIp,sz,sizeof(sz));	pGroup->setMaxSessionsPerIp(Util::ConvertUtil::toInt(sz));	pGroup->setMaxDownloadEnabled(Button_GetCheck(m_hCheckMaxDownload));	memset(sz,0,sizeof(sz));	GetWindowText(m_hEditMaxDownload,sz,sizeof(sz));	uint64_t maxDownloadBytes = Util::ConvertUtil::toUnsignedInt64(sz)*1024*1024;	pGroup->setMaxDownloadBytes(maxDownloadBytes);	int index = ComboBox_GetCurSel(m_hComboMaxDownloadPeriod);	if ( index>-1 ) {		pGroup->setMaxDownloadPeriod(ComboBox_GetItemData(m_hComboMaxDownloadPeriod,index));	}	pGroup->setMaxBandwidthEnabled(Button_GetCheck(m_hCheckMaxBandwidth));	memset(sz,0,sizeof(sz));	GetWindowText(m_hEditMaxBandwidth,sz,sizeof(sz));	pGroup->setMaxBandwidth(Util::ConvertUtil::toInt(sz));}
开发者ID:CIHANGIRCAN,项目名称:vibestreamer,代码行数:35,


示例11: GetDlgItemTextW

INT_PTR MainDlg::OnClose( HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam ){    ConfigMgr::ConfigData cfg;    wchar_t imagePath[MAX_PATH];    wchar_t initRoutine[MAX_PATH];    wchar_t initArgs[MAX_PATH];    wchar_t procCmdLine[MAX_PATH];    cfg.newProcess = _newProcess;    cfg.procName = _procPath;    GetDlgItemTextW( _hMainDlg, IDC_IMAGE_PATH,  imagePath, ARRAYSIZE( imagePath ) );    GetDlgItemTextW( _hMainDlg, IDC_CMDLINE,     procCmdLine, ARRAYSIZE( procCmdLine ) );    GetDlgItemTextW( _hMainDlg, IDC_ARGUMENT,    initArgs, ARRAYSIZE( initArgs ) );    GetDlgItemTextW( _hMainDlg, IDC_INIT_EXPORT, initRoutine, ARRAYSIZE( initRoutine ) );    HWND hCombo = GetDlgItem( _hMainDlg, IDC_THREADS );    DWORD thdId = (DWORD)ComboBox_GetItemData( hCombo, ComboBox_GetCurSel( hCombo ) );    cfg.imagePath   = imagePath;    cfg.procCmdLine = procCmdLine;    cfg.initRoutine = initRoutine;    cfg.initArgs    = initArgs;    cfg.imagePath   = imagePath;    cfg.manualMap = (ComboBox_GetCurSel( GetDlgItem( hDlg, IDC_OP_TYPE ) ) == 1);    cfg.threadHijack = (thdId != 0 && thdId != 0xFFFFFFFF);    cfg.manualMapFlags = MmapFlags();    cfg.unlink = Button_GetCheck( GetDlgItem( _hMainDlg, IDC_UNLINK ) ) == 0 ? false : true;    _config.Save( cfg );    EndDialog( hDlg, 0 );    return (INT_PTR)TRUE;}
开发者ID:hezzrrah,项目名称:Xenos,代码行数:35,


示例12: GetDlgItem

char *GetSelBIOS(HWND hW,int id) {	HWND hWC = GetDlgItem(hW,id);	int iSel;	iSel = ComboBox_GetCurSel(hWC);	if (iSel<0) return NULL;	return (char *)ComboBox_GetItemData(hWC, iSel);}
开发者ID:Nitrofski,项目名称:psxjin,代码行数:7,


示例13: GetDlgItem

// Returns the data for the selected entry in the combo box.void *DeviceEnumeration::ComboBoxSelected( HWND dialog, int id ){	HWND control = GetDlgItem( dialog, id );	int index = ComboBox_GetCurSel( control );	if( index < 0 )		return NULL;	return (void*)ComboBox_GetItemData( control, index );}
开发者ID:zonedoutspace,项目名称:evamp,代码行数:9,


示例14: ComboBox_FindItemByData

	int ComboBox_FindItemByData(HWND wnd, t_size id)	{		t_size i, count = ComboBox_GetCount(wnd);		for (i = 0; i < count; i++)			if (ComboBox_GetItemData(wnd, i) == id)				return i;		return -1;	}
开发者ID:wyrover,项目名称:ui_helpers,代码行数:8,


示例15: GetDlgItem

//-----------------------------------------------------------------------------// Name: ComboBoxSelected// Desc: Returns the data for the selected entry in the combo box.//-----------------------------------------------------------------------------void* CD3DSettingsDialog::ComboBoxSelected( int id ){    HWND hwndCtrl = GetDlgItem( m_hDlg, id );    int index = ComboBox_GetCurSel( hwndCtrl );    if( index < 0 )        return NULL;    return (void*)ComboBox_GetItemData( hwndCtrl, index );}
开发者ID:xahgo,项目名称:tama,代码行数:12,


示例16: SetGPUKey

void SetGPUKey(HWND hWC,char szKey){ int i,iCnt=ComboBox_GetCount(hWC); for(i=0;i<iCnt;i++)  {   if(ComboBox_GetItemData(hWC,i)==szKey) break;  } if(i!=iCnt) ComboBox_SetCurSel(hWC,i);}                                 
开发者ID:Asmodean-,项目名称:PCSXR,代码行数:9,


示例17: OnDel

//================================================================================================//-----------------------//-----------------------------+++--> Delete One of the Configured Timers:void OnDel(HWND hDlg)   //------------------------------------------------------------------+++-->{	HWND timer_cb = GetDlgItem(hDlg, IDC_TIMERNAME);	char name[TNY_BUFF];	char subkey[TNY_BUFF];	size_t offset;	int idx, idx2, count;		offset=wsprintf(subkey, "%s//Timer", g_szTimersSubKey);	ComboBox_GetText(timer_cb, name, sizeof(name));	count = ComboBox_GetCount(timer_cb) -1;	for(idx=0; idx<count; ++idx) {		timeropt_t* pts = (timeropt_t*)ComboBox_GetItemData(timer_cb, idx);		if(!strcmp(name,pts->name)){			break;		}	}	if(idx==count) return;	StopTimer(idx);		for(idx2=idx+1; idx2<count; ++idx2) {		timeropt_t* pts;		pts = (timeropt_t*)ComboBox_GetItemData(timer_cb, idx2);		wsprintf(subkey+offset, "%d", idx2); // we're 1 behind, as needed		api.SetStr(subkey, "Name",		pts->name);		api.SetInt(subkey, "Seconds",	pts->second);		api.SetInt(subkey, "Minutes",	pts->minute);		api.SetInt(subkey, "Hours",	pts->hour);		api.SetInt(subkey, "Days",	pts->day);		api.SetStr(subkey, "File",		pts->fname);		api.SetInt(subkey, "Repeat",	pts->bRepeat);		api.SetInt(subkey, "Blink",	pts->bBlink);		api.SetInt(subkey, "Active",	pts->bActive);	}	wsprintf(subkey+offset, "%d", count);	api.DelKey(subkey);	api.SetInt(g_szTimersSubKey, "NumberOfTimers", --count);	free((void*)ComboBox_GetItemData(timer_cb,idx));	ComboBox_DeleteString(timer_cb,idx);		ComboBox_SetCurSel(timer_cb, (idx>0)?(idx-1):idx);	OnTimerName(hDlg);	PostMessage(hDlg, WM_NEXTDLGCTL, 1, FALSE);}
开发者ID:andrejtm,项目名称:T-Clock,代码行数:46,


示例18: ComboBox_SelectItemData

//---------------------------------------------------------------------------//Workaround for MS bug ComboBox_SelectItemDataint ComboBox_SelectItemData(HWND hwndCtl, int indexStart, LPARAM data) {	int i = 0;	for ( i ; i < ComboBox_GetCount(hwndCtl); i++) {		if(data == ComboBox_GetItemData(hwndCtl, i)) {			ComboBox_SetCurSel (hwndCtl,i);			return i;		}	}	return CB_ERR;}
开发者ID:0xmono,项目名称:miranda-ng,代码行数:12,


示例19: FreeGui

void FreeGui(HWND hW){ int i,iCnt; HWND hWC=GetDlgItem(hW,IDC_DEVICE); iCnt=ComboBox_GetCount(hWC); for(i=0;i<iCnt;i++)  {   free((GUID *)ComboBox_GetItemData(hWC,i));  }}
开发者ID:Asmodean-,项目名称:PCSXR,代码行数:10,


示例20: ComboBox_GetCurSel

void CEpgDataCap_BonDlg::OnCbnSelchangeComboService(){	// TODO: ここにコントロ
C++ ComboBox_ResetContent函数代码示例
C++ ComboBox_GetCurSel函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。