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

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

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

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

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

示例1: File_OFNHookProc

UINT CALLBACK File_OFNHookProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam){    static LPINT lpnLineFeedType;    switch (uMsg)    {    case WM_INITDIALOG:    {        OPENFILENAME *lpofn = (OPENFILENAME *)lParam;        HWND hwndCbo = GetDlgItem(hwnd, IDC_COMBO_LINEFEED);        int nSelectedIndex = 0;        int i;        struct tagLINEFEEDCOMBOITEM        {            TCHAR   szText[32];            int     nType;        } ts[4] =        {            { _T("Automatic"), CRLF_STYLE_AUTOMATIC },            { _T("DOS"), CRLF_STYLE_DOS },            { _T("UNiX"), CRLF_STYLE_UNIX },            { _T("Mac"), CRLF_STYLE_MAC }        };        // Set a pointer to the passed on int)        lpnLineFeedType = (int *)lpofn->lCustData;        for (i = 0; i < DIMOF(ts); i++)        {            int nIndex = ComboBox_AddString(hwndCbo, ts[i].szText);            if (nIndex != CB_ERR)            {                if (ts[i].nType == *lpnLineFeedType)                    nSelectedIndex = nIndex;                ComboBox_SetItemData(hwndCbo, nIndex, ts[i].nType);            }        }        ComboBox_SetCurSel(hwndCbo, nSelectedIndex);    }    return (FALSE);    case WM_NOTIFY:    {        LPNMHDR lpnmh = (LPNMHDR)lParam;        switch (lpnmh->code)        {        case CDN_SHAREVIOLATION:            SetWindowLong(hwnd, DWL_MSGRESULT, TRUE);        return (TRUE);        case CDN_FILEOK:        {            HWND hwndCbo = GetDlgItem(hwnd, IDC_COMBO_LINEFEED);            int nIndex = ComboBox_GetCurSel(hwndCbo);            if (nIndex != CB_ERR)                *lpnLineFeedType = (int)ComboBox_GetItemData(hwndCbo, nIndex);            else                *lpnLineFeedType = CRLF_STYLE_AUTOMATIC;            SetWindowLong(hwnd, DWL_MSGRESULT, TRUE);        }        return (TRUE);        }    }    break;    }    return (FALSE);}
开发者ID:now,项目名称:slackedit,代码行数:71,


示例2: switch

//.........这里部分代码省略.........			case ID_DEBUG_STEPOUT:				if (GetFocus() == GetDlgItem(m_hDlg,IDC_DISASMVIEW)) stepOut();				break;			case IDC_SHOWVFPU:				vfpudlg->Show(true);				break;			case IDC_FUNCTIONLIST: 				switch (HIWORD(wParam))				{				case CBN_DBLCLK:					{						HWND lb = GetDlgItem(m_hDlg,LOWORD(wParam));						int n = ListBox_GetCurSel(lb);						if (n!=-1)						{							unsigned int addr = (unsigned int)ListBox_GetItemData(lb,n);							ptr->gotoAddr(addr);							SetFocus(GetDlgItem(m_hDlg, IDC_DISASMVIEW));						}					}					break;				};				break;			case IDC_GOTOINT:				switch (HIWORD(wParam))				{				case LBN_SELCHANGE:					{						HWND lb =GetDlgItem(m_hDlg,LOWORD(wParam));						int n = ComboBox_GetCurSel(lb);						unsigned int addr = (unsigned int)ComboBox_GetItemData(lb,n);						if (addr != 0xFFFFFFFF)						{							ptr->gotoAddr(addr);							SetFocus(GetDlgItem(m_hDlg, IDC_DISASMVIEW));						}					}					break;				};				break;			case IDC_STOPGO:				{					if (!Core_IsStepping())		// stop					{						ptr->setDontRedraw(false);						SetDebugMode(true);						Core_EnableStepping(true);						_dbg_update_();						Sleep(1); //let cpu catch up						ptr->gotoPC();						UpdateDialog();						vfpudlg->Update();					} else {					// go						lastTicks = CoreTiming::GetTicks();						// If the current PC is on a breakpoint, the user doesn't want to do nothing.						CBreakPoints::SetSkipFirst(currentMIPS->pc);						SetDebugMode(false);						Core_EnableStepping(false);					}
开发者ID:MoonSnidget,项目名称:ppsspp,代码行数:67,


示例3: UpdateDialogControls

//************************************************************************************// UpdateDialogControls()// Builds the list of devices and modes for the combo boxes in the device// select dialog box.//************************************************************************************static VOID UpdateDialogControls(HWND hDlg, D3DEnum_DeviceInfo * pCurrentDevice,                                 DWORD dwCurrentMode, BOOL bWindowed,                                 BOOL bStereo){	// Get access to the enumerated device list	D3DEnum_DeviceInfo * pDeviceList;	DWORD               dwNumDevices;	D3DEnum_GetDevices(&pDeviceList, &dwNumDevices);	// Access to UI controls	HWND hwndDevice         = GetDlgItem(hDlg, IDC_DEVICE_COMBO);	HWND hwndMode           = GetDlgItem(hDlg, IDC_MODE_COMBO);	HWND hwndWindowed       = GetDlgItem(hDlg, IDC_WINDOWED_CHECKBOX);	HWND hwndStereo         = GetDlgItem(hDlg, IDC_STEREO_CHECKBOX);	HWND hwndFullscreenText = GetDlgItem(hDlg, IDC_FULLSCREEN_TEXT);	// Reset the content in each of the combo boxes	ComboBox_ResetContent(hwndDevice);	ComboBox_ResetContent(hwndMode);	// Don't let non-GDI devices be windowed	if (FALSE == pCurrentDevice->bDesktopCompatible)		bWindowed = FALSE;	// Add a list of devices to the device combo box	for (DWORD device = 0; device < dwNumDevices; device++)	{		D3DEnum_DeviceInfo * pDevice = &pDeviceList[device];		// Add device name to the combo box		DWORD dwItem = ComboBox_AddString(hwndDevice, pDevice->strDesc);		// Set the remaining UI states for the current device		if (pDevice == pCurrentDevice)		{			// Set the combobox selection on the current device			ComboBox_SetCurSel(hwndDevice, dwItem);			// Enable/set the fullscreen checkbox, as appropriate			if (hwndWindowed)			{				EnableWindow(hwndWindowed, pDevice->bDesktopCompatible);				Button_SetCheck(hwndWindowed, bWindowed);			}			// Enable/set the stereo checkbox, as appropriate			if (hwndStereo)			{				EnableWindow(hwndStereo, pDevice->bStereoCompatible && !bWindowed);				Button_SetCheck(hwndStereo, bStereo);			}			// Enable/set the fullscreen modes combo, as appropriate			EnableWindow(hwndMode, !bWindowed);			EnableWindow(hwndFullscreenText, !bWindowed);			// Build the list of fullscreen modes			for (DWORD mode = 0; mode < pDevice->dwNumModes; mode++)			{				DDSURFACEDESC2 * pddsdMode = &pDevice->pddsdModes[mode];				// Skip non-stereo modes, if the device is in stereo mode				if (0 == (pddsdMode->ddsCaps.dwCaps2 & DDSCAPS2_STEREOSURFACELEFT))					if (bStereo)						continue;				TCHAR strMode[80];				wsprintf(strMode, _T("%ld x %ld x %ld"),				         pddsdMode->dwWidth, pddsdMode->dwHeight,				         pddsdMode->ddpfPixelFormat.dwRGBBitCount);				// Add mode desc to the combo box				DWORD dwItem = ComboBox_AddString(hwndMode, strMode);				// Set the item data to identify this mode				ComboBox_SetItemData(hwndMode, dwItem, mode);				// Set the combobox selection on the current mode				if (mode == dwCurrentMode)					ComboBox_SetCurSel(hwndMode, dwItem);				// Since not all modes support stereo, select a default mode in				// case none was chosen yet.				if (bStereo && (CB_ERR == ComboBox_GetCurSel(hwndMode)))					ComboBox_SetCurSel(hwndMode, dwItem);			}		}	}}
开发者ID:okready,项目名称:ArxFatalis,代码行数:94,


示例4: InputPageDialogProc

INT_PTR CALLBACK InputPageDialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {  // Mouse actions  struct {    int control;    wchar_t *option;  } mouse_buttons[] = {    { IDC_LMB, L"LMB" },    { IDC_MMB, L"MMB" },    { IDC_RMB, L"RMB" },    { IDC_MB4, L"MB4" },    { IDC_MB5, L"MB5" },  };  struct action {    wchar_t *action;    wchar_t *l10n;  };  struct action mouse_actions[] = {    { L"Move",        l10n->input_actions_move },    { L"Resize",      l10n->input_actions_resize },    { L"Close",       l10n->input_actions_close },    { L"Minimize",    l10n->input_actions_minimize },    { L"Lower",       l10n->input_actions_lower },    { L"AlwaysOnTop", l10n->input_actions_alwaysontop },    { L"Center",      l10n->input_actions_center },    { L"Nothing",     l10n->input_actions_nothing },  };  // Scroll  struct action scroll_actions[] = {    { L"AltTab",       l10n->input_actions_alttab },    { L"Volume",       l10n->input_actions_volume },    { L"Transparency", l10n->input_actions_transparency },    { L"Lower",        l10n->input_actions_lower },    { L"Nothing",      l10n->input_actions_nothing },  };  // Hotkeys  struct {    int control;    int vkey;  } hotkeys[] = {    { IDC_LEFTALT,     VK_LMENU },    { IDC_RIGHTALT,    VK_RMENU },    { IDC_LEFTWINKEY,  VK_LWIN },    { IDC_RIGHTWINKEY, VK_RWIN },    { IDC_LEFTCTRL,    VK_LCONTROL },    { IDC_RIGHTCTRL,   VK_RCONTROL },  };  if (msg == WM_INITDIALOG) {    wchar_t txt[50];    int i;    // Hotkeys    unsigned int temp;    int numread;    GetPrivateProfileString(L"Input", L"Hotkeys", L"A4 A5", txt, ARRAY_SIZE(txt), inipath);    wchar_t *pos = txt;    while (*pos != '/0' && swscanf(pos,L"%02X%n",&temp,&numread) != EOF) {      pos += numread;      // What key was that?      for (i=0; i < ARRAY_SIZE(hotkeys); i++) {        if (temp == hotkeys[i].vkey) {          Button_SetCheck(GetDlgItem(hwnd,hotkeys[i].control), BST_CHECKED);          break;        }      }    }  }  else if (msg == WM_COMMAND) {    int id = LOWORD(wParam);    int event = HIWORD(wParam);    wchar_t txt[50] = L"";    int i;    if (event == CBN_SELCHANGE) {      HWND control = GetDlgItem(hwnd, id);      // Mouse actions      for (i=0; i < ARRAY_SIZE(mouse_buttons); i++) {        if (id == mouse_buttons[i].control) {          int j = ComboBox_GetCurSel(control);          WritePrivateProfileString(L"Input", mouse_buttons[i].option, mouse_actions[j].action, inipath);          break;        }      }      // Scroll      if (id == IDC_SCROLL) {        int j = ComboBox_GetCurSel(control);        if (!vista && !wcscmp(scroll_actions[j].action,L"Volume")) {          MessageBox(NULL, L"The Volume action only works on Vista and later. Sorry!", APP_NAME, MB_ICONINFORMATION|MB_OK|MB_TASKMODAL);          GetPrivateProfileString(L"Input", L"Scroll", L"Nothing", txt, ARRAY_SIZE(txt), inipath);          for (i=0; wcscmp(txt,scroll_actions[i].action) && i < ARRAY_SIZE(scroll_actions)-1; i++) {}          ComboBox_SetCurSel(control, i);        }        else {          WritePrivateProfileString(L"Input", L"Scroll", scroll_actions[j].action, inipath);        }      }    }    else if (LOWORD(wParam) == IDC_LOWERWITHMMB) {      int val = Button_GetCheck(GetDlgItem(hwnd, IDC_LOWERWITHMMB));      WritePrivateProfileString(L"Input", L"LowerWithMMB", _itow(val,txt,10), inipath);//.........这里部分代码省略.........
开发者ID:alex310110,项目名称:altdrag,代码行数:101,


示例5: PhpOptionsGeneralDlgProc

//.........这里部分代码省略.........                    SendMessage(GetDlgItem(hwndDlg, IDC_FONT), WM_SETFONT, (WPARAM)CurrentFontInstance, TRUE);            }        }        break;    case WM_DESTROY:        {            if (CurrentFontInstance)                DeleteObject(CurrentFontInstance);            PhClearReference(&NewFontSelection);        }        break;    case WM_COMMAND:        {            switch (LOWORD(wParam))            {            case IDC_STARTATLOGON:                {                    EnableWindow(GetDlgItem(hwndDlg, IDC_STARTHIDDEN), Button_GetCheck(GetDlgItem(hwndDlg, IDC_STARTATLOGON)) == BST_CHECKED);                }                break;            case IDC_FONT:                {                    LOGFONT font;                    CHOOSEFONT chooseFont;                    if (!GetCurrentFont(&font))                    {                        // Can't get LOGFONT from the existing setting, probably                        // because the user hasn't ever chosen a font before.                        // Set the font to something familiar.                        GetObject((HFONT)SendMessage(PhMainWndHandle, WM_PH_GET_FONT, 0, 0), sizeof(LOGFONT), &font);                    }                    memset(&chooseFont, 0, sizeof(CHOOSEFONT));                    chooseFont.lStructSize = sizeof(CHOOSEFONT);                    chooseFont.hwndOwner = hwndDlg;                    chooseFont.lpLogFont = &font;                    chooseFont.Flags = CF_FORCEFONTEXIST | CF_INITTOLOGFONTSTRUCT | CF_SCREENFONTS;                    if (ChooseFont(&chooseFont))                    {                        PhMoveReference(&NewFontSelection, PhBufferToHexString((PUCHAR)&font, sizeof(LOGFONT)));                        // Update the button's font.                        if (CurrentFontInstance)                            DeleteObject(CurrentFontInstance);                        CurrentFontInstance = CreateFontIndirect(&font);                        SendMessage(GetDlgItem(hwndDlg, IDC_FONT), WM_SETFONT, (WPARAM)CurrentFontInstance, TRUE);                    }                }                break;            }        }        break;    case WM_NOTIFY:        {            LPNMHDR header = (LPNMHDR)lParam;            switch (header->code)            {            case PSN_APPLY:                {                    BOOLEAN startAtLogon;                    BOOLEAN startHidden;                    PhSetStringSetting2(L"SearchEngine", &(PhaGetDlgItemText(hwndDlg, IDC_SEARCHENGINE)->sr));                    PhSetStringSetting2(L"ProgramInspectExecutables", &(PhaGetDlgItemText(hwndDlg, IDC_PEVIEWER)->sr));                    PhSetIntegerSetting(L"MaxSizeUnit", PhMaxSizeUnit = ComboBox_GetCurSel(GetDlgItem(hwndDlg, IDC_MAXSIZEUNIT)));                    PhSetIntegerSetting(L"IconProcesses", GetDlgItemInt(hwndDlg, IDC_ICONPROCESSES, NULL, FALSE));                    SetSettingForDlgItemCheck(hwndDlg, IDC_ALLOWONLYONEINSTANCE, L"AllowOnlyOneInstance");                    SetSettingForDlgItemCheck(hwndDlg, IDC_HIDEONCLOSE, L"HideOnClose");                    SetSettingForDlgItemCheck(hwndDlg, IDC_HIDEONMINIMIZE, L"HideOnMinimize");                    SetSettingForDlgItemCheck(hwndDlg, IDC_COLLAPSESERVICES, L"CollapseServicesOnStart");                    SetSettingForDlgItemCheck(hwndDlg, IDC_ICONSINGLECLICK, L"IconSingleClick");                    SetSettingForDlgItemCheck(hwndDlg, IDC_ICONTOGGLESVISIBILITY, L"IconTogglesVisibility");                    SetSettingForDlgItemCheckRestartRequired(hwndDlg, IDC_ENABLEPLUGINS, L"EnablePlugins");                    startAtLogon = Button_GetCheck(GetDlgItem(hwndDlg, IDC_STARTATLOGON)) == BST_CHECKED;                    startHidden = Button_GetCheck(GetDlgItem(hwndDlg, IDC_STARTHIDDEN)) == BST_CHECKED;                    WriteCurrentUserRun(startAtLogon, startHidden);                    if (NewFontSelection)                    {                        PhSetStringSetting2(L"Font", &NewFontSelection->sr);                        PostMessage(PhMainWndHandle, WM_PH_UPDATE_FONT, 0, 0);                    }                    SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, PSNRET_NOERROR);                }                return TRUE;            }        }        break;    }    return FALSE;}
开发者ID:processhacker2,项目名称:processhacker2,代码行数:101,


示例6: PSPProcOrigin

//.........这里部分代码省略.........				TranslateDialogDefault(hDlg);				SetTimer(hDlg, 1, 5000, NULL);				pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_STREET, SET_CONTACT_ORIGIN_STREET, DBVT_TCHAR));				pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_ZIP, SET_CONTACT_ORIGIN_ZIP, DBVT_TCHAR));				pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_CITY, SET_CONTACT_ORIGIN_CITY, DBVT_TCHAR));				pCtrlList->insert(CEditCtrl::CreateObj(hDlg, EDIT_STATE, SET_CONTACT_ORIGIN_STATE, DBVT_TCHAR));				GetCountryList(&nList, &pList);				pCtrlList->insert(CCombo::CreateObj(hDlg, EDIT_COUNTRY, SET_CONTACT_ORIGIN_COUNTRY, DBVT_WORD, pList, nList));				pCtrlList->insert(CTzCombo::CreateObj(hDlg, EDIT_TIMEZONE, NULL));			}		}		break;	case WM_NOTIFY:		{			switch (((LPNMHDR) lParam)->idFrom) {			case 0:				{					MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;					LPCSTR pszProto;										switch (((LPNMHDR) lParam)->code) {					case PSN_INFOCHANGED:						{							if (!PSGetBaseProto(hDlg, pszProto) || *pszProto == 0)								break;							if (hContact) {								MTime mt;																if (mt.DBGetStamp(hContact, USERINFO, SET_CONTACT_ADDEDTIME) && strstr(pszProto, "ICQ")) {									DWORD dwStamp;																		dwStamp = DB::Contact::WhenAdded(db_get_dw(hContact, pszProto, "UIN", 0), pszProto);									if (dwStamp > 0)										mt.FromStampAsUTC(dwStamp);								}								if (mt.IsValid()) {									TCHAR szTime[MAX_PATH];									LPTSTR ptr;																		mt.UTCToLocal();									mt.DateFormatLong(szTime, _countof(szTime));																		mir_tstrcat(szTime, _T(" - "));									ptr = szTime + mir_tstrlen(szTime);									mt.TimeFormat(ptr, _countof(szTime) - (ptr - szTime));									SetDlgItemText(hDlg, TXT_DATEADDED, szTime);								}							}						 							SetWindowLongPtr(hDlg, DWLP_MSGRESULT, 0);						}						break;									case PSN_ICONCHANGED:						{							const ICONCTRL idIcon[] = {								{ ICO_COMMON_ADDRESS, STM_SETIMAGE, ICO_ADDRESS },								{ ICO_COMMON_CLOCK,   STM_SETIMAGE, ICO_CLOCK },							};							IcoLib_SetCtrlIcons(hDlg, idIcon, _countof(idIcon));						}					}				}			} /* switch (((LPNMHDR)lParam)->idFrom) */		}		break;	case WM_COMMAND:		{			switch (LOWORD(wParam)) {			case EDIT_COUNTRY:				if (HIWORD(wParam) == CBN_SELCHANGE) {					LPIDSTRLIST pd = (LPIDSTRLIST)ComboBox_GetItemData((HWND)lParam, ComboBox_GetCurSel((HWND)lParam));					UpDate_CountryIcon(GetDlgItem(hDlg, ICO_COUNTRY), pd->nID);				}				break;			}		}		break;	case WM_TIMER:		{			TCHAR szTime[32];			CTzCombo::GetObj(hDlg, EDIT_TIMEZONE)->GetTime(szTime, _countof(szTime));			SetDlgItemText(hDlg, TXT_TIME, szTime);			break;		}	case WM_DESTROY:		KillTimer(hDlg, 1);	}	return PSPBaseProc(hDlg, uMsg, wParam, lParam);}
开发者ID:kmdtukl,项目名称:miranda-ng,代码行数:101,


示例7: SpectrumPopupProc

//.........这里部分代码省略.........		return TRUE;	case WM_ERASEBKGND:		SetWindowLongPtr(wnd, DWLP_MSGRESULT, TRUE);		return TRUE;	case WM_PAINT:		uih::HandleModernBackgroundPaint(wnd, GetDlgItem(wnd, IDOK));		return TRUE;	case WM_CTLCOLORSTATIC:		{			spec_param * ptr = reinterpret_cast<spec_param*>(GetWindowLongPtr(wnd,DWLP_USER));			if (GetDlgItem(wnd, IDC_PATCH_FORE) == (HWND)lp) {				HDC dc =(HDC)wp;				if (!ptr->br_fore) 				{					ptr->br_fore = CreateSolidBrush(ptr->cr_fore);				}				return (BOOL)ptr->br_fore;			} 			else if (GetDlgItem(wnd, IDC_PATCH_BACK) == (HWND)lp) 			{				HDC dc =(HDC)wp;				if (!ptr->br_back) 				{					ptr->br_back = CreateSolidBrush(ptr->cr_back);				}				return (BOOL)ptr->br_back;			}			else			return (BOOL)GetSysColorBrush(COLOR_3DHIGHLIGHT);		}		break;	case WM_COMMAND:		switch(wp)		{		case IDCANCEL:			EndDialog(wnd,0);			return TRUE;		case IDC_CHANGE_BACK:			{				spec_param * ptr = reinterpret_cast<spec_param*>(GetWindowLongPtr(wnd,DWLP_USER));				COLORREF COLOR = ptr->cr_back;				COLORREF COLORS[16] = {get_default_colour(colours::COLOUR_BACK),GetSysColor(COLOR_3DFACE),0,0,0,0,0,0,0,0,0,0,0,0,0,0};				if (uChooseColor(&COLOR, wnd, &COLORS[0]))				{					ptr->cr_back = COLOR;					ptr->flush_back();					RedrawWindow(GetDlgItem(wnd, IDC_PATCH_BACK), 0, 0, RDW_INVALIDATE|RDW_UPDATENOW);				}			}			break;		case IDC_CHANGE_FORE:			{				spec_param * ptr = reinterpret_cast<spec_param*>(GetWindowLongPtr(wnd,DWLP_USER));				COLORREF COLOR = ptr->cr_fore;				COLORREF COLORS[16] = {get_default_colour(colours::COLOUR_TEXT),GetSysColor(COLOR_3DSHADOW),0,0,0,0,0,0,0,0,0,0,0,0,0,0};				if (uChooseColor(&COLOR, wnd, &COLORS[0]))				{					ptr->cr_fore = COLOR;					ptr->flush_fore();					RedrawWindow(GetDlgItem(wnd, IDC_PATCH_FORE), 0, 0, RDW_INVALIDATE|RDW_UPDATENOW);				}			}			break;		case IDC_BARS:			{				spec_param * ptr = reinterpret_cast<spec_param*>(GetWindowLongPtr(wnd,DWLP_USER));				ptr->mode = (uSendMessage((HWND)lp, BM_GETCHECK, 0, 0) != TRUE ? MODE_STANDARD : MODE_BARS);			}			break;		case IDC_FRAME_COMBO|(CBN_SELCHANGE<<16):			{				spec_param * ptr = reinterpret_cast<spec_param*>(GetWindowLongPtr(wnd,DWLP_USER));				ptr->frame = ComboBox_GetCurSel(HWND(lp));			}			break;		case IDC_SCALE|(CBN_SELCHANGE<<16):			{				spec_param * ptr = reinterpret_cast<spec_param*>(GetWindowLongPtr(wnd,DWLP_USER));				ptr->m_scale = ComboBox_GetCurSel(HWND(lp));			}			break;		case IDC_VERTICAL_SCALE|(CBN_SELCHANGE<<16):			{				spec_param * ptr = reinterpret_cast<spec_param*>(GetWindowLongPtr(wnd,DWLP_USER));				ptr->m_vertical_scale = ComboBox_GetCurSel(HWND(lp));			}			break;		case IDOK:			{				spec_param * ptr = reinterpret_cast<spec_param*>(GetWindowLongPtr(wnd,DWLP_USER));				EndDialog(wnd,1);			}			return TRUE;		default:			return FALSE;		}	default:		return FALSE;	}}
开发者ID:ttsping,项目名称:columns_ui,代码行数:101,


示例8: GetDlgItem

//-----------------------------------------------------------------------------// Checks if a valid entry in the combo box is selected.//-----------------------------------------------------------------------------bool DeviceEnumeration::ComboBoxSomethingSelected( HWND dialog, int id ){	HWND control = GetDlgItem( dialog, id );	int index = ComboBox_GetCurSel( control );	return ( index >= 0 );}
开发者ID:asutermo,项目名称:Wolf-Operatives,代码行数:9,


示例9: switch

//.........这里部分代码省略.........					{						if( (DWORD)MAKELONG( m_displayModes->GetCurrent()->mode.Width, m_displayModes->GetCurrent()->mode.Height ) == (DWORD)PtrToUlong( ComboBoxSelected( dialog, IDC_RESOLUTION ) ) )						{							sprintf( text, "%d Hz", m_displayModes->GetCurrent()->mode.RefreshRate );							if (!ComboBoxContainsText( dialog, IDC_REFRESH_RATE, text ) )								ComboBoxAdd( dialog, IDC_REFRESH_RATE, (void*)m_displayModes->GetCurrent()->mode.RefreshRate, text );						}					}					ComboBoxSelect( dialog, IDC_REFRESH_RATE, *m_settingsScript->GetNumberData( "refresh" ) );				}			}			return true;		}		case WM_COMMAND:		{			switch( LOWORD(wparam) )			{				case IDOK:				{					// Store the details of the selected display mode.					m_selectedDisplayMode.Width = LOWORD( PtrToUlong( ComboBoxSelected( dialog, IDC_RESOLUTION ) ) );					m_selectedDisplayMode.Height = HIWORD( PtrToUlong( ComboBoxSelected( dialog, IDC_RESOLUTION ) ) );					m_selectedDisplayMode.RefreshRate = PtrToUlong( ComboBoxSelected( dialog, IDC_REFRESH_RATE ) );					m_selectedDisplayMode.Format = (D3DFORMAT)PtrToUlong( ComboBoxSelected( dialog, IDC_DISPLAY_FORMAT ) );					m_windowed = IsDlgButtonChecked( dialog, IDC_WINDOWED ) ? true : false;					m_vsync = IsDlgButtonChecked( dialog, IDC_VSYNC ) ? true : false;					// Destroy the display modes list.					SAFE_DELETE( m_displayModes );					// Get the selected index from each combo box.					long bpp = ComboBox_GetCurSel( GetDlgItem( dialog, IDC_DISPLAY_FORMAT ) );					long resolution = ComboBox_GetCurSel( GetDlgItem( dialog, IDC_RESOLUTION ) );					long refresh = ComboBox_GetCurSel( GetDlgItem( dialog, IDC_REFRESH_RATE ) );					// Check if the settings script has anything in it.					if( m_settingsScript->GetBoolData( "windowed" ) == NULL )					{						// Add all the settings to the script.						m_settingsScript->AddVariable( "windowed", VARIABLE_BOOL, &m_windowed );						m_settingsScript->AddVariable( "vsync", VARIABLE_BOOL, &m_vsync );						m_settingsScript->AddVariable( "bpp", VARIABLE_NUMBER, &bpp );						m_settingsScript->AddVariable( "resolution", VARIABLE_NUMBER, &resolution );						m_settingsScript->AddVariable( "refresh", VARIABLE_NUMBER, &refresh );					}					else					{						// Set all the settings.						m_settingsScript->SetVariable( "windowed", &m_windowed );						m_settingsScript->SetVariable( "vsync", &m_vsync );						m_settingsScript->SetVariable( "bpp", &bpp );						m_settingsScript->SetVariable( "resolution", &resolution );						m_settingsScript->SetVariable( "refresh", &refresh );					}					// Save all the settings out to the settings script.					m_settingsScript->SaveScript();					// Destroy the settings script.					SAFE_DELETE( m_settingsScript );					// Close the dialog.					EndDialog( dialog, IDOK );
开发者ID:asutermo,项目名称:Wolf-Operatives,代码行数:66,


示例10: AnchorDlgProc

BOOL CALLBACK    AnchorDlgProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam,                  AnchorObject *th){    TCHAR text[MAX_PATH];    int c, camIndex, i, type;    HWND cb;    Tab<INode *> cameras;    switch (message)    {    case WM_INITDIALOG:        th->ParentPickButton = GetICustButton(GetDlgItem(hDlg,                                                         IDC_PICK_PARENT));        th->ParentPickButton->SetType(CBT_CHECK);        th->ParentPickButton->SetButtonDownNotify(TRUE);        th->ParentPickButton->SetHighlightColor(GREEN_WASH);        th->ParentPickButton->SetCheck(FALSE);        th->dlgPrevSel = -1;        th->hRollup = hDlg;        if (th->triggerObject)            Static_SetText(GetDlgItem(hDlg, IDC_TRIGGER_OBJ),                           th->triggerObject->GetName());        th->pblock->GetValue(PB_AN_TYPE, th->iObjParams->GetTime(),                             type, FOREVER);        th->isJump = type == 0;        EnableWindow(GetDlgItem(hDlg, IDC_ANCHOR_URL), th->isJump);        EnableWindow(GetDlgItem(hDlg, IDC_PARAMETER), th->isJump);        EnableWindow(GetDlgItem(hDlg, IDC_BOOKMARKS), th->isJump);        EnableWindow(GetDlgItem(hDlg, IDC_CAMERA), !th->isJump);        GetCameras(th->iObjParams->GetRootNode(), &cameras);        c = cameras.Count();        cb = GetDlgItem(hDlg, IDC_CAMERA);        camIndex = -1;        for (i = 0; i < c; i++)        {            // add the name to the list            TSTR name = cameras[i]->GetName();            int ind = ComboBox_AddString(cb, name.data());            ComboBox_SetItemData(cb, ind, cameras[i]);            if (cameras[i] == th->cameraObject)                camIndex = i;        }        if (camIndex != -1)            ComboBox_SelectString(cb, 0, cameras[camIndex]->GetName());        Edit_SetText(GetDlgItem(hDlg, IDC_DESC), th->description.data());        Edit_SetText(GetDlgItem(hDlg, IDC_ANCHOR_URL), th->URL.data());        Edit_SetText(GetDlgItem(hDlg, IDC_PARAMETER), th->parameter.data());        if (pickMode)            SetPickMode(th);        return TRUE;    case WM_DESTROY:        if (pickMode)            SetPickMode(th);        //th->iObjParams->ClearPickMode();        //th->previousMode = NULL;        ReleaseICustButton(th->ParentPickButton);        return FALSE;    case WM_MOUSEACTIVATE:        return FALSE;    case WM_LBUTTONDOWN:    case WM_LBUTTONUP:    case WM_MOUSEMOVE:        return FALSE;    case WM_COMMAND:        switch (LOWORD(wParam))        {        case IDC_BOOKMARKS:        {            // do bookmarks            TSTR url, cam, desc;            if (GetBookmarkURL(th->iObjParams, &url, &cam, &desc))            {                // get the new URL information;                Edit_SetText(GetDlgItem(hDlg, IDC_ANCHOR_URL), url.data());                Edit_SetText(GetDlgItem(hDlg, IDC_DESC), desc.data());            }        }        break;        case IDC_CAMERA:            if (HIWORD(wParam) == CBN_SELCHANGE)            {                cb = GetDlgItem(hDlg, IDC_CAMERA);                int sel = ComboBox_GetCurSel(cb);                INode *rtarg;                rtarg = (INode *)ComboBox_GetItemData(cb, sel);                th->ReplaceReference(2, rtarg);            }            break;        case IDC_HYPERLINK://.........这里部分代码省略.........
开发者ID:nixz,项目名称:covise,代码行数:101,


示例11: Edit_GetText

void CConfigDialog::OnOK(void){	char szTemp[2048];	int nMaxChar = 2048;	Edit_GetText(GetDlgItem(m_hWindow, ID_EDIT_LINUS), szTemp, nMaxChar);	TestConfig::i().m_sLinusUrl = szTemp;	Edit_GetText(GetDlgItem(m_hWindow, ID_EDIT_WSADDR), szTemp, nMaxChar);	TestConfig::i().m_sWSUrl = szTemp;	TestConfig::i().m_bCalliope = Button_GetCheck(GetDlgItem(m_hWindow, ID_CHECK_CALLIOPE));	TestConfig::i().m_bLoopback = Button_GetCheck(GetDlgItem(m_hWindow, ID_CHECK_LOOPBACK));	TestConfig::i().m_bEnableCVO = Button_GetCheck(GetDlgItem(m_hWindow, ID_CHECK_CVO));	TestConfig::i().m_bAppshare = Button_GetCheck(GetDlgItem(m_hWindow, ID_CHECK_AS));	TestConfig::i().m_bSharer = Button_GetCheck(GetDlgItem(m_hWindow, ID_CHECK_ISSHARER));    TestConfig::i().m_bMultiStreamEnable = Button_GetCheck(GetDlgItem(m_hWindow, ID_CHECK_MULTI));    TestConfig::i().m_bQoSEnable = Button_GetCheck(GetDlgItem(m_hWindow, ID_CHECK_QOS));    TestConfig::i().m_audioParam["enableQos"] = TestConfig::i().m_bQoSEnable;	TestConfig::i().m_videoParam["enableQos"] = TestConfig::i().m_bQoSEnable;    bool enableFec = Button_GetCheck(GetDlgItem(m_hWindow, ID_CHECK_FEC));    if (enableFec)    {        TestConfig::i().m_videoParam["fecParams"]["bEnableFec"] = true;        TestConfig::i().m_videoParam["fecParams"]["uClockRate"] = 8000;        TestConfig::i().m_videoParam["fecParams"]["uPayloadType"] = 111;    }    bool enableDtlsSrtp = Button_GetCheck(GetDlgItem(m_hWindow, ID_CHECK_DTLS_SRTP));    if (enableDtlsSrtp) {        TestConfig::i().m_bEnableDtlsSrtp = true;    } else {        TestConfig::i().m_bEnableDtlsSrtp = false;    }	TestConfig::i().m_bASPreview = Button_GetCheck(GetDlgItem(m_hWindow, ID_CHECK_ASPREVIEW));	HWND hCheckFilterSelf = GetDlgItem(m_hWindow, ID_CHECK_FILTER_SELF);	if ( hCheckFilterSelf )		TestConfig::i().m_bShareFilterSelf = Button_GetCheck(hCheckFilterSelf);	if (TestConfig::i().m_bAppshare){		HWND hScreenSource = GetDlgItem(m_hWindow, IDC_COMBO_AS_SOURCE);		int nIndex = ComboBox_GetCurSel(hScreenSource);//		char szSelectSource[MAX_PATH] = { 0 };		WCHAR szSelectSource[MAX_PATH] = { 0 };		//		ComboBox_GetLBText(hScreenSource, nIndex, szSelectSource);		//TestConfig::i().m_strScreenSharingAutoLaunchSourceName = "DISPLAY";		SendMessageW(hScreenSource, CB_GETLBTEXT, nIndex, (LPARAM)szSelectSource);		char szUtf8SelectSource[MAX_PATH] = { 0 };		WideCharToMultiByte(CP_UTF8, 0, szSelectSource, wcslen(szSelectSource), szUtf8SelectSource, MAX_PATH, NULL, NULL);		std::string strSourceName = szUtf8SelectSource;		strSourceName = strSourceName.substr(0, strSourceName.find(":"));		TestConfig::i().m_strScreenSharingAutoLaunchSourceName = strSourceName.c_str();		if (TestConfig::i().m_bCalliope){			//			TestConfig::i().m_bFakeVideoByShare = false;			TestConfig::i().m_bHasVideo = true;		}		TestConfig::i().m_bAutoStart = true;	}    if (!TestConfig::i().m_bLoopback)	{		TestConfig::i().m_bSharer = Button_GetCheck(GetDlgItem(m_hWindow, ID_CHECK_ISSHARER));    }	TestConfig::i().m_audioDebugOption["enableICE"] = !!Button_GetCheck(GetDlgItem(m_hWindow, ID_CHECK_ICE));	TestConfig::i().m_videoDebugOption["enableICE"] = !!Button_GetCheck(GetDlgItem(m_hWindow, ID_CHECK_ICE));	TestConfig::i().m_shareDebugOption["enableICE"] = !!Button_GetCheck(GetDlgItem(m_hWindow, ID_CHECK_ICE));	HWND hVideoSize = GetDlgItem(m_hWindow, ID_COMBO_VIDEOSIZE);    HWND hActiveVideo = GetDlgItem(m_hWindow, ID_COMBO_ACTIVEVIDEO_COUNT);    TestConfig::i().m_nVideoSize = ComboBox_GetItemData(hVideoSize, ComboBox_GetCurSel(hVideoSize));    TestConfig::i().m_uMaxVideoStreams = ComboBox_GetItemData(hActiveVideo, ComboBox_GetCurSel(hActiveVideo));    TestConfig::i().m_bNoSignal = Button_GetCheck(GetDlgItem(m_hWindow, ID_CHECK_NOSIGNAL));;    Edit_GetText(GetDlgItem(m_hWindow, ID_EDIT_VENUEURL), szTemp, nMaxChar);    TestConfig::i().m_sVenuUrl = szTemp;	EndDialog(m_hWindow, IDOK);}
开发者ID:zzchu,项目名称:wme-ref-app,代码行数:76,


示例12: GetDlgItem

//-----------------------------------------------------------------------------// Name: ComboBoxSomethingSelected// Desc: Returns whether any entry in the combo box is selected.  This is //       more useful than ComboBoxSelected() when you need to distinguish //       between having no item selected vs. having an item selected whose //       itemData is NULL.//-----------------------------------------------------------------------------bool CD3DSettingsDialog::ComboBoxSomethingSelected( int id ){    HWND hwndCtrl = GetDlgItem( m_hDlg, id );    int index = ComboBox_GetCurSel( hwndCtrl );    return ( index >= 0 );}
开发者ID:xahgo,项目名称:tama,代码行数:13,


示例13: SortMailFrom_OnCommand

/* This function handles the WM_COMMAND message. */ void FASTCALL SortMailFrom_OnCommand( HWND hwnd, int id, HWND hwndCtl, UINT codeNotify ){   switch( id )      {      case IDD_EXISTING:         EnableControl( hwnd, IDD_LIST, TRUE );         EnableControl( hwnd, IDD_PAD2, FALSE );         EnableControl( hwnd, IDD_EDIT, FALSE );         break;      case IDD_NEW:         EnableControl( hwnd, IDD_LIST, FALSE );         EnableControl( hwnd, IDD_PAD2, TRUE );         EnableControl( hwnd, IDD_EDIT, TRUE );         SetFocus( GetDlgItem( hwnd, IDD_EDIT ) );         break;      case IDOK:         /* Get the destination folder.          */         if( IsDlgButtonChecked( hwnd, IDD_EXISTING ) )            {            HWND hwndList;            int index;            VERIFY( hwndList = GetDlgItem( hwnd, IDD_LIST ) );            index = ComboBox_GetCurSel( hwndList );            ASSERT( CB_ERR != index );            ptlDest = (PTL)ComboBox_GetItemData( hwndList, index );            ASSERT( NULL != ptlDest );            }         else            {            char szMailBox[ LEN_MAILBOX ];            PCL pcl;            /* Get the destination folder name.             */            GetDlgItemText( hwnd, IDD_EDIT, szMailBox, sizeof( szMailBox ) );            StripLeadingTrailingSpaces( szMailBox );            if( !IsValidFolderName( hwnd, szMailBox ) )               break;            if( strchr( szMailBox, ' ' ) != NULL )            {               wsprintf( lpTmpBuf, GS(IDS_STR1154), ' ' );               fMessageBox( hwnd, 0, lpTmpBuf, MB_OK|MB_ICONINFORMATION );               break;            }            if( NULL == ( pcl = Amdb_OpenFolder( NULL, "Mail" ) ) )               pcl = Amdb_CreateFolder( Amdb_GetFirstCategory(), "Mail", CFF_SORT );            ptlDest = NULL;            if( pcl )               {               if( Amdb_OpenTopic( pcl, szMailBox ) )                  {                  fMessageBox( hwnd, 0, GS(IDS_STR832), MB_OK|MB_ICONEXCLAMATION );                  break;                  }               ptlDest = Amdb_CreateTopic( pcl, szMailBox, FTYPE_MAIL );               Amdb_CommitDatabase( FALSE );               }            /* Error if we couldn't create the folder (out of memory?)             */            if( NULL == ptlDest )               {               wsprintf( lpTmpBuf, GS(IDS_STR845), szMailBox );               fMessageBox( hwndFrame, 0, lpTmpBuf, MB_OK|MB_ICONINFORMATION );               break;               }            }         /* Get the address, reject if there isn't one.          */         Edit_GetText( GetDlgItem( hwnd, IDD_NAME ), szRuleAuthor, LEN_INTERNETNAME+1 );         if( strlen( szRuleAuthor ) == 0 )         {            fMessageBox( hwnd, 0, GS(IDS_STR783), MB_OK|MB_ICONINFORMATION );            HighlightField( hwnd, IDD_NAME);            break;         }         /* Set a flag if all messages are moved to the          * destination folder.          */         fMoveExisting = IsDlgButtonChecked( hwnd, IDD_FILEALL );         EndDialog( hwnd, TRUE );         break;      case IDCANCEL:         EndDialog( hwnd, FALSE );         break;      }}
开发者ID:cixonline,项目名称:ameol,代码行数:97,


示例14: GeneralSettingsDlgProc

INT_PTR CALLBACKGeneralSettingsDlgProc(HWND hwndDlg, UINT msg, UNUSED WPARAM wParam, LPARAM lParam){    LPPSHNOTIFY psn;    langProcData langData = {        .languages = GetDlgItem(hwndDlg, ID_CMB_LANGUAGE),        .language = GetGUILanguage()    };    switch(msg) {    case WM_INITDIALOG:        /* Populate UI language selection combo box */        EnumResourceLanguages( NULL, RT_STRING, MAKEINTRESOURCE(IDS_LANGUAGE_NAME / 16 + 1),            (ENUMRESLANGPROC) FillLangListProc, (LONG_PTR) &langData );        /* If none of the available languages matched, select the fallback */        if (ComboBox_GetCurSel(langData.languages) == CB_ERR)            ComboBox_SelectString(langData.languages, -1,                LangListEntry(IDS_LANGUAGE_NAME, fallbackLangId));        /* Clear language id data for the selected item */        ComboBox_SetItemData(langData.languages, ComboBox_GetCurSel(langData.languages), 0);        if (GetLaunchOnStartup())            Button_SetCheck(GetDlgItem(hwndDlg, ID_CHK_STARTUP), BST_CHECKED);        if (o.log_append)            Button_SetCheck(GetDlgItem(hwndDlg, ID_CHK_LOG_APPEND), BST_CHECKED);        if (o.silent_connection)            Button_SetCheck(GetDlgItem(hwndDlg, ID_CHK_SILENT), BST_CHECKED);        if (o.show_balloon == 0)            CheckRadioButton (hwndDlg, ID_RB_BALLOON0, ID_RB_BALLOON2, ID_RB_BALLOON0);        else if (o.show_balloon == 1)            CheckRadioButton (hwndDlg, ID_RB_BALLOON0, ID_RB_BALLOON2, ID_RB_BALLOON1);        else if (o.show_balloon == 2)            CheckRadioButton (hwndDlg, ID_RB_BALLOON0, ID_RB_BALLOON2, ID_RB_BALLOON2);        if (o.show_script_window)            Button_SetCheck(GetDlgItem(hwndDlg, ID_CHK_SHOW_SCRIPT_WIN), BST_CHECKED);        break;    case WM_NOTIFY:        psn = (LPPSHNOTIFY) lParam;        if (psn->hdr.code == (UINT) PSN_APPLY)        {            LANGID langId = (LANGID) ComboBox_GetItemData(langData.languages,                ComboBox_GetCurSel(langData.languages));            if (langId != 0)                SetGUILanguage(langId);            SetLaunchOnStartup(Button_GetCheck(GetDlgItem(hwndDlg, ID_CHK_STARTUP)) == BST_CHECKED);            o.log_append =                (Button_GetCheck(GetDlgItem(hwndDlg, ID_CHK_LOG_APPEND)) == BST_CHECKED);            o.silent_connection =                (Button_GetCheck(GetDlgItem(hwndDlg, ID_CHK_SILENT)) == BST_CHECKED);            if (IsDlgButtonChecked(hwndDlg, ID_RB_BALLOON0))                o.show_balloon = 0;            else if (IsDlgButtonChecked(hwndDlg, ID_RB_BALLOON2))                o.show_balloon = 2;            else                o.show_balloon = 1;            o.show_script_window =                (Button_GetCheck(GetDlgItem(hwndDlg, ID_CHK_SHOW_SCRIPT_WIN)) == BST_CHECKED);            SaveRegistryKeys();            SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, PSNRET_NOERROR);            return TRUE;        }        break;    }    return FALSE;}
开发者ID:mattock,项目名称:openvpn-gui,代码行数:77,


示例15: switch

INT_PTR CALLBACK DialogPackage::SelectFolderDlgProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam){	switch (uMsg)	{	case WM_INITDIALOG:		{			EnableThemeDialogTexture(hWnd, ETDT_ENABLETAB);			c_Dialog->SetDialogFont(hWnd);			std::wstring* existingPath = (std::wstring*)lParam;			SetWindowLongPtr(hWnd, GWLP_USERDATA, lParam);			*existingPath += L'*';			WIN32_FIND_DATA fd;			HANDLE hFind = FindFirstFileEx(existingPath->c_str(), FindExInfoBasic, &fd, FindExSearchNameMatch, nullptr, 0);			existingPath->pop_back();			if (hFind != INVALID_HANDLE_VALUE)			{				const WCHAR* folder = PathFindFileName(existingPath->c_str());				HWND item = GetDlgItem(hWnd, IDC_PACKAGESELECTFOLDER_EXISTING_RADIO);				std::wstring text = L"Add folder from ";				text.append(folder, wcslen(folder) - 1);				text += L':';				SetWindowText(item, text.c_str());				Button_SetCheck(item, BST_CHECKED);				item = GetDlgItem(hWnd, IDC_PACKAGESELECTFOLDER_EXISTING_COMBO);				do				{					if (fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY &&						!(fd.cFileName[0] == L'.' && (!fd.cFileName[1] || fd.cFileName[1] == L'.' && !fd.cFileName[2])) &&						wcscmp(fd.cFileName, L"Backup") != 0 &&						wcscmp(fd.cFileName, L"@Backup") != 0 &&						wcscmp(fd.cFileName, L"@Vault") != 0)					{						ComboBox_InsertString(item, -1, fd.cFileName);					}				}				while (FindNextFile(hFind, &fd));				ComboBox_SetCurSel(item, 0);				FindClose(hFind);			}		}		break;	case WM_COMMAND:		switch (LOWORD(wParam))		{		case IDC_PACKAGESELECTFOLDER_EXISTING_RADIO:			{				HWND item = GetDlgItem(hWnd, IDC_PACKAGESELECTFOLDER_EXISTING_COMBO);				EnableWindow(item, TRUE);				int sel = ComboBox_GetCurSel(item);				item = GetDlgItem(hWnd, IDC_PACKAGESELECTFOLDER_CUSTOM_EDIT);				EnableWindow(item, FALSE);				item = GetDlgItem(hWnd, IDC_PACKAGESELECTFOLDER_CUSTOMBROWSE_BUTTON);				EnableWindow(item, FALSE);				item = GetDlgItem(hWnd, IDOK);				EnableWindow(item, sel != -1);			}			break;		case IDC_PACKAGESELECTFOLDER_CUSTOM_RADIO:			{				HWND item = GetDlgItem(hWnd, IDC_PACKAGESELECTFOLDER_EXISTING_COMBO);				EnableWindow(item, FALSE);				item = GetDlgItem(hWnd, IDC_PACKAGESELECTFOLDER_CUSTOM_EDIT);				EnableWindow(item, TRUE);				item = GetDlgItem(hWnd, IDC_PACKAGESELECTFOLDER_CUSTOMBROWSE_BUTTON);				EnableWindow(item, TRUE);				SendMessage(hWnd, WM_COMMAND, MAKEWPARAM(IDC_PACKAGESELECTFOLDER_CUSTOM_EDIT, EN_CHANGE), 0);			}			break;		case IDC_PACKAGESELECTFOLDER_CUSTOM_EDIT:			if (HIWORD(wParam) == EN_CHANGE)			{				WCHAR buffer[MAX_PATH];				int len = Edit_GetText((HWND)lParam, buffer, MAX_PATH);				// Disable Add button if invalid directory				DWORD attributes = GetFileAttributes(buffer);				BOOL state = (attributes != INVALID_FILE_ATTRIBUTES &&					attributes & FILE_ATTRIBUTE_DIRECTORY);				EnableWindow(GetDlgItem(hWnd, IDOK), state);			}			break;		case IDC_PACKAGESELECTFOLDER_CUSTOMBROWSE_BUTTON:			{				WCHAR buffer[MAX_PATH];				BROWSEINFO bi = {0};				bi.hwndOwner = hWnd;//.........这里部分代码省略.........
开发者ID:rainmeter,项目名称:rainmeter,代码行数:101,


示例16: DeviceDlgProc

BOOL CALLBACK DeviceDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam){ switch(uMsg)  {   case WM_INITDIALOG:    {     HWND hWC;int i;     DoDevEnum(hW);     hWC=GetDlgItem(hW,IDC_DEVICE);     i=ComboBox_FindStringExact(hWC,-1,szDevName);     if(i==CB_ERR) i=0;     ComboBox_SetCurSel(hWC,i);     hWC=GetDlgItem(hW,IDC_GAMMA);     ScrollBar_SetRange(hWC,0,1024,FALSE);     if(iUseGammaVal==2048) ScrollBar_SetPos(hWC,512,FALSE);     else      {       ScrollBar_SetPos(hWC,iUseGammaVal,FALSE);       CheckDlgButton(hW,IDC_USEGAMMA,TRUE);      }    }   case WM_HSCROLL:    {     HWND hWC=GetDlgItem(hW,IDC_GAMMA);     int pos=ScrollBar_GetPos(hWC);     switch(LOWORD(wParam))      {       case SB_THUMBPOSITION:            pos=HIWORD(wParam);break;        case SB_LEFT:        pos=0;break;       case SB_RIGHT:          pos=1024;break;       case SB_LINELEFT:        pos-=16;break;       case SB_LINERIGHT:        pos+=16;break;       case SB_PAGELEFT:          pos-=128;break;       case SB_PAGERIGHT:         pos+=128;break;      }     ScrollBar_SetPos(hWC,pos,TRUE);     return TRUE;    }   case WM_COMMAND:    {     switch(LOWORD(wParam))      {       case IDCANCEL: FreeGui(hW);                      EndDialog(hW,FALSE);return TRUE;       case IDOK:             {         HWND hWC=GetDlgItem(hW,IDC_DEVICE);         int i=ComboBox_GetCurSel(hWC);         if(i==CB_ERR) return TRUE;         guiDev=*((GUID *)ComboBox_GetItemData(hWC,i));         ComboBox_GetLBText(hWC,i,szDevName);         FreeGui(hW);         if(!IsDlgButtonChecked(hW,IDC_USEGAMMA))          iUseGammaVal=2048;         else          iUseGammaVal=ScrollBar_GetPos(GetDlgItem(hW,IDC_GAMMA));         EndDialog(hW,TRUE);         return TRUE;        }      }    }  } return FALSE;}                             
开发者ID:Asmodean-,项目名称:PCSXR,代码行数:76,


示例17: DlgProcPopupAdvOpts

//.........这里部分代码省略.........			case IDC_TRANS_OPAQUEONHOVER:				PopupOptions.OpaqueOnHover = !PopupOptions.OpaqueOnHover;				SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);				break;			case IDC_USEANIMATIONS:				PopupOptions.UseAnimations = !PopupOptions.UseAnimations;				{					BOOL enable = PopupOptions.UseAnimations || PopupOptions.UseEffect;					EnableWindow(GetDlgItem(hwnd, IDC_FADEIN_TXT1),		enable);					EnableWindow(GetDlgItem(hwnd, IDC_FADEIN),			enable);					EnableWindow(GetDlgItem(hwnd, IDC_FADEIN_SPIN),		enable);					EnableWindow(GetDlgItem(hwnd, IDC_FADEIN_TXT2),		enable);					EnableWindow(GetDlgItem(hwnd, IDC_FADEOUT_TXT1),	enable);					EnableWindow(GetDlgItem(hwnd, IDC_FADEOUT),			enable);					EnableWindow(GetDlgItem(hwnd, IDC_FADEOUT_SPIN),	enable);					EnableWindow(GetDlgItem(hwnd, IDC_FADEOUT_TXT2),	enable);					SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);				}				break;			case IDC_PREVIEW:				PopupPreview();				break;			}			break;		case CBN_SELCHANGE:			//lParam = Handle to the control			switch(idCtrl) {			case IDC_EFFECT:				{					int iEffect = ComboBox_GetItemData((HWND)lParam, ComboBox_GetCurSel((HWND)lParam));					PopupOptions.UseEffect = (iEffect != -2) ? TRUE : FALSE;					mir_free(PopupOptions.Effect);					PopupOptions.Effect = mir_tstrdup((iEffect >= 0) ? g_lstPopupVfx[iEffect] : _T(""));					BOOL enable = PopupOptions.UseAnimations || PopupOptions.UseEffect;					EnableWindow(GetDlgItem(hwnd, IDC_FADEIN_TXT1),		enable);					EnableWindow(GetDlgItem(hwnd, IDC_FADEIN),			enable);					EnableWindow(GetDlgItem(hwnd, IDC_FADEIN_SPIN),		enable);					EnableWindow(GetDlgItem(hwnd, IDC_FADEIN_TXT2),		enable);					EnableWindow(GetDlgItem(hwnd, IDC_FADEOUT_TXT1),	enable);					EnableWindow(GetDlgItem(hwnd, IDC_FADEOUT),			enable);					EnableWindow(GetDlgItem(hwnd, IDC_FADEOUT_SPIN),	enable);					EnableWindow(GetDlgItem(hwnd, IDC_FADEOUT_TXT2),	enable);					SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);				}				break;			}			break;		case EN_CHANGE:			//Edit controls change			if (!bDlgInit) break;			//lParam = Handle to the control			switch(idCtrl) {			case IDC_MAXPOPUPS:				{					int maxPop = GetDlgItemInt(hwnd, idCtrl, NULL, FALSE);					if (maxPop > 0){						PopupOptions.MaxPopups = maxPop;						SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);					}				}				break;
开发者ID:MrtsComputers,项目名称:miranda-ng,代码行数:67,


示例18: KeyDlgProc

BOOL CALLBACK KeyDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam){ switch(uMsg)  {   case WM_INITDIALOG:    {     int i,j,k;char szB[2];HWND hWC;     for(i=IDC_KEY1;i<=IDC_KEY10;i++)      {       hWC=GetDlgItem(hW,i);       for(j=0;tMKeys[j].cCode!=0;j++)        {         k=ComboBox_AddString(hWC,tMKeys[j].szName);         ComboBox_SetItemData(hWC,k,tMKeys[j].cCode);        }       for(j=0x30;j<=0x39;j++)        {         wsprintf(szB,"%c",j);         k=ComboBox_AddString(hWC,szB);         ComboBox_SetItemData(hWC,k,j);        }       for(j=0x41;j<=0x5a;j++)        {         wsprintf(szB,"%c",j);         k=ComboBox_AddString(hWC,szB);         ComboBox_SetItemData(hWC,k,j);        }                                     SetGPUKey(GetDlgItem(hW,i),szGPUKeys[i-IDC_KEY1]);      }    }return TRUE;   case WM_COMMAND:    {     switch(LOWORD(wParam))      {       case IDC_DEFAULT:                         {         int i;         for(i=IDC_KEY1;i<=IDC_KEY10;i++)          SetGPUKey(GetDlgItem(hW,i),szKeyDefaults[i-IDC_KEY1]);        }break;       case IDCANCEL:     EndDialog(hW,FALSE); return TRUE;       case IDOK:        {         HWND hWC;int i;         for(i=IDC_KEY1;i<=IDC_KEY10;i++)          {           hWC=GetDlgItem(hW,i);           szGPUKeys[i-IDC_KEY1]=(char)ComboBox_GetItemData(hWC,ComboBox_GetCurSel(hWC));           if(szGPUKeys[i-IDC_KEY1]<0x20) szGPUKeys[i-IDC_KEY1]=0x20;          }         EndDialog(hW,TRUE);           return TRUE;        }      }    }  } return FALSE;}
开发者ID:Asmodean-,项目名称:PCSXR,代码行数:61,


示例19: InputSettingsDlgProc

//.........这里部分代码省略.........         hb[1].hParent = GetDlgItem(hDlg, IDC_PORT2CONNTYPECB);         for (i = 0; i < 6; i++)         {            hb[2+i].string = "Use this to select what kind of peripheral to emulate";            hb[2+i].hParent = GetDlgItem(hDlg, IDC_PORT1ATYPECB+i);            hb[8+i].string = hb[2+i].string;            hb[8+i].hParent = GetDlgItem(hDlg, IDC_PORT2ATYPECB+i);                        hb[14+i].string = "Press this to change the button configuration, etc.";            hb[14+i].hParent = GetDlgItem(hDlg, IDC_PORT1ACFGPB+i);            hb[20+i].string = hb[14+i].string;            hb[20+i].hParent = GetDlgItem(hDlg, IDC_PORT2ACFGPB+i);                     }                  hb[26].string = NULL;         CreateHelpBalloons(hb);         return TRUE;      }      case WM_COMMAND:      {         switch (LOWORD(wParam))         {            case IDC_PORT1CONNTYPECB:            case IDC_PORT2CONNTYPECB:            {               int i, id, id2;               switch(HIWORD(wParam))               {                  case CBN_SELCHANGE:                     switch(ComboBox_GetCurSel((HWND)lParam))                     {                        case 0: // None                           if (LOWORD(wParam) == IDC_PORT1CONNTYPECB)                           {                              id = IDC_PORT1ATYPECB;                              id2 = IDC_PORT1ACFGPB;                           }                           else                           {                              id = IDC_PORT2ATYPECB;                              id2 = IDC_PORT2ACFGPB;                           }                           for (i = 0; i < 6; i++)                           {                              EnableWindow(GetDlgItem(hDlg, id+i), FALSE);                              EnableWindow(GetDlgItem(hDlg, id2+i), FALSE);                           }                           break;                        case 1: // Direct                           if (LOWORD(wParam) == IDC_PORT1CONNTYPECB)                           {                              id = IDC_PORT1ATYPECB;                              id2 = IDC_PORT1ACFGPB;                           }                           else                           {                              id = IDC_PORT2ATYPECB;                              id2 = IDC_PORT2ACFGPB;                           }                           EnableWindow(GetDlgItem(hDlg, id), TRUE);
开发者ID:devmiyax,项目名称:yabause-android,代码行数:67,


示例20: GetSettings

void GetSettings(HWND hW) { HWND hWC;char cs[256];int i,j;char * p; hWC=GetDlgItem(hW,IDC_RESOLUTION);                    // get resolution i=ComboBox_GetCurSel(hWC); ComboBox_GetLBText(hWC,i,cs); iResX=atol(cs); p=strchr(cs,'x'); iResY=atol(p+1); p=strchr(cs,',');									   // added by syo if(p) iRefreshRate=atol(p+1);						   // get refreshrate else  iRefreshRate=0; hWC=GetDlgItem(hW,IDC_COLDEPTH);                      // get color depth i=ComboBox_GetCurSel(hWC); ComboBox_GetLBText(hWC,i,cs); iColDepth=atol(cs); hWC=GetDlgItem(hW,IDC_SCANLINES);                     // scanlines iUseScanLines=ComboBox_GetCurSel(hWC); i=GetDlgItemInt(hW,IDC_WINX,NULL,FALSE);              // get win size if(i<50) i=50; if(i>20000) i=20000; j=GetDlgItemInt(hW,IDC_WINY,NULL,FALSE); if(j<50) j=50; if(j>20000) j=20000; iWinSize=MAKELONG(i,j); if(IsDlgButtonChecked(hW,IDC_DISPMODE2))              // win mode  iWindowMode=1; else iWindowMode=0; if(IsDlgButtonChecked(hW,IDC_USELIMIT))               // fps limit  UseFrameLimit=1; else UseFrameLimit=0; if(IsDlgButtonChecked(hW,IDC_USESKIPPING))            // fps skip  UseFrameSkip=1; else UseFrameSkip=0; if(IsDlgButtonChecked(hW,IDC_GAMEFIX))                // game fix  iUseFixes=1; else iUseFixes=0; if(IsDlgButtonChecked(hW,IDC_SYSMEMORY))              // use system memory  iSysMemory=1; else iSysMemory=0; if(IsDlgButtonChecked(hW,IDC_STOPSAVER))              // stop screen saver  iStopSaver=1; else iStopSaver=0; if(IsDlgButtonChecked(hW,IDC_VSYNC))                  // wait VSYNC  bVsync=bVsync_Key=TRUE; else bVsync=bVsync_Key=FALSE; if(IsDlgButtonChecked(hW,IDC_TRANSPARENT))            // transparent menu  bTransparent=TRUE; else bTransparent=FALSE; if(IsDlgButtonChecked(hW,IDC_SHOWFPS))                // show fps  iShowFPS=1; else iShowFPS=0; if(IsDlgButtonChecked(hW,IDC_DEBUGMODE))              // debug mode  iDebugMode=1; else iDebugMode=0; hWC=GetDlgItem(hW,IDC_NOSTRETCH); iUseNoStretchBlt=ComboBox_GetCurSel(hWC); hWC=GetDlgItem(hW,IDC_DITHER); iUseDither=ComboBox_GetCurSel(hWC); if(IsDlgButtonChecked(hW,IDC_FRAMEAUTO))              // frame rate      iFrameLimit=2; else iFrameLimit=1; GetDlgItemText(hW,IDC_FRAMELIM,cs,255); fFrameRate=(float)atof(cs); if(fFrameRate<10.0f)  fFrameRate=10.0f; if(fFrameRate>200.0f) fFrameRate=200.0f;}
开发者ID:Asmodean-,项目名称:PCSXR,代码行数:73,


示例21: GeneralPageDialogProc

INT_PTR CALLBACK GeneralPageDialogProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) {  int updatestrings = 0;  if (msg == WM_INITDIALOG) {    wchar_t txt[20];    GetPrivateProfileString(L"General", L"AutoFocus", L"0", txt, ARRAY_SIZE(txt), inipath);    Button_SetCheck(GetDlgItem(hwnd,IDC_AUTOFOCUS), _wtoi(txt)?BST_CHECKED:BST_UNCHECKED);    GetPrivateProfileString(L"General", L"Aero", L"2", txt, ARRAY_SIZE(txt), inipath);    Button_SetCheck(GetDlgItem(hwnd,IDC_AERO), _wtoi(txt)?BST_CHECKED:BST_UNCHECKED);    GetPrivateProfileString(L"General", L"InactiveScroll", L"1", txt, ARRAY_SIZE(txt), inipath);    Button_SetCheck(GetDlgItem(hwnd,IDC_INACTIVESCROLL), _wtoi(txt)?BST_CHECKED:BST_UNCHECKED);    GetPrivateProfileString(L"General", L"MDI", L"0", txt, ARRAY_SIZE(txt), inipath);    Button_SetCheck(GetDlgItem(hwnd,IDC_MDI), _wtoi(txt)?BST_CHECKED:BST_UNCHECKED);    HWND control = GetDlgItem(hwnd, IDC_LANGUAGE);    ComboBox_ResetContent(control);    if (l10n == &l10n_ini) {      ComboBox_AddString(control, l10n->lang);      ComboBox_SetCurSel(control, 0);      ComboBox_Enable(control, FALSE);    }    else {      ComboBox_Enable(control, TRUE);      int i;      for (i=0; i < ARRAY_SIZE(languages); i++) {        ComboBox_AddString(control, languages[i]->lang);        if (l10n == languages[i]) {          ComboBox_SetCurSel(control, i);        }      }    }    Button_Enable(GetDlgItem(hwnd,IDC_ELEVATE), vista && !elevated);  }  else if (msg == WM_COMMAND) {    int id = LOWORD(wParam);    int event = HIWORD(wParam);    HWND control = GetDlgItem(hwnd, id);    int val = Button_GetCheck(control);    wchar_t txt[10];    if (id == IDC_AUTOFOCUS) {      WritePrivateProfileString(L"General", L"AutoFocus", _itow(val,txt,10), inipath);    }    else if (id == IDC_AUTOSNAP && event == CBN_SELCHANGE) {      val = ComboBox_GetCurSel(control);      WritePrivateProfileString(L"General", L"AutoSnap", _itow(val,txt,10), inipath);    }    else if (id == IDC_AERO) {      WritePrivateProfileString(L"General", L"Aero", _itow(val,txt,10), inipath);    }    else if (id == IDC_INACTIVESCROLL) {      WritePrivateProfileString(L"General", L"InactiveScroll", _itow(val,txt,10), inipath);    }    else if (id == IDC_MDI) {      WritePrivateProfileString(L"General", L"MDI", _itow(val,txt,10), inipath);    }    else if (id == IDC_LANGUAGE && event == CBN_SELCHANGE) {      int i = ComboBox_GetCurSel(control);      if (i == ARRAY_SIZE(languages)) {        OpenUrl(L"https://stefansundin.github.io/altdrag/doc/translate.html");        for (i=0; l10n != languages[i]; i++) {}        ComboBox_SetCurSel(control, i);      }      else {        l10n = languages[i];        WritePrivateProfileString(L"General", L"Language", l10n->code, inipath);        updatestrings = 1;        UpdateStrings();      }    }    else if (id == IDC_AUTOSTART) {      SetAutostart(val, 0, 0);      Button_Enable(GetDlgItem(hwnd,IDC_AUTOSTART_HIDE), val);      Button_Enable(GetDlgItem(hwnd,IDC_AUTOSTART_ELEVATE), val && vista);      if (!val) {        Button_SetCheck(GetDlgItem(hwnd,IDC_AUTOSTART_HIDE), BST_UNCHECKED);        Button_SetCheck(GetDlgItem(hwnd,IDC_AUTOSTART_ELEVATE), BST_UNCHECKED);      }    }    else if (id == IDC_AUTOSTART_HIDE) {      int elevate = Button_GetCheck(GetDlgItem(hwnd,IDC_AUTOSTART_ELEVATE));      SetAutostart(1, val, elevate);    }    else if (id == IDC_AUTOSTART_ELEVATE) {      int hide = Button_GetCheck(GetDlgItem(hwnd,IDC_AUTOSTART_HIDE));      SetAutostart(1, hide, val);      if (val) {        // Don't nag if UAC is disabled, only check if elevated        DWORD uac_enabled = 1;        if (elevated) {          DWORD len = sizeof(uac_enabled);          HKEY key;          RegOpenKeyEx(HKEY_LOCAL_MACHINE, L"Software//Microsoft//Windows//CurrentVersion//Policies//System", 0, KEY_QUERY_VALUE, &key);          RegQueryValueEx(key, L"EnableLUA", NULL, NULL, (LPBYTE)&uac_enabled, &len);          RegCloseKey(key);        }        if (uac_enabled) {//.........这里部分代码省略.........
开发者ID:alex310110,项目名称:altdrag,代码行数:101,


示例22: RecordingDlgProc

BOOL CALLBACK RecordingDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam){ switch(uMsg)  {   case WM_INITDIALOG:    {	 HWND hWC;     CheckDlgButton(hW,IDC_REC_MODE1,RECORD_RECORDING_MODE==0);     CheckDlgButton(hW,IDC_REC_MODE2,RECORD_RECORDING_MODE==1);     hWC = GetDlgItem(hW,IDC_VIDEO_SIZE);     ComboBox_ResetContent(hWC);     ComboBox_AddString(hWC,"Full");     ComboBox_AddString(hWC,"Half");     ComboBox_AddString(hWC,"Quarter");     ComboBox_SetCurSel(hWC,RECORD_VIDEO_SIZE);     SetDlgItemInt(hW,IDC_REC_WIDTH,RECORD_RECORDING_WIDTH,FALSE);     SetDlgItemInt(hW,IDC_REC_HEIGHT,RECORD_RECORDING_HEIGHT,FALSE);     hWC = GetDlgItem(hW,IDC_FRAME_RATE);     ComboBox_ResetContent(hWC);     ComboBox_AddString(hWC,"1");     ComboBox_AddString(hWC,"2");     ComboBox_AddString(hWC,"3");     ComboBox_AddString(hWC,"4");     ComboBox_AddString(hWC,"5");     ComboBox_AddString(hWC,"6");     ComboBox_AddString(hWC,"7");     ComboBox_AddString(hWC,"8");     ComboBox_SetCurSel(hWC,RECORD_FRAME_RATE_SCALE);     CheckDlgButton(hW,IDC_COMPRESSION1,RECORD_COMPRESSION_MODE==0);     CheckDlgButton(hW,IDC_COMPRESSION2,RECORD_COMPRESSION_MODE==1);     RefreshCodec(hW);    }   case WM_COMMAND:    {     switch(LOWORD(wParam))      {       case IDC_RECCFG:	    {		if(IsDlgButtonChecked(hW,IDC_COMPRESSION1))			{			BITMAPINFOHEADER bitmap = {40,640,480,1,16,0,640*480*2,2048,2048,0,0};			if(!ICCompressorChoose(hW,ICMF_CHOOSE_DATARATE|ICMF_CHOOSE_KEYFRAME,&bitmap,NULL,&RECORD_COMPRESSION1,"16 bit Compression")) return TRUE;			if(RECORD_COMPRESSION1.cbState>sizeof(RECORD_COMPRESSION_STATE1))				{				memset(&RECORD_COMPRESSION1,0,sizeof(RECORD_COMPRESSION1));				memset(&RECORD_COMPRESSION_STATE1,0,sizeof(RECORD_COMPRESSION_STATE1));				RECORD_COMPRESSION1.cbSize	= sizeof(RECORD_COMPRESSION1);				}			else				{				if(RECORD_COMPRESSION1.lpState!=RECORD_COMPRESSION_STATE1)					memcpy(RECORD_COMPRESSION_STATE1,RECORD_COMPRESSION1.lpState,RECORD_COMPRESSION1.cbState);				}			RECORD_COMPRESSION1.lpState = RECORD_COMPRESSION_STATE1;			}		else			{			BITMAPINFOHEADER bitmap = {40,640,480,1,24,0,640*480*3,2048,2048,0,0};			if(!ICCompressorChoose(hW,ICMF_CHOOSE_DATARATE|ICMF_CHOOSE_KEYFRAME,&bitmap,NULL,&RECORD_COMPRESSION2,"24 bit Compression")) return TRUE;			if(RECORD_COMPRESSION2.cbState>sizeof(RECORD_COMPRESSION_STATE2))				{				memset(&RECORD_COMPRESSION2,0,sizeof(RECORD_COMPRESSION2));				memset(&RECORD_COMPRESSION_STATE2,0,sizeof(RECORD_COMPRESSION_STATE2));				RECORD_COMPRESSION2.cbSize	= sizeof(RECORD_COMPRESSION2);				}			else				{				if(RECORD_COMPRESSION2.lpState!=RECORD_COMPRESSION_STATE2)					memcpy(RECORD_COMPRESSION_STATE2,RECORD_COMPRESSION2.lpState,RECORD_COMPRESSION2.cbState);				}			RECORD_COMPRESSION2.lpState = RECORD_COMPRESSION_STATE2;			}		RefreshCodec(hW);		return TRUE;		}       case IDCANCEL: EndDialog(hW,FALSE);return TRUE;       case IDOK:             {		HWND hWC;		if(IsDlgButtonChecked(hW,IDC_REC_MODE1))	RECORD_RECORDING_MODE = 0;		else										RECORD_RECORDING_MODE = 1;		hWC = GetDlgItem(hW,IDC_VIDEO_SIZE);		RECORD_VIDEO_SIZE = ComboBox_GetCurSel(hWC);		RECORD_RECORDING_WIDTH = GetDlgItemInt(hW,IDC_REC_WIDTH,NULL,FALSE);		RECORD_RECORDING_HEIGHT = GetDlgItemInt(hW,IDC_REC_HEIGHT,NULL,FALSE);		hWC = GetDlgItem(hW,IDC_FRAME_RATE);		RECORD_FRAME_RATE_SCALE = ComboBox_GetCurSel(hWC);		if(IsDlgButtonChecked(hW,IDC_COMPRESSION1))	RECORD_COMPRESSION_MODE = 0;		else										RECORD_COMPRESSION_MODE = 1;        EndDialog(hW,TRUE);        return TRUE;        }      }    }  } return FALSE;//.........这里部分代码省略.........
开发者ID:Asmodean-,项目名称:PCSXR,代码行数:101,


示例23: switch

//.........这里部分代码省略.........			modeless_dialog_manager::g_remove(wnd);			SetWindowLongPtr(wnd, DWL_USER, NULL);			delete this;		}		break;	case WM_ERASEBKGND:		SetWindowLongPtr(wnd, DWL_MSGRESULT, TRUE);		return TRUE;	case WM_PAINT:		ui_helpers::innerWMPaintModernBackground(wnd, GetDlgItem(wnd, IDOK));		return TRUE;	case WM_CTLCOLORSTATIC:		SetBkColor((HDC)wp, GetSysColor(COLOR_WINDOW));		SetTextColor((HDC)wp, GetSysColor(COLOR_WINDOWTEXT));		return (BOOL)GetSysColorBrush(COLOR_WINDOW);	case WM_CLOSE:		if (m_modal)		{			SendMessage(wnd, WM_COMMAND, IDCANCEL, NULL);			return TRUE;		}		break;	case WM_TIMER:		if (wp == timer_id) on_timer();		break;	case WM_COMMAND:		switch (LOWORD(wp))		{		case IDOK:			if (m_modal)				EndDialog(wnd, 1);			return TRUE;		case IDCANCEL:			if (m_modal)				EndDialog(wnd, 0);			else			{				DestroyWindow(wnd);			}			return TRUE;		case IDC_GEN_COLOUR:			colour_code_gen(wnd, IDC_COLOUR_CODE, false, false);			break;		case IDC_GEN_FONT:			m_font_code_generator.run(wnd, IDC_FONT_CODE);			break;		case IDC_SCRIPT:			switch (HIWORD(wp))			{			case EN_CHANGE:				m_script = string_utf8_from_window(HWND(lp));				if (!m_modal)					start_timer();				break;			}			break;		case IDC_EDGESTYLE:			switch (HIWORD(wp))			{			case CBN_SELCHANGE:				m_edge_style = ComboBox_GetCurSel((HWND)lp);				if (!m_modal)				{					m_this->set_edge_style(m_edge_style);					cfg_item_details_edge_style = m_edge_style;				}				break;			}			break;		case IDC_HALIGN:			switch (HIWORD(wp))			{			case CBN_SELCHANGE:				m_horizontal_alignment = ComboBox_GetCurSel((HWND)lp);				if (!m_modal)				{					m_this->set_horizontal_alignment(m_horizontal_alignment);					cfg_item_details_horizontal_alignment = m_horizontal_alignment;				}				break;			}			break;		case IDC_VALIGN:			switch (HIWORD(wp))			{			case CBN_SELCHANGE:				m_vertical_alignment = ComboBox_GetCurSel((HWND)lp);				if (!m_modal)				{					m_this->set_vertical_alignment(m_vertical_alignment);					cfg_item_details_vertical_alignment = m_vertical_alignment;				}				break;			}			break;		}		break;	}	return FALSE;}
开发者ID:9060,项目名称:columns_ui,代码行数:101,


示例24: switch

//.........这里部分代码省略.........			case ID_DEBUG_TOGGLEBOTTOMTABTITLES:				bottomTabs->SetShowTabTitles(!bottomTabs->GetShowTabTitles());				break;			case IDC_SHOWVFPU:				vfpudlg->Show(true);				break;			case IDC_FUNCTIONLIST: 				switch (HIWORD(wParam))				{				case CBN_DBLCLK:					{						HWND lb = GetDlgItem(m_hDlg,LOWORD(wParam));						int n = ListBox_GetCurSel(lb);						if (n!=-1)						{							unsigned int addr = (unsigned int)ListBox_GetItemData(lb,n);							ptr->gotoAddr(addr);							SetFocus(GetDlgItem(m_hDlg, IDC_DISASMVIEW));						}					}					break;				};				break;			case IDC_GOTOINT:				switch (HIWORD(wParam))				{				case LBN_SELCHANGE:					{						HWND lb =GetDlgItem(m_hDlg,LOWORD(wParam));						int n = ComboBox_GetCurSel(lb);						unsigned int addr = (unsigned int)ComboBox_GetItemData(lb,n);						if (addr != 0xFFFFFFFF)						{							ptr->gotoAddr(addr);							SetFocus(GetDlgItem(m_hDlg, IDC_DISASMVIEW));						}					}					break;				};				break;			case IDC_STOPGO:				{					if (!Core_IsStepping())		// stop					{						ptr->setDontRedraw(false);						SetDebugMode(true, true);						Core_EnableStepping(true);						_dbg_update_();						Sleep(1); //let cpu catch up						ptr->gotoPC();						UpdateDialog();						vfpudlg->Update();					} else {					// go						lastTicks = CoreTiming::GetTicks();						// If the current PC is on a breakpoint, the user doesn't want to do nothing.						CBreakPoints::SetSkipFirst(currentMIPS->pc);						SetDebugMode(false, true);						Core_EnableStepping(false);					}
开发者ID:Jabnin,项目名称:ppsspp,代码行数:67,


示例25: UpdateCallback

/* * Update policy and settings dialog callback */INT_PTR CALLBACK UpdateCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam){	HWND hPolicy;	static HWND hFrequency, hBeta;	int32_t freq;	char update_policy_text[4096];	switch (message) {	case WM_INITDIALOG:		set_title_bar_icon(hDlg);		center_dialog(hDlg);		hFrequency = GetDlgItem(hDlg, IDC_UPDATE_FREQUENCY);		hBeta = GetDlgItem(hDlg, IDC_INCLUDE_BETAS);		IGNORE_RETVAL(ComboBox_SetItemData(hFrequency, ComboBox_AddStringU(hFrequency, "Disabled"), -1));		IGNORE_RETVAL(ComboBox_SetItemData(hFrequency, ComboBox_AddStringU(hFrequency, "Daily (Default)"), 86400));		IGNORE_RETVAL(ComboBox_SetItemData(hFrequency, ComboBox_AddStringU(hFrequency, "Weekly"), 604800));		IGNORE_RETVAL(ComboBox_SetItemData(hFrequency, ComboBox_AddStringU(hFrequency, "Monthly"), 2629800));		freq = ReadRegistryKey32(REGKEY_HKCU, REGKEY_UPDATE_INTERVAL);		EnableWindow(GetDlgItem(hDlg, IDC_CHECK_NOW), (freq != 0));		EnableWindow(hBeta, (freq >= 0));		switch(freq) {		case -1:			IGNORE_RETVAL(ComboBox_SetCurSel(hFrequency, 0));			break;		case 0:		case 86400:			IGNORE_RETVAL(ComboBox_SetCurSel(hFrequency, 1));			break;		case 604800:			IGNORE_RETVAL(ComboBox_SetCurSel(hFrequency, 2));			break;		case 2629800:			IGNORE_RETVAL(ComboBox_SetCurSel(hFrequency, 3));			break;		default:			IGNORE_RETVAL(ComboBox_SetItemData(hFrequency, ComboBox_AddStringU(hFrequency, "Custom"), freq));			IGNORE_RETVAL(ComboBox_SetCurSel(hFrequency, 4));			break;		}		IGNORE_RETVAL(ComboBox_AddStringU(hBeta, "Yes"));		IGNORE_RETVAL(ComboBox_AddStringU(hBeta, "No"));		IGNORE_RETVAL(ComboBox_SetCurSel(hBeta, GetRegistryKeyBool(REGKEY_HKCU, REGKEY_INCLUDE_BETAS)?0:1));		hPolicy = GetDlgItem(hDlg, IDC_POLICY);		SendMessage(hPolicy, EM_AUTOURLDETECT, 1, 0);		safe_sprintf(update_policy_text, sizeof(update_policy_text), update_policy);		SendMessageA(hPolicy, EM_SETTEXTEX, (WPARAM)&friggin_microsoft_unicode_amateurs, (LPARAM)update_policy_text);		SendMessage(hPolicy, EM_SETSEL, -1, -1);		SendMessage(hPolicy, EM_SETEVENTMASK, 0, ENM_LINK);		SendMessageA(hPolicy, EM_SETBKGNDCOLOR, 0, (LPARAM)GetSysColor(COLOR_BTNFACE));		break;	case WM_COMMAND:		switch (LOWORD(wParam)) {		case IDCLOSE:		case IDCANCEL:			EndDialog(hDlg, LOWORD(wParam));			return (INT_PTR)TRUE;		case IDC_CHECK_NOW:			CheckForUpdates(TRUE);			return (INT_PTR)TRUE;		case IDC_UPDATE_FREQUENCY:			if (HIWORD(wParam) != CBN_SELCHANGE)				break;			freq = (int32_t)ComboBox_GetItemData(hFrequency, ComboBox_GetCurSel(hFrequency));			WriteRegistryKey32(REGKEY_HKCU, REGKEY_UPDATE_INTERVAL, (DWORD)freq);			EnableWindow(hBeta, (freq >= 0));			return (INT_PTR)TRUE;		case IDC_INCLUDE_BETAS:			if (HIWORD(wParam) != CBN_SELCHANGE)				break;			SetRegistryKeyBool(REGKEY_HKCU, REGKEY_INCLUDE_BETAS, ComboBox_GetCurSel(hBeta) == 0);			return (INT_PTR)TRUE;		}		break;	}	return (INT_PTR)FALSE;}
开发者ID:pbatard,项目名称:libwdi,代码行数:79,


示例26: CustomEntryDlgProc

//.........这里部分代码省略.........            }                                if (hComboBox)            {                // select the item we have in the entry                ComboBox_SelectString(hComboBox, -1, lpRasEntry->szDeviceName);            }            // move dialog and position according to structure paramters            // NOTE: we don't take into account multiple monitors or extreme            // cases here as this is only a quick sample                        DWORD xPos = 0;         // x coordinate position for centering            DWORD yPos = 0;         // y coordinate position for centering            if (lpInfo->dwFlags & RASDDFLAG_PositionDlg)            {                xPos = lpInfo->xDlg;                yPos = lpInfo->yDlg;            }            else            {                RECT rectTop;         // parent rectangle used for centering                RECT rectDlg;         // dialog rectangle used for centering                // center window within the owner or desktop                GetWindowRect(lpInfo->hwndOwner != NULL ? lpInfo->hwndOwner : GetDesktopWindow(), &rectTop);                GetWindowRect(hwndDlg, &rectDlg);                                         xPos = ((rectTop.left + rectTop.right) / 2) - ((rectDlg.right - rectDlg.left) / 2);                yPos = ((rectTop.top + rectTop.bottom) / 2) - ((rectDlg.bottom - rectDlg.top) / 2);            }            SetWindowPos(hwndDlg, NULL, xPos, yPos, 0, 0, SWP_NOSIZE | SWP_NOZORDER | SWP_NOACTIVATE);            return TRUE;        }    case WM_COMMAND:        switch (LOWORD(wParam))        {        case IDOK:                      {            TCHAR szEntryName[RAS_MaxEntryName + 1] = {0};  // Entry name            TCHAR szPhoneBook[MAX_PATH + 1] = {0};          // Phonebook path            TCHAR szPhoneNumber[RAS_MaxPhoneNumber + 1] = {0};            // copy back the phonenumber, entry name, & device name            hEditBox = GetDlgItem(hwndDlg, IDC_EDIT_PHONENO);            if (hEditBox)            {                Edit_GetText(hEditBox, lpRasEntry->szLocalPhoneNumber, CELEMS(lpRasEntry->szLocalPhoneNumber));            }                      hEditBox = GetDlgItem(hwndDlg, IDC_EDIT_ENTRYNAME);                      if (hEditBox)            {                Edit_GetText(hEditBox, szEntryName, CELEMS(szEntryName));            }                          hEditBox = GetDlgItem(hwndDlg, IDC_EDIT_PHONENO);            if (hEditBox)            {                Edit_GetText(hEditBox, szPhoneNumber, CELEMS(szPhoneNumber));            }            hComboBox = GetDlgItem(hwndDlg, IDC_LIST_MODEMS);                      if (hComboBox)            {                ComboBox_GetLBText(hComboBox, ComboBox_GetCurSel(hComboBox), lpRasEntry->szDeviceName);            }                        if (!pData) return FALSE;            // Check entry name for validity            StringCchCopy(szPhoneBook, CELEMS(szPhoneBook), (LPTSTR)pData->szPhoneBookPath);                      if (RasValidateEntryName(szPhoneBook, szEntryName) == ERROR_INVALID_NAME)            {                MessageBox(hwndDlg, L"The Entry Name is Invalid.", L"Entry name error", MB_OK);            }            else                      {                StringCchCopy(pData->szEntryName, CELEMS(pData->szEntryName), szEntryName);                StringCchCopy(lpRasEntry->szLocalPhoneNumber, CELEMS(lpRasEntry->szLocalPhoneNumber), szPhoneNumber);                                EndDialog(hwndDlg, TRUE);            }                        return TRUE;            }        case IDCANCEL:            EndDialog(hwndDlg, FALSE);            return TRUE;        }        break;          }    return FALSE;}
开发者ID:Essjay1,项目名称:Windows-classic-samples,代码行数:101,


示例27: Dlg_OnCommand

void Dlg_OnCommand(HWND hwnd, int id, HWND hwndCtl, UINT codeNotify) {   static BOOL s_fProcesses = TRUE;   switch (id)    {      case IDCANCEL:         EndDialog(hwnd, id);         break;      /* Restart the application when we are not running        * as Elevated Administrator.	   */      case IDC_BTN_SYSTEM_PROCESSES: 	  {         /* Hide ourself before trying to start the same application          * but with elevated privileges.		  */         ShowWindow(hwnd, SW_HIDE);         TCHAR szApplication[MAX_PATH];         DWORD cchLength = _countof(szApplication);         /* Retrieves the full name of the executable 		  * image for the specified process.		  * hProcess [in]          *   A handle to the process. 		  *   This handle must be created with the PROCESS_QUERY_INFORMATION 		  *   or PROCESS_QUERY_LIMITED_INFORMATION access right. 		  *   For more information, see Process Security and Access Rights.		  * dwFlags [in]          *   This parameter can be one of the following values.		  *   0 The name should use the Win32 path format.		  *     The name should use the native system path format.		  * lpExeName [out]          *   The path to the executable image. 		  *   If the function succeeds, this string is null-terminated. 		  * lpdwSize [in, out]          *   On input, specifies the size of the lpExeName buffer, in characters. 		  *   On success, receives the number of characters written to the buffer, 		  *   not including the null-terminating character.		  */         QueryFullProcessImageName(            GetCurrentProcess(), 			0, 			szApplication, 			&cchLength);         DWORD dwStatus = StartElevatedProcess(szApplication, NULL);         if (dwStatus == S_OK) 		 {            /* not need to keep on working under lower privileges. */            ExitProcess(0);         }                  /* In case of error, show up again. */         ShowWindow(hwnd, SW_SHOWNORMAL);      }      break;      case ID_PROCESSES:         s_fProcesses = TRUE;         EnableMenuItem(GetMenu(hwnd), ID_VMMAP, MF_BYCOMMAND | MF_ENABLED);         DrawMenuBar(hwnd);         Dlg_PopulateProcessList(hwnd);         break;      case ID_MODULES:         EnableMenuItem(GetMenu(hwnd), ID_VMMAP, MF_BYCOMMAND | MF_GRAYED);         DrawMenuBar(hwnd);         s_fProcesses = FALSE;         Dlg_PopulateModuleList(hwnd);         break;      case IDC_PROCESSMODULELIST:         if (codeNotify == CBN_SELCHANGE) {            DWORD dw = ComboBox_GetCurSel(hwndCtl);            if (s_fProcesses) {               dw = (DWORD) ComboBox_GetItemData(hwndCtl, dw); // Process ID               ShowProcessInfo(GetDlgItem(hwnd, IDC_RESULTS), dw);            } else {               // Index in helper listbox of full path               dw = (DWORD) ComboBox_GetItemData(hwndCtl, dw);                TCHAR szModulePath[1024];               ListBox_GetText(GetDlgItem(hwnd, IDC_MODULEHELP),                dw, szModulePath);               ShowModuleInfo(GetDlgItem(hwnd, IDC_RESULTS), szModulePath);            }         }         break;      case ID_VMMAP: {         TCHAR szCmdLine[32];         HWND hwndCB = GetDlgItem(hwnd, IDC_PROCESSMODULELIST);         DWORD dwProcessId = (DWORD)            ComboBox_GetItemData(hwndCB, ComboBox_GetCurSel(hwndCB));         StringCchPrintf(szCmdLine, _countof(szCmdLine), TEXT("%d"),             dwProcessId);         DWORD dwStatus = //.........这里部分代码省略.........
开发者ID:melvinvarkey,项目名称:ANCI_C_Training,代码行数:101,


示例28: ChangeDeviceProc

//************************************************************************************// ChangeDeviceProc()// Windows message handling function for the device select dialog//************************************************************************************static BOOL CALLBACK ChangeDeviceProc(HWND hDlg, UINT uiMsg, WPARAM wParam,                                      LPARAM lParam){	static D3DEnum_DeviceInfo ** ppDeviceArg;	static D3DEnum_DeviceInfo * pCurrentDevice;	static DWORD dwCurrentMode;	static BOOL  bCurrentWindowed;	static BOOL  bCurrentStereo;	// Get access to the enumerated device list	D3DEnum_DeviceInfo * pDeviceList;	DWORD               dwNumDevices;	D3DEnum_GetDevices(&pDeviceList, &dwNumDevices);	// Handle the initialization message	if (WM_INITDIALOG == uiMsg)	{		// Get the app's current device, passed in as an lParam argument		ppDeviceArg = (D3DEnum_DeviceInfo **)lParam;		if (NULL == ppDeviceArg)			return FALSE;		// Setup temp storage pointers for dialog		pCurrentDevice = (*ppDeviceArg);		dwCurrentMode    = pCurrentDevice->dwCurrentMode;		bCurrentWindowed = pCurrentDevice->bWindowed;		bCurrentStereo   = pCurrentDevice->bStereo;		UpdateDialogControls(hDlg, pCurrentDevice, dwCurrentMode,		                     bCurrentWindowed, bCurrentStereo);		return TRUE;	}	else if (WM_COMMAND == uiMsg)	{		HWND hwndDevice   = GetDlgItem(hDlg, IDC_DEVICE_COMBO);		HWND hwndMode     = GetDlgItem(hDlg, IDC_MODE_COMBO);		HWND hwndWindowed = GetDlgItem(hDlg, IDC_WINDOWED_CHECKBOX);		HWND hwndStereo   = GetDlgItem(hDlg, IDC_STEREO_CHECKBOX);		// Get current UI state		DWORD dwDevice   = ComboBox_GetCurSel(hwndDevice);		DWORD dwModeItem = ComboBox_GetCurSel(hwndMode);		DWORD dwMode     = ComboBox_GetItemData(hwndMode, dwModeItem);		BOOL  bWindowed  = hwndWindowed ? Button_GetCheck(hwndWindowed) : 0;		BOOL  bStereo    = hwndStereo   ? Button_GetCheck(hwndStereo)   : 0;		D3DEnum_DeviceInfo * pDevice = &pDeviceList[dwDevice];		if (IDOK == LOWORD(wParam))		{			// Handle the case when the user hits the OK button. Check if any			// of the options were changed			if (pDevice != pCurrentDevice || dwMode != dwCurrentMode ||			        bWindowed != bCurrentWindowed || bStereo != bCurrentStereo)			{				// Return the newly selected device and its new properties				(*ppDeviceArg)              = pDevice;				pDevice->bWindowed          = FALSE;				pDevice->bStereo            = FALSE;				pDevice->dwCurrentMode      = dwMode;				pDevice->ddsdFullscreenMode = pDevice->pddsdModes[dwMode];				EndDialog(hDlg, IDOK);			}			else				EndDialog(hDlg, IDCANCEL);			return TRUE;		}		else if (IDCANCEL == LOWORD(wParam))		{			// Handle the case when the user hits the Cancel button			EndDialog(hDlg, IDCANCEL);			return TRUE;		}		else if (CBN_SELENDOK == HIWORD(wParam))		{			if (LOWORD(wParam) == IDC_DEVICE_COMBO)			{				// Handle the case when the user chooses the device combo				dwMode    = pDeviceList[dwDevice].dwCurrentMode;				bWindowed = pDeviceList[dwDevice].bWindowed;				bStereo   = pDeviceList[dwDevice].bStereo;			}		}		// Keep the UI current		UpdateDialogControls(hDlg, &pDeviceList[dwDevice], dwMode, bWindowed, bStereo);		return TRUE;	}	return FALSE;}
开发者ID:okready,项目名称:ArxFatalis,代码行数:99,


示例29: InterfaceDialogProc

//.........这里部分代码省略.........			cc.lStructSize = sizeof(CHOOSECOLOR);			cc.hwndOwner   = hDlg;			cc.rgbResult   = GetScreenshotBorderColor();			cc.lpCustColors = choice_colors;			cc.Flags       = CC_ANYCOLOR | CC_RGBINIT | CC_SOLIDCOLOR;			if (!ChooseColor(&cc))				return TRUE;			for (i=0;i<16;i++)				SetCustomColor(i,choice_colors[i]);			SetScreenshotBorderColor(cc.rgbResult);			UpdateScreenShot();			return TRUE;		}		case IDOK :		{			BOOL checked = FALSE;			SetGameCheck(Button_GetCheck(GetDlgItem(hDlg, IDC_START_GAME_CHECK)));			SetJoyGUI(Button_GetCheck(GetDlgItem(hDlg, IDC_JOY_GUI)));			SetKeyGUI(Button_GetCheck(GetDlgItem(hDlg, IDC_KEY_GUI)));			SetBroadcast(Button_GetCheck(GetDlgItem(hDlg, IDC_BROADCAST)));			SetRandomBackground(Button_GetCheck(GetDlgItem(hDlg, IDC_RANDOM_BG)));			SetHideMouseOnStartup(Button_GetCheck(GetDlgItem(hDlg,IDC_HIDE_MOUSE)));			if( Button_GetCheck(GetDlgItem(hDlg,IDC_RESET_PLAYCOUNT ) ) )			{				ResetPlayCount( -1 );				bRedrawList = TRUE;			}			if( Button_GetCheck(GetDlgItem(hDlg,IDC_RESET_PLAYTIME ) ) )			{				ResetPlayTime( -1 );				bRedrawList = TRUE;			}			value = SendDlgItemMessage(hDlg,IDC_CYCLETIMESEC, TBM_GETPOS, 0, 0);			if( GetCycleScreenshot() != value )			{				SetCycleScreenshot(value);			}			value = SendDlgItemMessage(hDlg,IDC_SCREENSHOT_BORDERSIZE, TBM_GETPOS, 0, 0);			if( GetScreenshotBorderSize() != value )			{				SetScreenshotBorderSize(value);				UpdateScreenShot();			}			value = SendDlgItemMessage(hDlg,IDC_HIGH_PRIORITY, TBM_GETPOS, 0, 0);			checked = Button_GetCheck(GetDlgItem(hDlg,IDC_STRETCH_SCREENSHOT_LARGER));			if (checked != GetStretchScreenShotLarger())			{				SetStretchScreenShotLarger(checked);				UpdateScreenShot();			}			checked = Button_GetCheck(GetDlgItem(hDlg,IDC_FILTER_INHERIT));			if (checked != GetFilterInherit())			{				SetFilterInherit(checked);				// LineUpIcons does just a ResetListView(), which is what we want here				PostMessage(GetMainWindow(),WM_COMMAND, MAKEWPARAM(ID_VIEW_LINEUPICONS, FALSE),(LPARAM)NULL);			}			checked = Button_GetCheck(GetDlgItem(hDlg,IDC_NOOFFSET_CLONES));			if (checked != GetOffsetClones())			{				SetOffsetClones(checked);				// LineUpIcons does just a ResetListView(), which is what we want here				PostMessage(GetMainWindow(),WM_COMMAND, MAKEWPARAM(ID_VIEW_LINEUPICONS, FALSE),(LPARAM)NULL);			}			nCurSelection = ComboBox_GetCurSel(GetDlgItem(hDlg,IDC_SNAPNAME));			if (nCurSelection != CB_ERR) {				const char* snapname_selection = (const char*)ComboBox_GetItemData(GetDlgItem(hDlg,IDC_SNAPNAME), nCurSelection);				if (snapname_selection) {					SetSnapName(snapname_selection);				}			}			EndDialog(hDlg, 0);			nCurSelection = ComboBox_GetCurSel(GetDlgItem(hDlg,IDC_HISTORY_TAB));			if (nCurSelection != CB_ERR)				nHistoryTab = ComboBox_GetItemData(GetDlgItem(hDlg,IDC_HISTORY_TAB), nCurSelection);			EndDialog(hDlg, 0);			if( GetHistoryTab() != nHistoryTab )			{				SetHistoryTab(nHistoryTab, TRUE);				ResizePickerControls(GetMainWindow());				UpdateScreenShot();			}			if( bRedrawList )			{				UpdateListView();			}			return TRUE;		}		case IDCANCEL :			EndDialog(hDlg, 0);			return TRUE;		}		break;	}	return 0;}
开发者ID:rogerjowett,项目名称:ClientServerMAME,代码行数:101,



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


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