• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ AfxGetProfile函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: AfxGetSListStockContainer

void CSListView::ResetColumns( )
{
	CStockContainer & container = AfxGetSListStockContainer();
	container.Lock();
	
	//  its list control through a call to GetListCtrl().
	CSPDWordArray	& auint = AfxGetProfile().GetSListColumnsShow( );
	ASSERT( auint.GetSize() > 0 );

	m_Grid.SetRedraw( FALSE );

	m_Grid.DeleteAllItems();

	m_Grid.SetRowCount(1);
	m_Grid.SetFixedRowCount(1);
	m_Grid.SetFixedColumnCount(1);
	m_Grid.SetColumnCount(auint.GetSize());

	for( int nCol=0; nCol<auint.GetSize(); nCol++ )
	{
		CString	string	=	AfxGetVariantName(auint[nCol],TRUE);
		m_Grid.SetItemText( 0, nCol, string );
		m_Grid.SetItemData( 0, nCol, auint[nCol] );
		m_Grid.SetItemFormat( 0, nCol, DT_CENTER|DT_VCENTER|DT_SINGLELINE );
		m_Grid.SetItemBkColour( 0, nCol, AfxGetProfile().GetColor(CColorClass::clrSListBK) );
		m_Grid.SetItemFgColour( 0, nCol, AfxGetProfile().GetColor(CColorClass::clrTitle) );
	}

	m_Grid.AutoSizeColumns();

	m_Grid.SetRedraw( TRUE, TRUE );
	m_Grid.Invalidate( );
	
	container.UnLock();
}
开发者ID:ZhaoboMeng,项目名称:k-line-print,代码行数:35,代码来源:SListView.cpp


示例2: UpdateStockContainerByKData

BOOL UpdateStockContainerByKData( CStockContainer &container, LPCTSTR lpszCode, CKData & kdata )
{
	container.Lock();

	int	id = 0;
	if( CKData::ktypeDay == kdata.GetKType()
		&& container.GetStockInfo( lpszCode, NULL, &id ) )
	{
		CStockInfo	& info	=	container.ElementAt(id);
		if( kdata.GetSize() > (int)AfxGetProfile().GetCacheDays() )
		{
			// 只使用AfxGetProfile().GetCacheDays()天的数据
			CKData	temp( kdata.GetKType() );
			for( int i=kdata.GetSize()-AfxGetProfile().GetCacheDays(); i<kdata.GetSize(); i++ )
				temp.Add( kdata.ElementAt(i) );
			info.m_kdata.MergeKData( &temp );
		}
		else
			info.m_kdata.MergeKData( &kdata );

		
		// 指数涨跌家数
		int nSize = info.m_kdata.GetSize();
		if( nSize > 0 )
		{
			info.m_dwAdvance	=	info.m_kdata.ElementAt(nSize-1).m_dwAdvance;
			info.m_dwDecline	=	info.m_kdata.ElementAt(nSize-1).m_dwDecline;
		}
	}
	container.UnLock();
	return TRUE;
}
开发者ID:amikey,项目名称:tradingstrategyking,代码行数:32,代码来源:Packets.cpp


示例3: SetFocus

void CGraphView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint) 
{
	// TODO: Add your specialized code here and/or call the base class
	if( UPDATE_HINT_GRAPHVIEW != lHint && UPDATE_HINT_GRAPHVIEW_NOTRELOADDATA != lHint )
		return;
	if( !IsWindowVisible() )
		return;
	SetFocus( );

	CStockInfo	info;
	if( AfxGetProfile().GetCurrentStock( &info ) )
	{
		m_graph.SetCurStock( info );
		m_graph.PrepareStockData( UPDATE_HINT_GRAPHVIEW_NOTRELOADDATA != lHint );
	}
	else
	{
		m_graph.SetCurStock( STKLIB_CODE_MAIN );
		m_graph.PrepareStockData( UPDATE_HINT_GRAPHVIEW_NOTRELOADDATA != lHint );
		AfxGetProfile().SetCurrentStock( STKLIB_CODE_MAIN, FALSE );
	}

	Invalidate( );

	CMainFrame	* pFrame = AfxGetMainFrame();
	if( pFrame )
		pFrame->m_SearchBox.SetCurrentWindowText( );
}
开发者ID:darwinbeing,项目名称:trade,代码行数:28,代码来源:GraphView.cpp


示例4: AfxInitializeDB

//////////////////////////////////////////////////////////////////////////////////
// database functions
BOOL AfxInitializeDB( LPSTR lpErr, UINT nMaxSize )
{
	if( lpErr && nMaxSize > 0 )
		memset( lpErr, 0, nMaxSize );

	if( !CStDatabase::CreateSelfDB( AfxGetProfile().GetSelfDBPath() ) )
	{
		if( lpErr )	strncpy( lpErr, db_errcreateselfdb, min(nMaxSize-1,strlen(db_errcreateselfdb)) );
		return FALSE;
	}

	if( !AfxGetDB().SetRootPath( AfxGetProfile().GetSelfDBPath(), IStStore::dbtypeSelfDB ) )
	{
		if( lpErr )	strncpy( lpErr, db_errrootpath, min(nMaxSize-1,strlen(db_errrootpath)) );
		return FALSE;
	}

	CSPString	strQianlongPath	=	AfxGetProfile().GetQianlongPath();
	if( strQianlongPath.GetLength() > 0
		&& !AfxGetDB().AddAssistantRootPath( strQianlongPath, IStStore::dbtypeQianlong ) )
	{
		if( lpErr )	strncpy( lpErr, db_errqianlongpath, min(nMaxSize-1,strlen(db_errqianlongpath)) );
		return FALSE;
	}

	return TRUE;
}
开发者ID:darwinbeing,项目名称:trade,代码行数:29,代码来源:AfxCore.cpp


示例5: SetFocus

void CRealTimeView::OnUpdate(CView* pSender, LPARAM lHint, CObject* pHint) 
{
	// TODO: Add your specialized code here and/or call the base class
	if( UPDATE_HINT_REALTIMEVIEW != lHint )
		return;
	if( !IsWindowVisible() )
		return;
	SetFocus( );

	ASSERT( RTV_MAX_MULTICOUNT > 0 );

	CStockInfo	info;
	if( AfxGetProfile().GetCurrentStock( &info ) )
	{
		m_realtime[0].SetCurStock( info );
		m_realtime[0].PrepareStockData( );
	}
	else
	{
		m_realtime[0].SetCurStock( STKLIB_CODE_MAIN );
		m_realtime[0].PrepareStockData( );
		AfxGetProfile().SetCurrentStock( STKLIB_CODE_MAIN, FALSE );
	}
	if( CRealTime::modeReportDetail == m_realtime[0].GetDrawMode() )
		AfxGetStkReceiver().RequestStockData( CStock::dataDetail, &info, 1, 0, 0 );
	else
		AfxGetStkReceiver().RequestStockData( CStock::dataMinute, &info, 1, 0, 0 );

	// 多股同列
	int i;
	for( i=1; i<m_nMultiStockCount && i<RTV_MAX_MULTICOUNT; i++ )
	{
		if( AfxGetProfile().GetNextStock( &info ) )
		{
			m_realtime[i].SetCurStock( info );
			m_realtime[i].PrepareStockData( );
			if( CRealTime::modeReportDetail == m_realtime[0].GetDrawMode() )
				AfxGetStkReceiver().RequestStockData( CStock::dataDetail, &info, 1, 0, 0 );
			else
				AfxGetStkReceiver().RequestStockData( CStock::dataMinute, &info, 1, 0, 0 );
		}
	}
	for( i=1; i<m_nMultiStockCount && i<RTV_MAX_MULTICOUNT; i++ )
		AfxGetProfile().GetPrevStock( &info );

	Invalidate( );

	if( 1 == m_nMultiStockCount && CRealTime::modePriceLine == m_realtime[0].GetDrawMode() )
		m_wndReportTab.SetWindowPos( NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_SHOWWINDOW );
	else
		m_wndReportTab.SetWindowPos( NULL, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_HIDEWINDOW );

	CMainFrame	* pFrame = AfxGetMainFrame();
	if( pFrame )
		pFrame->m_SearchBox.SetCurrentWindowText( );

	SendRequestQuote(TRUE);
}
开发者ID:ZhaoboMeng,项目名称:k-line-print,代码行数:58,代码来源:RealTimeView.cpp


示例6: AfxGetProfile

void CSetColumnDlg::OnSetdefault() 
{
	// TODO: Add your control notification handler code here
	if( IDYES == AfxMessageBox( IDS_SETCOLUMN_SETDEFAULT, MB_YESNO | MB_ICONINFORMATION ) )
	{
		AfxGetProfile().SetSListColumnsDefault( );
		SetListColumnItems( AfxGetProfile().GetSListColumnsShow(), TRUE );
	}
}
开发者ID:amikey,项目名称:tradingstrategyking,代码行数:9,代码来源:SetColumnDlg.cpp


示例7: AfxGetProfile

LRESULT CGraphView::OnColorChange(WPARAM wParam, LPARAM lParam)
{
	m_wndReportTab.SetColorTabs(AfxGetProfile().GetColor(CColorClass::clrGraphBK));
	m_wndReportTab.SetSelectTabColor( AfxGetProfile().GetColor(CColorClass::clrGraphBK),
									AfxGetProfile().GetColor(CColorClass::clrTitle) );

	Invalidate( );
	return 0L;
}
开发者ID:darwinbeing,项目名称:trade,代码行数:9,代码来源:GraphView.cpp


示例8: AfxGetProfile

LRESULT CSListView::OnColorChange(WPARAM wParam, LPARAM lParam)
{
	m_wndWorkTab.SetSelectTabColor( AfxGetProfile().GetColor(CColorClass::clrSListBK),
									AfxGetProfile().GetColor(CColorClass::clrTitle) );
	m_wndWorkTab.Invalidate( );

	m_Grid.SetBkColor( AfxGetProfile().GetColor(CColorClass::clrSListBK) );
	m_Grid.SetTextBkColor( AfxGetProfile().GetColor(CColorClass::clrSListBK) );
	m_Grid.SetSelectedBkColor(AfxGetProfile().GetColor(CColorClass::clrSListSelected));

	OnUpdate( NULL, UPDATE_HINT_SLISTVIEW, NULL );
	return 0L;
}
开发者ID:ZhaoboMeng,项目名称:k-line-print,代码行数:13,代码来源:SListView.cpp


示例9: UpdateData

void CSetColorDlg::OnCancel() 
{
	// TODO: Add extra cleanup here
	UpdateData();

	CColorClassContainer & container = AfxGetProfile().GetColorClassContainer( );
	container.SetColorClass( m_clsOriginal );
	
	CXFDialog::OnCancel();

	AfxGetProfile().StoreProfile( );
	OnColorChanged( );
}
开发者ID:amikey,项目名称:tradingstrategyking,代码行数:13,代码来源:SetColorDlg.cpp


示例10: AfxGetProfile

void CTyDataDlg::LoadProfile( )
{
	m_strFileDest	=	AfxGetProfile().GetExportPath() + "Tysj.stk";

	m_strPathSrcSH	=	AfxGetApp()->GetProfileString( "tydata", "pathsrcsh", m_strPathSrcSH );
	m_strPathSrcSZ	=	AfxGetApp()->GetProfileString( "tydata", "pathsrcsz", m_strPathSrcSZ );
	m_strFileDest	=	AfxGetApp()->GetProfileString( "tydata", "filedest", m_strFileDest );

	if( (0 != access( m_strPathSrcSH, 0 ) || FILE_ATTRIBUTE_DIRECTORY != GetFileAttributes( m_strPathSrcSH ) ) )
		m_strPathSrcSH	=	AfxGetProfile().GetWorkDirectory() + "data\\shase\\day\\";
	if( (0 != access( m_strPathSrcSZ, 0 ) || FILE_ATTRIBUTE_DIRECTORY != GetFileAttributes( m_strPathSrcSZ ) ) )
		m_strPathSrcSZ	=	AfxGetProfile().GetWorkDirectory() + "data\\sznse\\day\\";
}
开发者ID:amikey,项目名称:tradingstrategyking,代码行数:13,代码来源:TyDataDlg.cpp


示例11: SetFont

int CRealTimeView::OnCreate(LPCREATESTRUCT lpCreateStruct) 
{
	if (CView::OnCreate(lpCreateStruct) == -1)
		return -1;
	
	CFont	font;
	if( !font.CreateStockObject( DEFAULT_GUI_FONT ) )
		font.CreateStockObject( ANSI_VAR_FONT );
	SetFont( &font );

	// tab
	if (!m_wndReportTab.Create(WS_VISIBLE|WS_CHILD,CRect(0,0,180,19),this,IDC_REALTIMEVIEW_REPORTTAB))
		return -1;
	
	CString	strName;
	strName.LoadString( IDS_REALTIMETAB_QUOTE );
	m_wndReportTab.Addtab( this, strName, -1);
	strName.LoadString( IDS_REALTIMETAB_PRICE );
	m_wndReportTab.Addtab( this, strName, -1);
	strName.LoadString( IDS_REALTIMETAB_MINUTE );
	m_wndReportTab.Addtab( this, strName, -1);
	strName.LoadString( IDS_REALTIMETAB_BUYSELLEX );
	m_wndReportTab.Addtab( this, strName, -1);
	strName.LoadString( IDS_REALTIMETAB_VALUE );
	m_wndReportTab.Addtab( this, strName, -1);
	strName.LoadString( IDS_REALTIMETAB_DISTRIBUTE );
	m_wndReportTab.Addtab( this, strName, -1);
	strName.LoadString( IDS_REALTIMETAB_BIGTRADE );
	m_wndReportTab.Addtab( this, strName, -1);

	m_wndReportTab.SetColorTabs(AfxGetProfile().GetColor(CColorClass::clrGraphBK));
	m_wndReportTab.SetSelectTabColor( AfxGetProfile().GetColor(CColorClass::clrGraphBK),
									AfxGetProfile().GetColor(CColorClass::clrTitle) );
	m_wndReportTab.SetAutoAjust(FALSE);
	m_wndReportTab.ShowButtonClose(FALSE);
	m_wndReportTab.SetALingTabs( CGuiTabWnd::ALN_BOTTOM );

	// m_realtime
	for( int i=0; i<RTV_MAX_MULTICOUNT; i++ )
		m_realtime[i].SetParent( this );

	// 实时行情刷新
	AfxGetStkReceiver().AddRcvDataWnd( GetSafeHwnd() );

	// 大单成交刷新
	SetTimer( RTV_TIMER_REFRESHBIGTRADE, 30000, NULL );
	SetTimer( RTV_TIMER_REFRESH, 30000, NULL );

	return 0;
}
开发者ID:darwinbeing,项目名称:trade,代码行数:50,代码来源:RealTimeView.cpp


示例12: AfxGetSView

BOOL CRegisterDlg::OnInitDialog() 
{
	CXFDialog::OnInitDialog();

	m_linkGoPurchase.SetURL( (LPCTSTR)AfxGetProfile().GetPurchaseURL() );

	BOOL	bEnableApplyForEva = FALSE;
	BOOL	bEvaluate	=	AfxGetSView().IsEva();
	if( bEvaluate )
	{
		CString	strLeftDays;
		if( AfxGetSView().GetLeft() > AfxGetSView().GetMaxEvaDays() )
			strLeftDays.LoadString( IDS_REGISTER_NOTIMELIMIT );
		else
			strLeftDays.Format( "%d", AfxGetSView().GetLeft() );
		m_staticLeftDays.SetWindowText( strLeftDays );
		bEnableApplyForEva = (AfxGetSView().GetMaxEvaDays() <= 0);
	}
	else
	{
		CString	strPurchased;
		strPurchased.LoadString( IDS_REGISTER_PURCHASED );
		m_staticLeftDaysTitle.SetWindowText( strPurchased );

		m_staticLeftDays.SetWindowPos( NULL, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_HIDEWINDOW );
		m_linkGoPurchase.SetWindowPos( NULL, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_HIDEWINDOW );

		m_strUserName	=	AfxGetSView().GetU();
		m_strRegCode	=	AfxGetSView().GetR();
	}

	m_strSoftNO	=	CSView::GetS();
	UpdateData( FALSE );

	m_btnApplyforEva.EnableWindow( bEnableApplyForEva );

	CenterWindow();

	CString	strInfo;
	if( bEvaluate && AfxGetSView().GetLeft() <= 0 )
	{
		strInfo.LoadString( IDS_EVALUATEINFO );
		AfxMessageBox( strInfo, MB_OK | MB_ICONINFORMATION );
	}

	AfxGetSView().Store( AfxGetProfile().GetSViewFile() );
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
开发者ID:ZhaoboMeng,项目名称:k-line-print,代码行数:49,代码来源:RegisterDlg.cpp


示例13: GetTreeCtrl

LRESULT CTechsView::OnColorChange(WPARAM wParam, LPARAM lParam)
{
	CTreeCtrl &treectrl = GetTreeCtrl();
	COLORREF	clrBK	=	AfxGetProfile().GetColor( CColorClass::clrWorkspBK );
	COLORREF	clrText	=	AfxGetProfile().GetColor( CColorClass::clrWorkspText );
	treectrl.SetBkColor( clrBK );
	treectrl.SetTextColor( clrText );
	
	CWnd * pParent = GetParent();
	if( pParent && ::IsWindow(pParent->GetSafeHwnd()) )
		pParent->SendMessage( WM_GUITABWND_COLORCHANGE, clrBK, clrText );
	
	Invalidate( );
	return 0;
}
开发者ID:maerson,项目名称:mystkproj,代码行数:15,代码来源:TechsView.cpp


示例14: AfxGetProfile

void CSetColorDlg::OnSelchangeColorclass() 
{
	// TODO: Add your control notification handler code here
	CColorClassContainer & container = AfxGetProfile().GetColorClassContainer( );

	if( m_strNameCurrent.GetLength() > 0 )
	{
		CColorClass cls;
		cls.SetColorDefault();
		cls.SetName( m_strNameCurrent );
		StoreToColorClass( cls );
		VERIFY( container.SetColorClass( cls ) );
	}
	
	CString	strNameNow;
	m_comboColorClass.GetWindowText( strNameNow );
	
	CColorClass	clsNow;
	if( container.GetColorClass( strNameNow, clsNow ) )
	{
		LoadFromColorClass( clsNow );
		m_clsOriginal	=	clsNow;
		m_strNameCurrent	=	strNameNow;
		m_btnDelete.EnableWindow( !CColorClass::IsSysColorClass( strNameNow ) );
	}
}
开发者ID:amikey,项目名称:tradingstrategyking,代码行数:26,代码来源:SetColorDlg.cpp


示例15: SetListColumnItems

BOOL CSetColumnDlg::OnInitDialog() 
{
	CXFDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	m_listColumn.SendMessage( LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_CHECKBOXES | LVS_EX_FULLROWSELECT | LVS_EX_HEADERDRAGDROP
						| LVS_EX_FLATSB | LVS_EX_REGIONAL | LVS_EX_INFOTIP | LVS_EX_UNDERLINEHOT );


	CRect	rectList;
	m_listColumn.GetClientRect( &rectList );
	CString	strHeaderName, strHeaderDescript, strHeaderSetting, strUserDefine;
	strHeaderName.LoadString( IDS_SETCOLUMN_NAME );
	strHeaderDescript.LoadString( IDS_SETCOLUMN_DESCRIPT );
	strHeaderSetting.LoadString( IDS_SETCOLUMN_SETTING );
	strUserDefine.LoadString( IDS_SETCOLUMN_USERDEFINE );
	m_listColumn.InsertColumn( 0, strHeaderName, LVCFMT_CENTER, rectList.Width() / 3 - 8 );
	m_listColumn.InsertColumn( 1, strHeaderDescript, LVCFMT_CENTER, rectList.Width() / 3 - 2 );
	m_listColumn.InsertColumn( 2, strHeaderSetting, LVCFMT_CENTER, rectList.Width() / 3 - 8 );

	SetListColumnItems( AfxGetProfile().GetSListColumnsShow(), FALSE );
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
开发者ID:amikey,项目名称:tradingstrategyking,代码行数:25,代码来源:SetColumnDlg.cpp


示例16: AfxGetProfile

BOOL CInstallPacDlg::OnInitDialog() 
{
	CPropertyPageEx::OnInitDialog();
	
	// TODO: Add extra initialization here
	CString	strURL	=	AfxGetProfile().GetDownloadURL();
	m_linkGoWeb.SetURL( strURL );

	CheckRadioButton( IDC_DAYPACKAGE, IDC_MIN5PACKAGE, IDC_DAYPACKAGE );

	m_staticStatus.SetWindowPos( NULL, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_HIDEWINDOW );
	m_ctrlProgress.SetWindowPos( NULL, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_HIDEWINDOW );
	m_btnStop.EnableWindow( FALSE );

	CRect	rect;
	m_listFiles.GetWindowRect( &rect );
	m_listFiles.InsertColumn( 0, "", LVCFMT_LEFT, rect.Width()-5 );

	m_imageList.Create(IDB_PACKAGE, 16, 1, RGB(0, 255, 0));
	m_listFiles.SetImageList( &m_imageList, LVSIL_SMALL );

	m_ctrlProgress.SetRange( 0, STKLIB_MAX_PROGRESS );
	m_ctrlProgress.SetPos( 0 );

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
开发者ID:amikey,项目名称:tradingstrategyking,代码行数:27,代码来源:InstallPacDlg.cpp


示例17: AfxGetProfile

void CDownloadDlg::InitComboServers( )
{
	int i;
	for( i=m_comboServers.GetCount()-1; i>=0; i-- )
		m_comboServers.DeleteString(i);
	CString	strMain	=	AfxGetProfile().GetMainServer();
	m_comboServers.AddString( strMain );
	
	CSPStringArray &	astr	=	AfxGetProfile().GetDownloadServers();
	for( i=0; i<astr.GetSize(); i++ )
	{
		if( 0 != strMain.CompareNoCase((LPCTSTR)astr.ElementAt(i)) )
			m_comboServers.AddString( (LPCTSTR)astr.ElementAt(i) );
	}
	m_comboServers.SelectString( 0, AfxGetProfile().GetDefaultServer() );
}
开发者ID:ZhaoboMeng,项目名称:k-line-print,代码行数:16,代码来源:DownloadDlg.cpp


示例18: ResetColumns

void CSListView::OnInitialUpdate()
{
	CFormView::OnInitialUpdate();

	//	SetColumn
	ResetColumns( );

	// Create Tab
	if( !::IsWindow( m_wndWorkTab.GetSafeHwnd() )
		&& m_wndWorkTab.Create(WS_CHILD|WS_VISIBLE, CRect(0,0,0,0), this, IDC_SLISTVIEW_WORKTAB) )
	{
		CString	strName;
		strName.LoadString( IDS_SLISTVIEW_CLASS );
		m_wndWorkTab.Addtab( &m_Grid, strName, SL_WORKTAB_CLASS);
		strName.LoadString(IDS_SLISTVIEW_NQ);
		m_wndWorkTab.Addtab( &m_Grid, strName, SL_WORKTAB_NQ);
		strName.LoadString( IDS_SLISTVIEW_A );
		m_wndWorkTab.Addtab( &m_Grid, strName, SL_WORKTAB_A);
		strName.LoadString( IDS_SLISTVIEW_SZNB );
		m_wndWorkTab.Addtab( &m_Grid, strName, SL_WORKTAB_SZNB);
		strName.LoadString( IDS_SLISTVIEW_SHB );
		m_wndWorkTab.Addtab( &m_Grid, strName, SL_WORKTAB_SHB);
		strName.LoadString( IDS_SLISTVIEW_BOND );
		m_wndWorkTab.Addtab( &m_Grid, strName, SL_WORKTAB_BOND);
		strName.LoadString( IDS_SLISTVIEW_FUND );
		m_wndWorkTab.Addtab( &m_Grid, strName, SL_WORKTAB_FUND);
		strName.LoadString( IDS_SLISTVIEW_SELF );
		m_wndWorkTab.Addtab( &m_Grid, strName, SL_WORKTAB_SELF);
		strName.LoadString( IDS_SLISTVIEW_GROUP );
		m_wndWorkTab.Addtab( &m_Grid, strName, SL_WORKTAB_GROUP);
		strName.LoadString( IDS_SLISTVIEW_DOMAIN );
		m_wndWorkTab.Addtab( &m_Grid, strName, SL_WORKTAB_DOMAIN);

		m_wndWorkTab.SetSelectTabColor( AfxGetProfile().GetColor(CColorClass::clrSListBK),
										AfxGetProfile().GetColor(CColorClass::clrTitle) );
		m_wndWorkTab.SetActualTitle(FALSE);
		m_wndWorkTab.SetCurtab( SL_WORKTAB_SELF );

		CFont font;
		font.CreateStockObject (DEFAULT_GUI_FONT);
		m_wndWorkTab.SetFont( &font );

		// m_Grid No HScrollBar
		m_Grid.SetOuterHScrollBar( TRUE, m_wndWorkTab.GetSafeHwnd() );
	}
}
开发者ID:ZhaoboMeng,项目名称:k-line-print,代码行数:46,代码来源:SListView.cpp


示例19: GetActiveStrategy

void CStrategyView::OnDestroy() 
{
	CStrategy * pStrategy = GetActiveStrategy();
	if( pStrategy )
		AfxGetProfile().SetLastActiveStrategy( (LPCTSTR)m_pActiveStrategy->GetPathName() );

	CTreeView::OnDestroy();
}
开发者ID:amikey,项目名称:tradingstrategyking,代码行数:8,代码来源:StrategyView.cpp


示例20: AfxMessageBox

void CInstallPacDlg::OnStart() 
{
	// TODO: Add extra validation here
	if( 0 == m_listFiles.GetItemCount() )
	{
		AfxMessageBox( IDS_SELECTPACKAGE_FIRST, MB_OK | MB_ICONINFORMATION );
		return;
	}

	UpdateData( );
	// clear error pac msg
	m_astrErrorPac.RemoveAll();

	m_btnStart.EnableWindow( FALSE );
	m_btnStop.EnableWindow( TRUE );

	BOOL	bOK	=	TRUE;
	if( bOK && !m_netdb.SetRootPath( AfxGetProfile().GetSelfDBPath(), IStStore::dbtypeSelfDB ) )
	{
		AfxMessageBox( IDS_ROOTPATH_ERROR, MB_OK | MB_ICONINFORMATION );
		bOK	=	FALSE;
	}

	if( bOK )
	{
		m_staticStatus.SetWindowPos( NULL, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_SHOWWINDOW );
		m_ctrlProgress.SetWindowPos( NULL, 0, 0, 0, 0, SWP_NOSIZE|SWP_NOMOVE|SWP_NOZORDER|SWP_SHOWWINDOW );

		CInstallPacDlg::m_hEventKillInstallThread = CreateEvent(NULL,FALSE,FALSE,NULL);
		CInstallPacDlg::m_hEventInstallThreadKilled = CreateEvent(NULL,FALSE,FALSE,NULL);

		m_astrPacFiles.RemoveAll();
		for( int i=0; i<m_listFiles.GetItemCount(); i++ )
			m_astrPacFiles.Add( m_listFiles.GetItemText( i, 0 ) );

		if( NULL == m_pInstallInfo )
			m_pInstallInfo	=	new INSTALL_INFO;
		memset( m_pInstallInfo, 0, sizeof(INSTALL_INFO) );
		m_pInstallInfo->hMainWnd	=	GetSafeHwnd();
		m_pInstallInfo->pNetDB		=	&m_netdb;
		m_pInstallInfo->pStringArray=	&m_astrPacFiles;

		CButton * pbtnDay	= (CButton *)GetDlgItem( IDC_DAYPACKAGE );
		CButton * pbtnMin5		= (CButton *)GetDlgItem( IDC_MIN5PACKAGE );

		m_pInstallInfo->nType	=	CPackage::packageUnknown;
		if( pbtnDay && pbtnDay->GetCheck() )
			m_pInstallInfo->nType	=	CPackage::packageDay;
		if( pbtnMin5 && pbtnMin5->GetCheck() )
			m_pInstallInfo->nType	=	CPackage::packageMin5;
		AfxBeginThread( InstallMain, (LPVOID)m_pInstallInfo,THREAD_PRIORITY_NORMAL);
	}
	else
	{
		m_btnStart.EnableWindow( TRUE );
		m_btnStop.EnableWindow( FALSE );
	}
}
开发者ID:amikey,项目名称:tradingstrategyking,代码行数:58,代码来源:InstallPacDlg.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ AfxGetResourceHandle函数代码示例发布时间:2022-05-30
下一篇:
C++ AfxGetModuleState函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap