本文整理汇总了C++中InitWindowStyles函数的典型用法代码示例。如果您正苦于以下问题:C++ InitWindowStyles函数的具体用法?C++ InitWindowStyles怎么用?C++ InitWindowStyles使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了InitWindowStyles函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: InitWindowStyles
BOOL CPPgIRC::OnInitDialog()
{
m_bTimeStamp = thePrefs.GetIRCAddTimeStamp();
m_bSoundEvents = thePrefs.GetIRCPlaySoundEvents();
m_bMiscMessage = thePrefs.GetIRCIgnoreMiscMessages();
m_bJoinMessage = thePrefs.GetIRCIgnoreJoinMessages();
m_bPartMessage = thePrefs.GetIRCIgnorePartMessages();
m_bQuitMessage = thePrefs.GetIRCIgnoreQuitMessages();
m_bEmuleAddFriend = thePrefs.GetIRCIgnoreEmuleAddFriendMsgs();
m_bEmuleAllowAddFriend = thePrefs.GetIRCAllowEmuleAddFriend();
m_bEmuleSendLink = thePrefs.GetIRCIgnoreEmuleSendLinkMsgs();
m_bAcceptLinks = thePrefs.GetIRCAcceptLinks();
m_bIRCAcceptLinksFriendsOnly = thePrefs.GetIRCAcceptLinksFriendsOnly();
m_bHelpChannel = thePrefs.GetIRCJoinHelpChannel();
m_bChannelsOnConnect = thePrefs.GetIRCGetChannelsOnConnect();
m_bIRCEnableSmileys = thePrefs.GetIRCEnableSmileys();
m_ctrlTreeOptions.SetImageListColorFlags(theApp.m_iDfltImageListColorFlags);
CPropertyPage::OnInitDialog();
InitWindowStyles(this);
((CEdit*)GetDlgItem(IDC_IRC_NICK_BOX))->SetLimitText(20);
((CEdit*)GetDlgItem(IDC_IRC_MINUSER_BOX))->SetLimitText(6);
((CEdit*)GetDlgItem(IDC_IRC_SERVER_BOX))->SetLimitText(40);
((CEdit*)GetDlgItem(IDC_IRC_NAME_BOX))->SetLimitText(40);
((CEdit*)GetDlgItem(IDC_IRC_PERFORM_BOX))->SetLimitText(250);
LoadSettings();
Localize();
UpdateControls();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
示例2: InitWindowStyles
BOOL CPPgSecurity::OnInitDialog()
{
CPropertyPage::OnInitDialog();
InitWindowStyles(this);
LoadSettings();
Localize();
if (thePrefs.GetUseAutocompletion()){
if (!m_pacIPFilterURL) {
m_pacIPFilterURL = new CCustomAutoComplete();
m_pacIPFilterURL->AddRef();
if (m_pacIPFilterURL->Bind(::GetDlgItem(m_hWnd, IDC_UPDATEURL), ACO_UPDOWNKEYDROPSLIST | ACO_AUTOSUGGEST | ACO_FILTERPREFIXES ))
m_pacIPFilterURL->LoadList(CString(thePrefs.GetConfigDir()) + _T("\\") IPFILTERUPDATEURL_STRINGS_PROFILE);
}
SetDlgItemText(IDC_UPDATEURL,m_pacIPFilterURL->GetItem(0));
if (theApp.m_fontSymbol.m_hObject){
GetDlgItem(IDC_DD)->SetFont(&theApp.m_fontSymbol);
GetDlgItem(IDC_DD)->SetWindowText(_T("6")); // show a down-arrow
}
}
else
GetDlgItem(IDC_DD)->ShowWindow(SW_HIDE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
示例3: InitWindowStyles
BOOL CMetaDataDlg::OnInitDialog()
{
CResizablePage::OnInitDialog();
InitWindowStyles(this);
AddAnchor(IDC_TAGS, TOP_LEFT, BOTTOM_RIGHT);
AddAnchor(IDC_TOTAL_TAGS, BOTTOM_LEFT, BOTTOM_RIGHT);
GetDlgItem(IDC_TOTAL_TAGS)->SetWindowText(GetResString(IDS_METATAGS));
m_tags.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES);
m_tags.ReadColumnStats(ARRSIZE(_aColumns), _aColumns);
m_tags.CreateColumns(ARRSIZE(_aColumns), _aColumns);
InitTags();
m_pMenuTags = new CMenu();
if (m_pMenuTags->CreatePopupMenu())
{
m_pMenuTags->AppendMenu(MF_ENABLED | MF_STRING, MP_COPYSELECTED, GetResString(IDS_COPY));
m_pMenuTags->AppendMenu(MF_SEPARATOR);
m_pMenuTags->AppendMenu(MF_ENABLED | MF_STRING, MP_SELECTALL, GetResString(IDS_SELECTALL));
}
m_tags.m_pMenu = m_pMenuTags;
m_tags.m_pParent = this;
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
示例4: SET_DETAIL_OPT
BOOL CPPgDebug::OnInitDialog()
{
#define SET_DETAIL_OPT(idx, var) \
m_checks[idx] = ((var) > 0); \
m_levels[idx] = ((var) > 0) ? (var) : -(var)
#define SET_INTEGER_OPT(idx, var) \
m_iValInteger[idx] = var
SET_DETAIL_OPT(0, thePrefs.m_iDebugServerTCPLevel);
SET_DETAIL_OPT(1, thePrefs.m_iDebugServerUDPLevel);
SET_DETAIL_OPT(2, thePrefs.m_iDebugServerSourcesLevel);
SET_DETAIL_OPT(3, thePrefs.m_iDebugServerSearchesLevel);
SET_DETAIL_OPT(4, thePrefs.m_iDebugClientTCPLevel);
SET_DETAIL_OPT(5, thePrefs.m_iDebugClientUDPLevel);
SET_DETAIL_OPT(6, thePrefs.m_iDebugClientKadUDPLevel);
SET_INTEGER_OPT(0, thePrefs.m_iDbgHeap);
#undef SET_OPT
#undef SET_INTEGER_OPT
m_ctrlTreeOptions.SetImageListColorFlags(theApp.m_iDfltImageListColorFlags);
CPropertyPage::OnInitDialog();
InitWindowStyles(this);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
示例5: InitWindowStyles
BOOL CCatDialog::OnInitDialog()
{
CDialog::OnInitDialog();
InitWindowStyles(this);
SetIcon(theApp.LoadIcon(_T("CATEGORY"),16,16),FALSE); // Smart Category Control (SCC) [khaos/SiRoB/Stulle] - Stulle
Localize();
m_ctlColor.SetDefaultColor(GetSysColor(COLOR_BTNTEXT));
UpdateData();
// ==> Smart Category Control (SCC) [khaos/SiRoB/Stulle] - Stulle
/*
if (!thePrefs.IsExtControlsEnabled()) {
GetDlgItem(IDC_REGEXPR)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_STATIC_REGEXP)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_REGEXP)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_REB)->ShowWindow(SW_HIDE);
}
m_pacRegExp = new CCustomAutoComplete();
m_pacRegExp->AddRef();
if (m_pacRegExp->Bind(::GetDlgItem(m_hWnd, IDC_REGEXP), ACO_UPDOWNKEYDROPSLIST | ACO_AUTOSUGGEST)) {
m_pacRegExp->LoadList(thePrefs.GetMuleDirectory(EMULE_CONFIGDIR) + REGULAREXPRESSIONS_STRINGS_PROFILE);
}
if (theApp.m_fontSymbol.m_hObject){
GetDlgItem(IDC_REB)->SetFont(&theApp.m_fontSymbol);
GetDlgItem(IDC_REB)->SetWindowText(_T("6")); // show a down-arrow
}
*/
// <== Smart Category Control (SCC) [khaos/SiRoB/Stulle] - Stulle
return TRUE;
}
示例6: 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!
}
示例7: InitWindowStyles
BOOL CFileDetailDialogName::OnInitDialog()
{
CResizablePage::OnInitDialog();
InitWindowStyles(this);
AddAnchor(IDC_FD_SN, TOP_LEFT, BOTTOM_RIGHT);
AddAnchor(IDC_LISTCTRLFILENAMES, TOP_LEFT, BOTTOM_RIGHT);
AddAnchor(IDC_TAKEOVER, BOTTOM_LEFT);
AddAnchor(IDC_BUTTONSTRIP, BOTTOM_RIGHT);
AddAnchor(IDC_FILENAME, BOTTOM_LEFT, BOTTOM_RIGHT);
m_listFileNames.SetPrefsKey(_T("FileDetailDlgName"));
m_listFileNames.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_INFOTIP);
m_listFileNames.InsertColumn(0, GetResString(IDS_DL_FILENAME), LVCFMT_LEFT, /*DFLT_FILENAME_COL_WIDTH*/450);
m_listFileNames.InsertColumn(1, GetResString(IDS_DL_SOURCES), LVCFMT_LEFT, 60);
ASSERT( (m_listFileNames.GetStyle() & LVS_SHAREIMAGELISTS) != 0 );
m_listFileNames.LoadSettings();
m_listFileNames.SetSortArrow();
m_listFileNames.SortItems(&CompareListNameItems, m_listFileNames.GetSortItem() + (m_listFileNames.GetSortAscending() ? 0 : 10));
Localize();
// start time for calling 'RefreshData'
VERIFY( (m_timer = SetTimer(301, 5000, 0)) != NULL );
return TRUE;
}
示例8: InitWindowStyles
BOOL InputBox::OnInitDialog()
{
CDialog::OnInitDialog();
InitWindowStyles(this);
SetIcon( m_icMain = theApp.LoadIcon(_T("RENAME")),FALSE);
GetDlgItem(IDC_IBLABEL)->SetWindowText(m_label);
// ==> Smart Category Control (SCC) [khaos/SiRoB/Stulle] - Stulle
/*
GetDlgItem(IDC_TEXT)->SetWindowText(m_default);
*/
if (!isNumber)
GetDlgItem(IDC_TEXT)->SetWindowText(m_default);
else {
GetDlgItem(IDC_TEXTNUM)->SetWindowText(m_default);
GetDlgItem(IDC_TEXT)->ShowWindow(SW_HIDE);
GetDlgItem(IDC_TEXTNUM)->ShowWindow(SW_SHOW);
GetDlgItem(IDC_TEXTNUM)->SetFocus();
}
// <== Smart Category Control (SCC) [khaos/SiRoB/Stulle] - Stulle
SetWindowText(m_title);
SetDlgItemText(IDOK, GetResString(IDS_TREEOPTIONS_OK) );
GetDlgItem(IDCANCEL)->SetWindowText(GetResString(IDS_CANCEL));
SetDlgItemText(IDC_CLEANFILENAME,GetResString(IDS_CLEANUP));
GetDlgItem(IDC_CLEANFILENAME)->ShowWindow(m_bFilenameMode ? SW_NORMAL : SW_HIDE);
return TRUE;
}
示例9: InitWindowStyles
BOOL CPPgDirectories::OnInitDialog()
{
CWaitCursor curWait; // initialization of that dialog may take a while..
CPropertyPage::OnInitDialog();
InitWindowStyles(this);
((CEdit*)GetDlgItem(IDC_INCFILES))->SetLimitText(MAX_PATH);
AddBuddyButton(GetDlgItem(IDC_INCFILES)->m_hWnd, ::GetDlgItem(m_hWnd, IDC_SELINCDIR));
InitAttachedBrowseButton(::GetDlgItem(m_hWnd, IDC_SELINCDIR), m_icoBrowse);
AddBuddyButton(GetDlgItem(IDC_TEMPFILES)->m_hWnd, ::GetDlgItem(m_hWnd, IDC_SELTEMPDIR));
InitAttachedBrowseButton(::GetDlgItem(m_hWnd, IDC_SELTEMPDIR), m_icoBrowse);
m_ctlUncPaths.InsertColumn(0, GetResString(IDS_UNCFOLDERS), LVCFMT_LEFT, 280);
m_ctlUncPaths.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_INFOTIP);
GetDlgItem(IDC_SELTEMPDIRADD)->ShowWindow(thePrefs.IsExtControlsEnabled()?SW_SHOW:SW_HIDE);
LoadSettings();
Localize();
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
示例10: InitWindowStyles
BOOL InputBox::OnInitDialog()
{
CDialog::OnInitDialog();
InitWindowStyles(this);
SetIcon( m_icMain = theApp.LoadIcon(_T("RENAME")),FALSE);
m_pwndText = (CEdit*)GetDlgItem(IDC_TEXT);
GetDlgItem(IDC_IBLABEL)->SetWindowText(m_label);
m_pwndText->SetWindowText(m_default);
SetWindowText(m_title);
SetDlgItemText(IDOK, GetResString(IDS_TREEOPTIONS_OK) );
SetDlgItemText(IDCANCEL, GetResString(IDS_CANCEL) );
SetDlgItemText(IDC_CLEANFILENAME, GetResString(IDS_CLEANUP));
GetDlgItem(IDC_CLEANFILENAME)->ShowWindow(m_bFilenameMode ? SW_NORMAL : SW_HIDE);
// ismod [start]
if ( m_bMultirename ) {
SetDlgItemText(IDC_IBLABEL, GetResString(IDS_MOD_MULTIRENAMING));
GetDlgItem(IDC_MOD_RADIO_RENAME)->EnableWindow(FALSE);
CheckDlgButton(IDC_MOD_RADIO_BEGIN, BST_CHECKED);
OnBnClickedRadioBegin();
} else {
GetDlgItem(IDC_MOD_RADIO_BEGIN)->EnableWindow(FALSE);
GetDlgItem(IDC_MOD_RADIO_END)->EnableWindow(FALSE);
CheckDlgButton(IDC_MOD_RADIO_RENAME, BST_CHECKED);
}
if ( m_bFilenameMode )
SelectOnlyFileName();
// ismod [end]
return TRUE;
}
示例11: ASSERT
BOOL CPreferencesDlg::OnInitDialog()
{
ASSERT( !m_bSaveIniFile );
BOOL bResult = CTreePropSheet::OnInitDialog();
InitWindowStyles(this);
for (int i = 0; i < m_pages.GetSize(); i++)
{
if (GetPage(i)->m_psp.pszTemplate == m_pPshStartPage)
{
SetActivePage(i);
break;
}
}
//Xman Preferences Banner
CBitmap bmp;
VERIFY( bmp.Attach(theApp.LoadImage(_T("BANNER"), _T("JPG"))) );
if (bmp.GetSafeHandle())
{
m_banner.SetTexture((HBITMAP)bmp.Detach());
m_banner.SetFillFlag(KCSB_FILL_TEXTURE);
m_banner.SetSize(75);
m_banner.SetTitle(_T(""));
m_banner.SetCaption(_T(""));
m_banner.Attach(this, KCSB_ATTACH_RIGHT);
}
//Xman end
Localize();
return bResult;
}
示例12: InitWindowStyles
BOOL CPPgWebServer::OnInitDialog()
{
CPropertyPage::OnInitDialog();
InitWindowStyles(this);
((CEdit*)GetDlgItem(IDC_WSPASS))->SetLimitText(12);
((CEdit*)GetDlgItem(IDC_WSPORT))->SetLimitText(6);
LoadSettings();
Localize();
OnEnChangeWSEnabled();
//==> remove MobileMule [shadow2004]
#if defined(MM)
// note: there are better classes to create a pure hyperlink, however since it is only needed here
// we rather use an already existing class
CRect rect;
GetDlgItem(IDC_GUIDELINK)->GetWindowRect(rect);
::MapWindowPoints(NULL, m_hWnd, (LPPOINT)&rect, 2);
m_wndMobileLink.CreateEx(NULL,0,_T("MsgWnd"),WS_BORDER | WS_VISIBLE | WS_CHILD | HTC_WORDWRAP | HTC_UNDERLINE_HOVER,rect.left,rect.top,rect.Width(),rect.Height(),m_hWnd,0);
m_wndMobileLink.SetBkColor(::GetSysColor(COLOR_3DFACE)); // still not the right color, will fix this later (need to merge the .rc file before it changes ;) )
m_wndMobileLink.SetFont(GetFont());
if (!bCreated){
bCreated = true;
m_wndMobileLink.AppendText(_T("Link: "));
m_wndMobileLink.AppendHyperLink(GetResString(IDS_MMGUIDELINK),0,CString(_T("http://mobil.emule-project.net")),0,0);
}
#endif //MM
//<== remove MobileMule [shadow2004]
return TRUE;
}
示例13: InitWindowStyles
BOOL CPPgStats::OnInitDialog()
{
CPropertyPage::OnInitDialog();
InitWindowStyles(this);
((CSliderCtrl*)GetDlgItem(IDC_SLIDER))->SetRange(0, 200, TRUE);
m_ctlGraphsUpdate.SetPos(thePrefs.GetTrafficOMeterInterval());
m_ctlGraphsUpdate.SetTicFreq(10);
m_ctlGraphsUpdate.SetPageSize(10);
m_ctlStatsUpdate.SetPos(thePrefs.GetStatsInterval());
m_ctlStatsUpdate.SetTicFreq(10);
m_ctlStatsUpdate.SetPageSize(10);
m_ctlGraphsAvgTime.SetRange(0, 99);
m_ctlGraphsAvgTime.SetPos(thePrefs.GetStatsAverageMinutes() - 1);
for (int i = 10; i < 100; i += 10)
m_ctlGraphsAvgTime.SetTic(i - 1);
m_ctlGraphsAvgTime.SetPageSize(10);
m_iGraphsUpdate = thePrefs.GetTrafficOMeterInterval();
m_iGraphsAvgTime = thePrefs.GetStatsInterval();
m_iStatsUpdate = thePrefs.GetStatsAverageMinutes();
CheckDlgButton(IDC_FILL_GRAPHS, thePrefs.GetFillGraphs());
// Set the Connections Statistics Y-Axis Scale
SetDlgItemInt(IDC_CGRAPHSCALE, thePrefs.GetStatsMax(), FALSE);
// Build our ratio combo and select the item corresponding to the currently set preference
m_cratio.AddString(_T("1:1"));
m_cratio.AddString(_T("1:2"));
m_cratio.AddString(_T("1:3"));
m_cratio.AddString(_T("1:4"));
m_cratio.AddString(_T("1:5"));
m_cratio.AddString(_T("1:10"));
m_cratio.AddString(_T("1:20"));
int n = thePrefs.GetStatsConnectionsGraphRatio();
m_cratio.SetCurSel((n==10)?5:((n==20)?6:n-1));
// ==> Source Graph - Stulle
if(thePrefs.GetSrcGraph())
CheckDlgButton(IDC_SRCGRAPH,1);
else
CheckDlgButton(IDC_SRCGRAPH,0);
SetDlgItemInt(IDC_STATSHL_MIN, thePrefs.GetStatsHLMin(), FALSE);
SetDlgItemInt(IDC_STATSHL_MAX, thePrefs.GetStatsHLMax(), FALSE);
// <== Source Graph - Stulle
m_iStatsColors = thePrefs.GetNumStatsColors();
m_pdwStatsColors = new DWORD[m_iStatsColors];
thePrefs.GetAllStatsColors(m_iStatsColors, m_pdwStatsColors);
Localize();
SetModified(FALSE);
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}
示例14: InitWindowStyles
TEMPLATE BOOL CDialogMinTrayBtn<BASE>::OnInitDialog()
{
BOOL bReturn = BASE::OnInitDialog();
InitWindowStyles(this);
m_nMinTrayBtnTimerId = SetTimer(TIMERMINTRAYBTN_ID, TIMERMINTRAYBTN_PERIOD, NULL);
return bReturn;
}
示例15: InitWindowStyles
BOOL CCommentDialog::OnInitDialog()
{
CResizablePage::OnInitDialog();
InitWindowStyles(this);
AddAnchor(IDC_LST, TOP_LEFT, BOTTOM_RIGHT);
AddAnchor(IDC_CMT_LQUEST, TOP_LEFT, TOP_RIGHT);
AddAnchor(IDC_CMT_LAIDE, TOP_LEFT, TOP_RIGHT);
AddAnchor(IDC_CMT_TEXT, TOP_LEFT, TOP_RIGHT);
AddAnchor(IDC_RATEQUEST, TOP_LEFT, TOP_RIGHT);
AddAnchor(IDC_RATEHELP, TOP_LEFT, TOP_RIGHT);
AddAnchor(IDC_USERCOMMENTS, TOP_LEFT, BOTTOM_RIGHT);
AddAnchor(IDC_RESET, TOP_RIGHT);
AddAnchor(IDC_SEARCHKAD, BOTTOM_RIGHT);
// ismod
AddAnchor(IDC_RATELIST, TOP_LEFT);
m_lstComments.Init();
Localize();
// start time for calling 'RefreshData'
VERIFY( (m_timer = SetTimer(301, 5000, 0)) != NULL );
return TRUE;
}