本文整理匯總了C++中EnableSaveRestore函數的典型用法代碼示例。如果您正苦於以下問題:C++ EnableSaveRestore函數的具體用法?C++ EnableSaveRestore怎麽用?C++ EnableSaveRestore使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了EnableSaveRestore函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: AddAnchor
BOOL CDeleteRemoteTagDlg::OnInitDialog()
{
CHorizontalResizableStandAloneDialog::OnInitDialog();
CAppUtils::MarkWindowAsUnpinnable(m_hWnd);
AddAnchor(IDC_EDIT_REMOTE, TOP_LEFT, TOP_RIGHT);
AddAnchor(IDC_LIST_TAGS, TOP_LEFT, BOTTOM_RIGHT);
AddAnchor(IDC_SELECTALL, BOTTOM_RIGHT);
AddAnchor(IDOK, BOTTOM_RIGHT);
AddAnchor(IDCANCEL, BOTTOM_RIGHT);
this->AddOthersToAnchor();
AdjustControlSize((UINT)IDC_STATIC);
CString temp;
temp.LoadString(IDS_PROC_TAG);
m_ctrlTags.InsertColumn(0, temp, 0, -1);
m_ctrlTags.SetColumnWidth(0, LVSCW_AUTOSIZE_USEHEADER);
m_ctrlTags.SetExtendedStyle(LVS_EX_DOUBLEBUFFER);
GetDlgItem(IDC_EDIT_REMOTE)->SetWindowText(m_sRemote);
Refresh();
EnableSaveRestore(_T("DeleteRemoteTagDlg"));
return TRUE;
}
示例2: ResStr
BOOL CFavoriteOrganizeDlg::OnInitDialog()
{
__super::OnInitDialog();
m_tab.InsertItem(0, ResStr(IDS_FAVFILES));
m_tab.InsertItem(1, ResStr(IDS_FAVDVDS));
// m_tab.InsertItem(2, ResStr(IDS_FAVDEVICES));
m_tab.SetCurSel(0);
m_list.InsertColumn(0, _T(""));
m_list.InsertColumn(1, _T(""));
m_list.SetExtendedStyle(m_list.GetExtendedStyle() | LVS_EX_FULLROWSELECT);
const CAppSettings& s = AfxGetAppSettings();
s.GetFav(FAV_FILE, m_sl[0]);
s.GetFav(FAV_DVD, m_sl[1]);
s.GetFav(FAV_DEVICE, m_sl[2]);
SetupList(false);
AddAnchor(IDC_TAB1, TOP_LEFT, BOTTOM_RIGHT);
AddAnchor(IDC_LIST2, TOP_LEFT, BOTTOM_RIGHT);
AddAnchor(IDC_BUTTON1, TOP_RIGHT);
AddAnchor(IDC_BUTTON2, TOP_RIGHT);
AddAnchor(IDC_BUTTON3, TOP_RIGHT);
AddAnchor(IDC_BUTTON4, TOP_RIGHT);
AddAnchor(IDOK, BOTTOM_RIGHT);
EnableSaveRestore(IDS_R_DLG_ORGANIZE_FAV);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
示例3: RegisterWindowMessage
BOOL CFindDlg::OnInitDialog()
{
CDialog::OnInitDialog();
m_FindMsg = RegisterWindowMessage(FINDMSGSTRING);
m_FindCombo.LoadHistory(_T("Software\\TortoiseGit\\History\\Find"), _T("Search"));
m_FindCombo.SetFocus();
this->AddAnchor(IDC_STATIC_FIND, TOP_LEFT, TOP_RIGHT);
this->AddAnchor(IDC_FINDCOMBO, TOP_LEFT, TOP_RIGHT);
this->AddAnchor(IDOK, TOP_RIGHT);
this->AddAnchor(IDCANCEL, TOP_RIGHT);
this->AddAnchor(IDC_STATIC_GROUP_REF, TOP_LEFT, BOTTOM_RIGHT);
this->AddAnchor(IDC_STATIC_FILTER, BOTTOM_LEFT);
this->AddAnchor(IDC_EDIT_FILTER, BOTTOM_LEFT, BOTTOM_RIGHT);
this->AddAnchor(IDC_LIST_REF, TOP_LEFT, BOTTOM_RIGHT);
this->AddOthersToAnchor();
EnableSaveRestore(_T("FindDlg"));
CImageList *imagelist = new CImageList();
imagelist->Create(IDB_BITMAP_REFTYPE,16,3,RGB(255,255,255));
this->m_ctrlRefList.SetImageList(imagelist,LVSIL_SMALL);
CRect rect;
m_ctrlRefList.GetClientRect(&rect);
this->m_ctrlRefList.InsertColumn(0,_T("Ref"),0, rect.Width()-50);
g_Git.GetRefList(m_RefList);
AddToList();
return FALSE;
}
示例4: BlockResize
BOOL CURLDlg::OnInitDialog()
{
CResizableStandAloneDialog::OnInitDialog();
CAppUtils::MarkWindowAsUnpinnable(m_hWnd);
BlockResize(DIALOG_BLOCKVERTICAL);
ExtendFrameIntoClientArea(IDC_DWM);
m_aeroControls.SubclassOkCancel(this);
m_URLCombo.SetURLHistory(true, false);
m_URLCombo.LoadHistory(L"Software\\TortoiseSVN\\History\\repoURLS", L"url");
CControlsBridge::AlignHorizontally(this, IDC_LABEL, IDC_URLCOMBO);
AddAnchor(IDC_LABEL, TOP_LEFT);
AddAnchor(IDC_URLCOMBO, TOP_LEFT, TOP_RIGHT);
AddAnchor(IDOK, BOTTOM_RIGHT);
AddAnchor(IDCANCEL, BOTTOM_RIGHT);
EnableSaveRestore(L"URLDlg");
// Now, after the combo size might have changed, select the proper string and
// put focus into it so that if the text was too wide to be displayed with
// the original size but it fits into the restored size it is no longer scrolled
// in the edit box of the combo.
m_URLCombo.SetCurSel(0);
m_URLCombo.SetFocus();
// if there is an url on the clipboard, use that url as the default.
CAppUtils::AddClipboardUrlToWindow(m_URLCombo.GetSafeHwnd());
return FALSE;
}
示例5: InitWindowStyles
BOOL CAddSourceDlg::OnInitDialog()
{
CResizableDialog::OnInitDialog();
InitWindowStyles(this);
AddAnchor(IDC_SOURCE_TYPE, TOP_LEFT, BOTTOM_RIGHT);
AddAnchor(IDC_EDIT10, TOP_LEFT, TOP_RIGHT);
AddAnchor(IDOK, BOTTOM_RIGHT);
AddAnchor(IDC_BUTTON1, BOTTOM_RIGHT);
AddAnchor(IDCANCEL, BOTTOM_RIGHT);
if (m_pFile)
SetWindowText(m_pFile->GetFileName());
// localize
SetDlgItemText(IDC_BUTTON1,GetResString(IDS_ADD));
SetDlgItemText(IDCANCEL,GetResString(IDS_CANCEL));
SetDlgItemText(IDC_RSRC,GetResString(IDS_SOURCECLIENT));
SetDlgItemText(IDC_SOURCE_TYPE,GetResString(IDS_META_SRCTYPE));
SetDlgItemText(IDC_RURL,GetResString(IDS_SV_URL));
SetDlgItemText(IDC_UIP,GetResString(IDS_USERSIP));
SetDlgItemText(IDC_PORT,GetResString(IDS_PORT));
GetDlgItem(IDOK)->SetWindowText(GetResString(IDS_TREEOPTIONS_OK));
EnableSaveRestore(_T("AddSourceDlg"));
OnBnClickedRadio1();
return FALSE; // return FALSE, we changed the focus!
}
示例6: SHAutoComplete
BOOL CRenameDlg::OnInitDialog()
{
CHorizontalResizableStandAloneDialog::OnInitDialog();
CAppUtils::MarkWindowAsUnpinnable(m_hWnd);
SHAutoComplete(GetDlgItem(IDC_NAME)->m_hWnd, SHACF_DEFAULT);
if (!m_windowtitle.IsEmpty())
this->SetWindowText(m_windowtitle);
if (!m_label.IsEmpty())
SetDlgItemText(IDC_LABEL, m_label);
if (!m_name.IsEmpty())
{
CString sTmp;
sTmp.Format(IDS_RENAME_INFO, (LPCWSTR)m_name);
SetDlgItemText(IDC_RENINFOLABEL, sTmp);
}
AddAnchor(IDC_RENINFOLABEL, TOP_LEFT, TOP_RIGHT);
AddAnchor(IDC_LABEL, TOP_LEFT);
AddAnchor(IDC_NAME, TOP_LEFT, TOP_RIGHT);
AddAnchor(IDC_BUTTON_BROWSE_REF, TOP_RIGHT);
AddAnchor(IDOK, BOTTOM_RIGHT);
AddAnchor(IDCANCEL, BOTTOM_RIGHT);
CControlsBridge::AlignHorizontally(this, IDC_LABEL, IDC_NAME);
if (hWndExplorer)
CenterWindow(CWnd::FromHandle(hWndExplorer));
EnableSaveRestore(L"RenameDlg");
m_originalName = m_name;
return TRUE;
}
示例7: AddAnchor
BOOL CRequestPullDlg::OnInitDialog()
{
CHorizontalResizableStandAloneDialog::OnInitDialog();
CAppUtils::MarkWindowAsUnpinnable(m_hWnd);
AddAnchor(IDOK,BOTTOM_RIGHT);
AddAnchor(IDCANCEL,BOTTOM_RIGHT);
AddAnchor(IDHELP,BOTTOM_RIGHT);
AddAnchor(IDC_BUTTON_LOCAL_BRANCH, TOP_RIGHT);
AddAnchor(IDC_COMBOBOXEX_LOCAL_BRANCH, TOP_LEFT,TOP_RIGHT);
AddAnchor(IDC_COMBOBOXEX_URL, TOP_LEFT,TOP_RIGHT);
AddAnchor(IDC_REMOTE_BRANCH, TOP_LEFT,TOP_RIGHT);
EnableSaveRestore(_T("RequestPullDlg"));
CString sWindowTitle;
GetWindowText(sWindowTitle);
CAppUtils::SetWindowTitle(m_hWnd, g_Git.m_CurrentDir, sWindowTitle);
STRING_VECTOR list;
int current;
g_Git.GetBranchList(list, ¤t, CGit::BRANCH_ALL);
m_cStartRevision.SetMaxHistoryItems(0x7FFFFFFF);
for (unsigned int i = 0; i < list.size(); i++)
{
m_cStartRevision.AddString(list[i]);
}
CString WorkingDir=g_Git.m_CurrentDir;
WorkingDir.Replace(_T(':'), _T('_'));
m_RegStartRevision = CRegString(_T("Software\\TortoiseGit\\History\\RequestPull\\")+WorkingDir+_T("\\startrevision"));
if(m_StartRevision.IsEmpty()) {
m_StartRevision = m_RegStartRevision;
}
m_cStartRevision.SetWindowTextW(m_StartRevision);
// store URLs in global history, but save last used local url separately,
// because one normally has only one writable repository
m_cRepositoryURL.SetURLHistory(TRUE);
m_cRepositoryURL.LoadHistory(_T("Software\\TortoiseGit\\History\\RequestPull"), _T("url"));
m_RegRepositoryURL = CRegString(_T("Software\\TortoiseGit\\History\\RequestPull\\")+WorkingDir+_T("\\repositoryurl"));
if(m_RepositoryURL.IsEmpty())
{
m_RepositoryURL = m_RegRepositoryURL;
}
m_cRepositoryURL.SetWindowTextW(m_RepositoryURL);
m_RegEndRevision = CRegString(_T("Software\\TortoiseGit\\History\\RequestPull\\")+WorkingDir+_T("\\endrevision"), _T("HEAD"));
if(m_EndRevision.IsEmpty()) {
m_EndRevision = m_RegEndRevision;
}
m_cEndRevision.SetWindowTextW(m_EndRevision);
this->UpdateData(FALSE);
return TRUE;
}
示例8: CRect
BOOL CSubtitleDlDlg::OnInitDialog()
{
__super::OnInitDialog();
m_status.Create(WS_CHILD | WS_VISIBLE | CCS_BOTTOM, CRect(0, 0, 0, 0), this, IDC_STATUSBAR);
int n, curPos = 0;
CArray<int> columnWidth;
CString strColumnWidth = AfxGetApp()->GetProfileString(IDS_R_DLG_SUBTITLEDL, IDS_RS_DLG_SUBTITLEDL_COLWIDTH, _T(""));
CString token = strColumnWidth.Tokenize(_T(","), curPos);
while (!token.IsEmpty()) {
if (_stscanf_s(token, L"%i", &n) == 1) {
columnWidth.Add(n);
token = strColumnWidth.Tokenize(_T(","), curPos);
} else {
throw 1;
}
}
m_list.SetExtendedStyle(m_list.GetExtendedStyle()
| LVS_EX_DOUBLEBUFFER | LVS_EX_FULLROWSELECT
| LVS_EX_CHECKBOXES | LVS_EX_LABELTIP);
if (columnWidth.GetCount() != 5) {
// default sizes
columnWidth.RemoveAll();
columnWidth.Add(290);
columnWidth.Add(70);
columnWidth.Add(50);
columnWidth.Add(50);
columnWidth.Add(270);
}
m_list.InsertColumn(COL_FILENAME, ResStr(IDS_SUBDL_DLG_FILENAME_COL), LVCFMT_LEFT, columnWidth[0]);
m_list.InsertColumn(COL_LANGUAGE, ResStr(IDS_SUBDL_DLG_LANGUAGE_COL), LVCFMT_CENTER, columnWidth[1]);
m_list.InsertColumn(COL_FORMAT, ResStr(IDS_SUBDL_DLG_FORMAT_COL), LVCFMT_CENTER, columnWidth[2]);
m_list.InsertColumn(COL_DISC, ResStr(IDS_SUBDL_DLG_DISC_COL), LVCFMT_CENTER, columnWidth[3]);
m_list.InsertColumn(COL_TITLES, ResStr(IDS_SUBDL_DLG_TITLES_COL), LVCFMT_LEFT, columnWidth[4]);
AddAnchor(IDC_LIST1, TOP_LEFT, BOTTOM_RIGHT);
AddAnchor(IDC_CHECK1, BOTTOM_LEFT);
AddAnchor(IDOK, BOTTOM_RIGHT);
AddAnchor(IDC_STATUSBAR, BOTTOM_LEFT, BOTTOM_RIGHT);
const CSize s(420, 200);
SetMinTrackSize(s);
EnableSaveRestore(IDS_R_DLG_SUBTITLEDL);
// start new worker thread to download the list of subtitles
m_pTA = DEBUG_NEW THREADSTRUCT;
m_pTA->url = m_url;
m_pTA->hWND = GetSafeHwnd();
SetStatus(ResStr(IDS_SUBDL_DLG_DOWNLOADING));
AfxBeginThread(RunThread, static_cast<LPVOID>(m_pTA));
return TRUE;
}
示例9: InitWindowStyles
BOOL CIPFilterDlg::OnInitDialog()
{
CResizableDialog::OnInitDialog();
InitWindowStyles(this);
AddAnchor(IDC_IPFILTER, TOP_LEFT, BOTTOM_RIGHT);
AddAnchor(IDC_TOTAL_IPFILTER_LABEL, BOTTOM_LEFT);
AddAnchor(IDC_TOTAL_IPFILTER, BOTTOM_LEFT);
AddAnchor(IDC_TOTAL_IPS_LABEL, BOTTOM_LEFT);
AddAnchor(IDC_TOTAL_IPS, BOTTOM_LEFT);
AddAnchor(IDC_COPY, BOTTOM_RIGHT);
AddAnchor(IDC_REMOVE, BOTTOM_RIGHT);
AddAnchor(IDC_APPEND, BOTTOM_RIGHT);
AddAnchor(IDC_SAVE, BOTTOM_RIGHT);
AddAnchor(IDOK, BOTTOM_RIGHT);
EnableSaveRestore(PREF_INI_SECTION);
ASSERT( m_ipfilter.GetStyle() & LVS_OWNERDATA );
m_ipfilter.SendMessage(CCM_SETUNICODEFORMAT, TRUE);
m_ipfilter.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES);
m_ipfilter.EnableHdrCtrlSortBitmaps();
m_ipfilter.ReadColumnStats(ARRSIZE(_aColumns), _aColumns);
m_ipfilter.CreateColumns(ARRSIZE(_aColumns), _aColumns);
m_ipfilter.InitColumnOrders(ARRSIZE(_aColumns), _aColumns);
m_ipfilter.UpdateSortColumn(ARRSIZE(_aColumns), _aColumns);
SetIcon(m_icoDlg = theApp.LoadIcon(_T("IPFilter")), FALSE);
InitIPFilters();
m_pMenuIPFilter = new CMenu();
if (m_pMenuIPFilter->CreatePopupMenu())
{
m_pMenuIPFilter->AppendMenu(MF_ENABLED | MF_STRING, MP_COPYSELECTED, GetResString(IDS_COPY));
m_pMenuIPFilter->AppendMenu(MF_ENABLED | MF_STRING, MP_REMOVE, GetResString(IDS_REMOVE));
m_pMenuIPFilter->AppendMenu(MF_SEPARATOR);
m_pMenuIPFilter->AppendMenu(MF_ENABLED | MF_STRING, MP_SELECTALL, GetResString(IDS_SELECTALL));
m_pMenuIPFilter->AppendMenu(MF_SEPARATOR);
m_pMenuIPFilter->AppendMenu(MF_ENABLED | MF_STRING, MP_FIND, GetResString(IDS_FIND));
}
m_ipfilter.m_pMenu = m_pMenuIPFilter;
m_ipfilter.m_pParent = this;
// localize
SetWindowText(GetResString(IDS_IPFILTER));
SetDlgItemText(IDC_STATICIPLABEL,GetResString(IDS_IP_RULES));
SetDlgItemText(IDC_TOTAL_IPFILTER_LABEL,GetResString(IDS_TOTAL_IPFILTER_LABEL));
SetDlgItemText(IDC_TOTAL_IPS_LABEL,GetResString(IDS_TOTAL_IPS_LABEL));
SetDlgItemText(IDC_COPY,GetResString(IDS_COPY));
SetDlgItemText(IDC_REMOVE,GetResString(IDS_DELETESELECTED));
SetDlgItemText(IDC_APPEND,GetResString(IDS_APPEND));
SetDlgItemText(IDC_SAVE,GetResString(IDS_SAVE));
SetDlgItemText(IDOK,GetResString(IDS_FD_CLOSE));
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
示例10: AdjustControlSize
BOOL CSubmoduleUpdateDlg::OnInitDialog()
{
CResizableStandAloneDialog::OnInitDialog();
CAppUtils::MarkWindowAsUnpinnable(m_hWnd);
AdjustControlSize(IDC_CHECK_SUBMODULE_INIT);
AdjustControlSize(IDC_CHECK_SUBMODULE_RECURSIVE);
AdjustControlSize(IDC_CHECK_SUBMODULE_NOFETCH);
AdjustControlSize(IDC_CHECK_SUBMODULE_MERGE);
AdjustControlSize(IDC_CHECK_SUBMODULE_REBASE);
AddAnchor(IDOK, BOTTOM_RIGHT);
AddAnchor(IDCANCEL, BOTTOM_RIGHT);
AddAnchor(IDHELP, BOTTOM_RIGHT);
AddAnchor((UINT)IDC_STATIC, TOP_LEFT);
AddAnchor(IDC_LIST_PATH, TOP_LEFT, BOTTOM_RIGHT);
AddAnchor(IDC_SELECTALL, BOTTOM_LEFT);
AddAnchor(IDC_WHOLE_PROJECT, BOTTOM_LEFT);
AddAnchor(IDC_GROUP_INFO, BOTTOM_LEFT, BOTTOM_RIGHT);
AddAnchor(IDC_CHECK_SUBMODULE_INIT, BOTTOM_LEFT);
AddAnchor(IDC_CHECK_SUBMODULE_RECURSIVE, BOTTOM_LEFT);
AddAnchor(IDC_FORCE, BOTTOM_LEFT);
AddAnchor(IDC_CHECK_SUBMODULE_REMOTE, BOTTOM_LEFT);
AddAnchor(IDC_CHECK_SUBMODULE_NOFETCH, BOTTOM_RIGHT);
AddAnchor(IDC_CHECK_SUBMODULE_MERGE, BOTTOM_RIGHT);
AddAnchor(IDC_CHECK_SUBMODULE_REBASE, BOTTOM_RIGHT);
CString str(g_Git.m_CurrentDir);
str.Replace(L':', L'_');
m_regShowWholeProject = CRegDWORD(L"Software\\TortoiseGit\\TortoiseProc\\ShowWholeProject\\" + str, FALSE);
m_bWholeProject = m_regShowWholeProject;
m_regInit = CRegDWORD(L"Software\\TortoiseGit\\TortoiseProc\\SubmoduleUpdate\\" + str + L"\\init", TRUE);
m_bInit = m_regInit;
m_regRecursive = CRegDWORD(L"Software\\TortoiseGit\\TortoiseProc\\SubmoduleUpdate\\" + str + L"\\recursive", FALSE);
m_bRecursive = m_regRecursive;
m_regForce = CRegDWORD(L"Software\\TortoiseGit\\TortoiseProc\\SubmoduleUpdate\\" + str + L"\\force", FALSE);
m_bForce = m_regForce;
m_regRemote = CRegDWORD(L"Software\\TortoiseGit\\TortoiseProc\\SubmoduleUpdate\\" + str + L"\\remote", FALSE);
m_bRemote = m_regRemote;
m_regNoFetch = CRegDWORD(L"Software\\TortoiseGit\\TortoiseProc\\SubmoduleUpdate\\" + str + L"\\nofetch", FALSE);
m_bNoFetch = m_regNoFetch;
m_regMerge = CRegDWORD(L"Software\\TortoiseGit\\TortoiseProc\\SubmoduleUpdate\\" + str + L"\\merge", FALSE);
m_bMerge = m_regMerge;
m_regRebase = CRegDWORD(L"Software\\TortoiseGit\\TortoiseProc\\SubmoduleUpdate\\" + str + L"\\rebase", FALSE);
m_bRebase = m_regRebase;
DialogEnableWindow(IDC_WHOLE_PROJECT, !(m_PathFilterList.empty() || (m_PathFilterList.size() == 1 && m_PathFilterList[0].IsEmpty())));
SetDlgTitle();
EnableSaveRestore(L"SubmoduleUpdateDlg");
Refresh();
UpdateData(FALSE);
return TRUE;
}
示例11: CRegDWORD
BOOL CChangedDlg::OnInitDialog()
{
CResizableStandAloneDialog::OnInitDialog();
m_tooltips.Create(this);
m_regAddBeforeCommit = CRegDWORD(_T("Software\\TortoiseGit\\AddBeforeCommit"), TRUE);
m_bShowUnversioned = m_regAddBeforeCommit;
CString regPath(g_Git.m_CurrentDir);
regPath.Replace(_T(":"), _T("_"));
m_regShowWholeProject = CRegDWORD(_T("Software\\TortoiseGit\\TortoiseProc\\ShowWholeProject\\") + regPath, FALSE);
m_bWholeProject = m_regShowWholeProject;
SetDlgTitle();
UpdateData(FALSE);
m_FileListCtrl.Init(GITSLC_COLEXT | GITSLC_COLSTATUS | GITSLC_COLADD| GITSLC_COLDEL | GITSLC_COLMODIFICATIONDATE, _T("ChangedDlg"),
(GITSLC_POPALL ^ (GITSLC_POPSAVEAS|GITSLC_POPRESTORE)), false);
m_FileListCtrl.SetCancelBool(&m_bCanceled);
m_FileListCtrl.SetBackgroundImage(IDI_CFM_BKG);
m_FileListCtrl.SetEmptyString(IDS_REPOSTATUS_EMPTYFILELIST);
AdjustControlSize(IDC_SHOWUNVERSIONED);
AdjustControlSize(IDC_SHOWUNMODIFIED);
AdjustControlSize(IDC_SHOWLOCALCHANGESIGNORED);
AdjustControlSize(IDC_SHOWIGNORED);
AdjustControlSize(IDC_WHOLE_PROJECT);
AddAnchor(IDC_CHANGEDLIST, TOP_LEFT, BOTTOM_RIGHT);
AddAnchor(IDC_SUMMARYTEXT, BOTTOM_LEFT, BOTTOM_RIGHT);
AddAnchor(IDC_SHOWUNVERSIONED, BOTTOM_LEFT);
AddAnchor(IDC_SHOWUNMODIFIED, BOTTOM_LEFT);
AddAnchor(IDC_SHOWLOCALCHANGESIGNORED, BOTTOM_LEFT);
AddAnchor(IDC_SHOWIGNORED, BOTTOM_LEFT);
AddAnchor(IDC_WHOLE_PROJECT, BOTTOM_LEFT);
AddAnchor(IDC_INFOLABEL, BOTTOM_RIGHT);
AddAnchor(IDC_BUTTON_STASH, BOTTOM_RIGHT);
AddAnchor(IDC_BUTTON_UNIFIEDDIFF, BOTTOM_RIGHT);
AddAnchor(IDC_COMMIT, BOTTOM_RIGHT);
AddAnchor(IDC_REFRESH, BOTTOM_RIGHT);
AddAnchor(IDOK, BOTTOM_RIGHT);
// SetPromptParentWindow(m_hWnd);
if (hWndExplorer)
CenterWindow(CWnd::FromHandle(hWndExplorer));
EnableSaveRestore(_T("ChangedDlg"));
m_bRemote = !!(DWORD)CRegDWORD(_T("Software\\TortoiseGit\\CheckRepo"), FALSE);
// first start a thread to obtain the status without
// blocking the dialog
if (AfxBeginThread(ChangedStatusThreadEntry, this)==NULL)
{
CMessageBox::Show(NULL, IDS_ERR_THREADSTARTFAILED, IDS_APPNAME, MB_OK | MB_ICONERROR);
}
return TRUE;
}
示例12: AdjustControlSize
BOOL CSetHooksAdv::OnInitDialog()
{
CResizableStandAloneDialog::OnInitDialog();
AdjustControlSize(IDC_WAITCHECK);
AdjustControlSize(IDC_HIDECHECK);
// initialize the combo box with all the hook types we have
int index;
index = m_cHookTypeCombo.AddString(CString(MAKEINTRESOURCE(IDS_HOOKTYPE_STARTCOMMIT)));
m_cHookTypeCombo.SetItemData(index, start_commit_hook);
index = m_cHookTypeCombo.AddString(CString(MAKEINTRESOURCE(IDS_HOOKTYPE_PRECOMMIT)));
m_cHookTypeCombo.SetItemData(index, pre_commit_hook);
/*
index = m_cHookTypeCombo.AddString(CString(MAKEINTRESOURCE(IDS_HOOKTYPE_POSTCOMMIT)));
m_cHookTypeCombo.SetItemData(index, post_commit_hook);
*/
index = m_cHookTypeCombo.AddString(CString(MAKEINTRESOURCE(IDS_HOOKTYPE_PREPUSH)));
m_cHookTypeCombo.SetItemData(index, pre_push_hook);
index = m_cHookTypeCombo.AddString(CString(MAKEINTRESOURCE(IDS_HOOKTYPE_POSTPUSH)));
m_cHookTypeCombo.SetItemData(index, post_push_hook);
// preselect the right hook type in the combobox
for (int i=0; i<m_cHookTypeCombo.GetCount(); ++i)
{
hooktype ht = (hooktype)m_cHookTypeCombo.GetItemData(i);
if (ht == key.htype)
{
CString str;
m_cHookTypeCombo.GetLBText(i, str);
m_cHookTypeCombo.SelectString(i, str);
break;
}
}
m_sPath = key.path.GetWinPathString();
m_sCommandLine = cmd.commandline;
m_bWait = cmd.bWait;
m_bHide = !cmd.bShow;
UpdateData(FALSE);
AddAnchor(IDC_HOOKTYPELABEL, TOP_LEFT, TOP_RIGHT);
AddAnchor(IDC_HOOKTYPECOMBO, TOP_RIGHT);
AddAnchor(IDC_HOOKWCPATHLABEL, TOP_LEFT, TOP_RIGHT);
AddAnchor(IDC_HOOKPATH, TOP_LEFT, TOP_RIGHT);
AddAnchor(IDC_HOOKBROWSE, TOP_RIGHT);
AddAnchor(IDC_HOOKCMLABEL, TOP_LEFT, TOP_RIGHT);
AddAnchor(IDC_HOOKCOMMANDLINE, TOP_LEFT, TOP_RIGHT);
AddAnchor(IDC_HOOKCOMMANDBROWSE, TOP_RIGHT);
AddAnchor(IDC_WAITCHECK, BOTTOM_LEFT, BOTTOM_RIGHT);
AddAnchor(IDC_HIDECHECK, BOTTOM_LEFT, BOTTOM_RIGHT);
AddAnchor(IDOK, BOTTOM_RIGHT);
AddAnchor(IDCANCEL, BOTTOM_RIGHT);
AddAnchor(IDHELP, BOTTOM_RIGHT);
EnableSaveRestore(_T("SetHooksAdvDlg"));
return TRUE;
}
示例13: EnableStackedTabs
BOOL CFileDetailDialog::OnInitDialog()
{
EnableStackedTabs(FALSE);
BOOL bResult = CListViewWalkerPropertySheet::OnInitDialog();
HighColorTab::UpdateImageList(*this);
InitWindowStyles(this);
EnableSaveRestore(_T("FileDetailDialog")); // call this after(!) OnInitDialog
UpdateTitle();
return bResult;
}
示例14: EnableStackedTabs
BOOL CClientDetailDialog::OnInitDialog()
{
EnableStackedTabs(FALSE);
BOOL bResult = CListViewWalkerPropertySheet::OnInitDialog();
HighColorTab::UpdateImageList(*this);
InitWindowStyles(this);
EnableSaveRestore(_T("ClientDetailDialog")); // call this after(!) OnInitDialog
SetWindowText(GetResString(IDS_CD_TITLE));
return bResult;
}
示例15: ExtendFrameIntoClientArea
BOOL CSetBugTraqAdv::OnInitDialog()
{
CResizableStandAloneDialog::OnInitDialog();
ExtendFrameIntoClientArea(IDC_DWM);
m_aeroControls.SubclassOkCancelHelp(this);
std::vector<CBugTraqProvider> providers = CBugTraqAssociations::GetAvailableProviders();
if (providers.empty())
{
AfxMessageBox(IDS_ERR_NO_AVAILABLE_BUGTRAQ_PROVIDERS);
EndDialog(IDCANCEL);
return TRUE;
}
for (std::vector<CBugTraqProvider>::const_iterator it = providers.begin(); it != providers.end(); ++it)
{
int index = m_cProviderCombo.AddString(it->name);
m_cProviderCombo.SetItemDataPtr(index, new CBugTraqProvider(*it));
}
// preselect the right provider in the combo; we can't do this above, because the
// combo will sort the entries.
if (m_provider_clsid == GUID_NULL)
m_cProviderCombo.SetCurSel(0);
for (int i = 0; i < m_cProviderCombo.GetCount(); ++i)
{
CBugTraqProvider *p = (CBugTraqProvider *)m_cProviderCombo.GetItemDataPtr(i);
if (p->clsid == m_provider_clsid)
{
m_cProviderCombo.SetCurSel(i);
break;
}
}
m_tooltips.Create(this);
UpdateData(FALSE);
CheckHasOptions();
AddAnchor(IDC_BUGTRAQWCPATHLABEL, TOP_LEFT, TOP_RIGHT);
AddAnchor(IDC_BUGTRAQPATH, TOP_LEFT, TOP_RIGHT);
AddAnchor(IDC_BUGTRAQBROWSE, TOP_RIGHT);
AddAnchor(IDC_BUGTRAQPROVIDERLABEL, TOP_LEFT, TOP_RIGHT);
AddAnchor(IDC_BUGTRAQPROVIDERCOMBO, TOP_LEFT, TOP_RIGHT);
AddAnchor(IDC_BUGTRAQPARAMETERSLABEL, TOP_LEFT, TOP_RIGHT);
AddAnchor(IDC_BUGTRAQPARAMETERS, TOP_LEFT, TOP_RIGHT);
AddAnchor(IDC_OPTIONS, TOP_RIGHT);
AddAnchor(IDC_DWM, TOP_LEFT);
AddAnchor(IDOK, BOTTOM_RIGHT);
AddAnchor(IDCANCEL, BOTTOM_RIGHT);
AddAnchor(IDHELP, BOTTOM_RIGHT);
EnableSaveRestore(L"SetBugTraqAdvDlg");
return TRUE;
}