本文整理匯總了C++中GetCheckedRadioButton函數的典型用法代碼示例。如果您正苦於以下問題:C++ GetCheckedRadioButton函數的具體用法?C++ GetCheckedRadioButton怎麽用?C++ GetCheckedRadioButton使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了GetCheckedRadioButton函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: OnBnClickedOk
void CPullFetchDlg::OnBnClickedOk()
{
this->UpdateData();
if( GetCheckedRadioButton(IDC_REMOTE_RD,IDC_OTHER_RD) == IDC_REMOTE_RD)
{
m_RemoteURL=m_Remote.GetString();
m_bAllRemotes = (m_Remote.GetCurSel() == 0 && m_Remote.GetCount() > 1 && !m_IsPull);
if( !m_IsPull ||
(m_configPullRemote == m_RemoteURL && m_configPullBranch == m_RemoteBranch.GetString() ))
//When fetching or when pulling from the configured tracking branch, dont explicitly set the remote branch name,
//because otherwise git will not update the remote tracking branches.
m_RemoteBranchName.Empty();
else
m_RemoteBranchName=m_RemoteBranch.GetString();
}
if( GetCheckedRadioButton(IDC_REMOTE_RD,IDC_OTHER_RD) == IDC_OTHER_RD)
{
m_Other.GetWindowTextW(m_RemoteURL);
m_RemoteBranchName=m_RemoteBranch.GetString();
// only store URL in history if it's value was used
m_Other.SaveHistory();
}
m_RemoteReg = m_Remote.GetString();
m_RemoteBranch.SaveHistory();
this->m_regRebase=this->m_bRebase;
m_regFFonly = m_bFFonly;
m_regAutoLoadPutty = m_bAutoLoad;
this->OnOK();
}
示例2: GetCheckedRadioButton
void CSQLiteTestDlg::GoSort()
{
bool asc = GetCheckedRadioButton(IDC_ASC, IDC_DESC) == IDC_ASC;
int idsort = GetCheckedRadioButton(IDC_SNONE, IDC_YEAR);
CString sort;
switch (idsort) {
case IDC_MAKE:
sort = "Make";
break;
case IDC_MODEL:
sort = "Model";
break;
case IDC_YEAR:
sort = "Year";
break;
case IDC_OWNER:
sort = "Owner";
break;
case IDC_SNONE:
default:
sort = "";
}
CString cs;
if (!sort.IsEmpty()) {
cs.Format("[%s] %s", sort, (asc) ? "ASC" : "DESC");
//the SQL sort line looks like: "[Foo] ASC, [Boo] DESC"
}
m_cars.SetSort(cs);
m_cars.Query();
LoadList();
}
示例3: OnBnClickedOk
void CPushDlg::OnBnClickedOk()
{
CHorizontalResizableStandAloneDialog::UpdateData(TRUE);
if( GetCheckedRadioButton(IDC_RD_REMOTE,IDC_RD_URL) == IDC_RD_REMOTE)
{
m_URL=m_Remote.GetString();
}
if( GetCheckedRadioButton(IDC_RD_REMOTE,IDC_RD_URL) == IDC_RD_URL)
{
m_URL=m_RemoteURL.GetString();
}
if (!m_bPushAllBranches)
{
this->m_BranchRemoteName=m_BranchRemote.GetString().Trim();
this->m_BranchSourceName=m_BranchSource.GetString();
if(!m_BranchRemoteName.IsEmpty() && !g_Git.IsBranchNameValid(this->m_BranchRemoteName))
{
CMessageBox::Show(NULL, IDS_B_T_NOTEMPTY, IDS_TORTOISEGIT, MB_OK);
return;
}
this->m_RemoteURL.SaveHistory();
this->m_BranchRemote.SaveHistory();
m_RemoteReg = m_Remote.GetString();
}
this->m_regAutoLoad = m_bAutoLoad ;
CHorizontalResizableStandAloneDialog::OnOK();
}
示例4: OnBnClickedRd
void CPullFetchDlg::OnBnClickedRd()
{
if( GetCheckedRadioButton(IDC_REMOTE_RD,IDC_OTHER_RD) == IDC_REMOTE_RD)
{
m_Remote.EnableWindow(TRUE);
m_Other.EnableWindow(FALSE);
if(!m_IsPull)
m_RemoteBranch.EnableWindow(FALSE);
}
if( GetCheckedRadioButton(IDC_REMOTE_RD,IDC_OTHER_RD) == IDC_OTHER_RD)
{
CString clippath = CAppUtils::GetClipboardLink(m_IsPull ? _T("git pull") : _T("git fetch"), 1);
if (clippath.IsEmpty())
m_Other.SetCurSel(0);
else
{
int argSeparator = clippath.Find(' ');
if (argSeparator > 1 && clippath.GetLength() > argSeparator + 2)
{
m_Other.SetWindowText(clippath.Left(argSeparator));
m_RemoteBranch.SetWindowText(clippath.Mid(argSeparator + 1));
}
else
m_Other.SetWindowText(clippath);
}
m_Remote.EnableWindow(FALSE);
m_Other.EnableWindow(TRUE);;
if(!m_IsPull)
m_RemoteBranch.EnableWindow(TRUE);
}
}
示例5: IsDlgButtonChecked
BOOL COptionsGrid::OnApply()
{
ShowGrid = IsDlgButtonChecked(GRIDBOX_SHOW);
SnapGrid = IsDlgButtonChecked(GRIDBOX_SNAP);
int hold = GetCheckedRadioButton(GRIDBOX_MM,GRIDBOX_INCHES);
if (hold == GRIDBOX_MM)
Units = 0;
else
Units = 1;
hold = GetCheckedRadioButton(GRIDBOX_NORMAL,GRIDBOX_USER);
switch (hold)
{
case GRIDBOX_NORMAL:
Grid = NormalGrid;
break;
case GRIDBOX_FINE:
Grid = FineGrid;
break;
case GRIDBOX_USER:
{
CString s;
GetDlgItemText(GRIDBOX_SPACING,s);
Grid = _tstof( s );
if (Units == 0)
Grid = (Grid * static_cast<double>(PIXELSPERMM));
else
Grid = (Grid * 254.0 * PIXELSPERMM) / 1000.0;
break;
}
}
if (Grid <=0 )
{
Grid = FineGrid;
}
// Write these settings back
TransformSnap* pSnap = &(GetDocument()->m_snap);
pSnap->SetAccurateGrid(Grid);
pSnap->SetGridSnap( SnapGrid );
GetDocument()->GetOptions()->SetGridShow( ShowGrid == TRUE );
GetDocument()->GetOptions()->SetUnits( Units == TRUE );
// Write the settings to the registry
CRegistry::Set("ShowGrid",ShowGrid);
CRegistry::Set("Units",Units);
CRegistry::Set("Grid",Grid);
return CPropertyPage::OnApply();
}
示例6: pLock
void CAvatarDlg::OnOK()
{
if ( ! UpdateData() )
return;
{
CSingleLock pLock( &theApp.m_pSection, TRUE );
if ( ! theApp.IsValid( m_pAvatar ) )
{
EndDialog( IDCANCEL );
return;
}
{
int nOnline = GetCheckedRadioButton( IDC_ONLINE_NO_SOUND, IDC_ONLINE_CUSTOM );
CString sOnlineSound;
switch ( nOnline )
{
case IDC_ONLINE_NO_SOUND:
sOnlineSound = NO_SOUND;
break;
case IDC_ONLINE_DEFAULT:
break;
case IDC_ONLINE_CUSTOM:
m_wndOnlineSound.GetWindowText( sOnlineSound );
break;
}
m_pAvatar->m_sOnlineSound = sOnlineSound;
}
{
int nOffline = GetCheckedRadioButton( IDC_OFFLINE_NO_SOUND, IDC_OFFLINE_CUSTOM );
CString sOfflineSound;
switch ( nOffline )
{
case IDC_OFFLINE_NO_SOUND:
sOfflineSound = NO_SOUND;
break;
case IDC_OFFLINE_DEFAULT:
break;
case IDC_OFFLINE_CUSTOM:
m_wndOfflineSound.GetWindowText( sOfflineSound );
break;
}
m_pAvatar->m_sOfflineSound = sOfflineSound;
}
m_pAvatar->m_bLoopSound = m_bLoop;
theApp.Refresh( TRUE, m_pAvatar );
}
__super::OnOK();
}
示例7: pConfig
//----- OnBnClickedBtConvert() ----------------------------------------------
void CFormChunkMergeView::OnBnClickedBtConvert()
{
Configuration* pConfig (Configuration::getInstance());
CComboBox* pCBox ((CComboBox*) GetDlgItem(IDC_CB_MAT_SINGLE));
NifCollisionUtility ncUtility(*(NifUtlMaterialList::getInstance()));
map<int, unsigned int> materialMap;
unsigned short ncReturn (NCU_OK);
// store data
UpdateData(TRUE);
// build full texture path and set to utility
ncUtility.setSkyrimPath(pConfig->getPathTextures());
// set callback for log info
ncUtility.setLogCallback(logCallback);
// get material handling
MaterialTypeHandling matHandling((MaterialTypeHandling) (GetCheckedRadioButton(IDC_RD_MAT_SINGLE, IDC_RD_MAT_DEFINE) - IDC_RD_MAT_SINGLE));
// set default material
materialMap[-1] = ((unsigned int) pCBox->GetItemDataPtr(pCBox->GetCurSel()));
// add additional materials in case of special handling
if (matHandling == NCU_MT_MATMAP)
{
// do something special
}
// set flags
ncUtility.setCollisionNodeHandling((CollisionNodeHandling) (GetCheckedRadioButton(IDC_RD_COLL_CDATA, IDC_RD_COLL_MESH) - IDC_RD_COLL_CDATA));
ncUtility.setMaterialTypeHandling (matHandling, materialMap);
ncUtility.setDefaultMaterial (materialMap[-1]);
ncUtility.setMergeCollision (((CButton*) GetDlgItem(IDC_RD_COLL_GLOBAL)) ->GetCheck() == TRUE);
ncUtility.setReorderTriangles (((CButton*) GetDlgItem(IDC_CK_REORDER_TRIS))->GetCheck() == TRUE);
// add collision data to nif
ncReturn = ncUtility.addCollision(CStringA(_fileNameColl).GetString(), CStringA(_fileNameIn).GetString(), pConfig->getPathTemplates() + "\\" + CStringA(_template).GetString());
// decode result
if (ncReturn == NCU_OK)
{
LogMessageObject::LogMessage(NCU_MSG_TYPE_SUCCESS, "Collision data added successfully");
}
else
{
LogMessageObject::LogMessage(NCU_MSG_TYPE_ERROR, "NifCollision returned code: %d", ncReturn);
}
LogMessageObject::LogMessage(NCU_MSG_TYPE_INFO, "- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -");
}
示例8: GetDlgItem
void CPushDlg::OnBnClickedRd()
{
if( GetCheckedRadioButton(IDC_RD_REMOTE,IDC_RD_URL) == IDC_RD_REMOTE)
{
m_Remote.EnableWindow(TRUE);
GetDlgItem(IDC_REMOTE_MANAGE)->EnableWindow(TRUE);
m_RemoteURL.EnableWindow(FALSE);
}
if( GetCheckedRadioButton(IDC_RD_REMOTE,IDC_RD_URL) == IDC_RD_URL)
{
m_Remote.EnableWindow(FALSE);
GetDlgItem(IDC_REMOTE_MANAGE)->EnableWindow(FALSE);
m_RemoteURL.EnableWindow(TRUE);
}
}
示例9: UpdateData
// Get user edited data from dialog and stuff in m_pVTTestObject->m_regInfo
void CRegisterDlg::OnOK()
{
// Copy data from selected edit controls into m_ data members
UpdateData(TRUE);
// pszSite
m_editSite.GetWindowText(m_pVTTestObject->m_regInfo.siteStr); // save the string
m_pVTTestObject->m_regInfo.bUseSiteStr = (GetCheckedRadioButton(IDC_RADIO_SITESTRNULL, IDC_RADIO_SITESTREDIT)
== IDC_RADIO_SITESTREDIT);
// pNotifyInterface
m_pVTTestObject->m_regInfo.bRegNotifySink = (m_checkNotify.GetCheck() == 1);
// dwFlags
m_pVTTestObject->m_regInfo.bAllMsgsFlg = (GetCheckedRadioButton(IDC_RADIO_ALLMSGSFLG, IDC_RADIO_ZEROFLG)
== IDC_RADIO_ALLMSGSFLG);
// pSiteInfo
m_pVTTestObject->m_regInfo.bUseSiteInfo = (GetCheckedRadioButton(IDC_RADIO_SITENULL, IDC_RADIO_SITEINFO)
== IDC_RADIO_SITEINFO);
if(m_pVTTestObject->m_regInfo.bUseSiteInfo)
{
GUID gZero;
memset(&gZero, 0, sizeof(gZero));
if(IsEqualGUID(m_pVTTestObject->m_regInfo.siteInfo.gModeID, gZero))
{
MessageBox(TEXT("You must select a mode if you wish to pass the VTSITEINFO structure to IVoiceText::Register()"),
TEXT("Incomplete VTSITEINFO Structure"), MB_ICONSTOP);
return;
}
}
//m_regInfo.siteInfo.dwDevice
m_pVTTestObject->m_regInfo.bUseMapper = (GetCheckedRadioButton(IDC_RADIO_MAPPER, IDC_RADIO_DEVICEID)
== IDC_RADIO_MAPPER);
m_pVTTestObject->m_regInfo.siteInfo.dwDevice = m_editDWDevice;
//m_regInfo.siteInfo.dwEnable
m_pVTTestObject->m_regInfo.siteInfo.dwEnable = (m_checkEnable.GetCheck() == 1);
//m_regInfo.siteInfo.dwSpeed
m_pVTTestObject->m_regInfo.siteInfo.dwSpeed = m_editDWSpeed;
//m_regInfo.siteInfo.gModeID
m_pVTTestObject->m_regInfo.siteInfo.gModeID = m_pVTTestObject->m_regInfo.ttsSelect.gModeID;
CDialog::OnOK();
}
示例10: UpdateBillboardUI
void KSceneSFXEditorBillboardPage::OnCbnSelchangeComboBillboardList()
{
HRESULT hRetCode = E_FAIL;
VOID *pvEntityPointer = NULL;
// TODO: Add your control notification handler code here
UpdateBillboardUI();
GET_SFX_EDITOR();
GET_BILLBOARD();
IEKG3DSceneSelectionTool* pSelTool = NULL;
HRESULT hr = pScene->GetSelectionToolInterface(&pSelTool);
_ASSERTE(SUCCEEDED(hr));
IEKG3DSceneEditorBase *piSceneEditorBase = NULL;
pScene->GetSceneEditBase(&piSceneEditorBase);
IEKG3DSceneSelectBase* pSelector = NULL;
piSceneEditorBase->GetSceneSelector(&pSelector);
_ASSERTE(pSelector);
//pSelector->SelectNone(0);
pSelTool->ClearSelection();
pSelector->CopySelectable2SelectedSet(pBillboard);
pFrame->GetKeysFrame()->UpdateTransformUI();
int id = GetCheckedRadioButton(IDC_RADIO_BILLBOARD_COLOR, IDC_RADIO_UV_OFFSET);
CheckDlgButton(id, BST_UNCHECKED);
//pFrame->m_dlgKeyFrame.SetTimeLine("", NULL, SFX_TLDT_NONE);
pFrame->GetKeysFrame()->SetTimeLine("", NULL, SFX_TLDT_NONE);
//Exit0:
return;
}
示例11: switch
void CPPageYoutube::UpdateMemoryCtrl()
{
switch (GetCheckedRadioButton(IDC_RADIO1, IDC_RADIO2)) {
case IDC_RADIO1: {
GetDlgItem(IDC_STATIC3)->ShowWindow(TRUE);
GetDlgItem(IDC_RADIO3)->ShowWindow(TRUE);
GetDlgItem(IDC_RADIO4)->ShowWindow(TRUE);
GetDlgItem(IDC_EDIT1)->ShowWindow(TRUE);
GetDlgItem(IDC_EDIT2)->ShowWindow(TRUE);
GetDlgItem(IDC_SPIN1)->ShowWindow(TRUE);
GetDlgItem(IDC_SPIN2)->ShowWindow(TRUE);
}
break;
case IDC_RADIO2: {
GetDlgItem(IDC_STATIC3)->ShowWindow(FALSE);
GetDlgItem(IDC_RADIO3)->ShowWindow(FALSE);
GetDlgItem(IDC_RADIO4)->ShowWindow(FALSE);
GetDlgItem(IDC_EDIT1)->ShowWindow(FALSE);
GetDlgItem(IDC_EDIT2)->ShowWindow(FALSE);
GetDlgItem(IDC_SPIN1)->ShowWindow(FALSE);
GetDlgItem(IDC_SPIN2)->ShowWindow(FALSE);
}
break;
}
}
示例12: GetCheckedRadioButton
void CConnectionOptionsDlg::OnOK() {
int button = GetCheckedRadioButton( IDC_DSNRADIO, IDC_SQLRADIO );
CString address, server, database;
switch ( button ) {
case IDC_DSNRADIO :
preferences.SetString("ConnectionType","DSN");
GetDlgItemText( IDC_DSN, database );
preferences.SetString("DSNDatabase", (LPCTSTR)database );
preferences.SetString("DSN",(LPCTSTR)database);
break;
case IDC_ACCESSRADIO :
preferences.SetString("ConnectionType","Access");
GetDlgItemText( IDC_ACCESS, database );
preferences.SetString("AccessDatabase", (LPCTSTR)database);
database = (CString)"Driver={Microsoft Access Driver (*.mdb)};Dbq=" + database + ";";
preferences.SetString("DSN",(LPCTSTR)database);
break;
case IDC_SQLRADIO :
preferences.SetString("ConnectionType","SQL");
GetDlgItemText( IDC_SQLSERVER, server );
GetDlgItemText( IDC_SQLADDRESS, address );
GetDlgItemText( IDC_SQLDATABASE, database );
preferences.SetString("SQLServer", (LPCTSTR)server);
preferences.SetString("SQLAddress", (LPCTSTR)address);
preferences.SetString("SQLDatabase", (LPCTSTR)database);
database = "Driver={SQL Server};Server=" + server + ";Address=" + address + ";Network=DBMSSOCN;Database=" + database + ";";
preferences.SetString("DSN",(LPCTSTR)database);
break;
}
preferences.SetBool( "UsePrefix", ( ((CButton*)GetDlgItem( IDC_PREFIX ))->CButton::GetCheck() ? true : false ) );
CDialog::OnOK();
}
示例13: GetCheckedRadioButton
void DlgSMTP::OnRadlahde()
{
CString cs;
COleDateTime odt;
m_attach_from = GetCheckedRadioButton(IDC_RADLAHDE1, IDC_RADLAHDE2);
if(m_attach_from == IDC_RADLAHDE1)
{
m_chkAsiakkaat.EnableWindow(TRUE);
m_chkLaskuttajat.EnableWindow(TRUE);
m_chkTyotyypit.EnableWindow(TRUE);
m_chkTuotteet.EnableWindow(TRUE);
m_btnPolku.EnableWindow(FALSE);
m_stcAttachment.SetWindowText("");
}
else if(m_attach_from == IDC_RADLAHDE2)
{
m_chkAsiakkaat.EnableWindow(FALSE);
m_chkLaskuttajat.EnableWindow(FALSE);
m_chkTyotyypit.EnableWindow(FALSE);
m_chkTuotteet.EnableWindow(FALSE);
m_btnPolku.EnableWindow(TRUE);
m_stcAttachment.SetWindowText("");
}
}
示例14: GetCheckedRadioButton
short CAnalysisHowPage::GetComputationKind()
{
short kind = GetCheckedRadioButton(IDC_STATISTIC, IDC_EVENT) - IDC_STATISTIC;
ASSERT(kind >= 0 && kind < CAnalysisComputation::NB_KIND);
return kind;
}
示例15: GetCheckedRadioButton
void CInteractionAreaDialog::OnUpdateCustomTimeSettings(CCmdUI* pCmdUI) {
int radioId = GetCheckedRadioButton(IDC_AC_ALL_PAGES, IDC_AC_CHOOSE);
if (radioId == IDC_AC_CHOOSE)
pCmdUI->Enable(TRUE);
else
pCmdUI->Enable(FALSE);
}