⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 barfontuser.cpp

📁 面向软件工程的Visual C++网络程序开发
💻 CPP
字号:
// BarFontUser.cpp : implementation file
//

#include "stdafx.h"
#include "falcon_jxc.h"
#include "BarFontUser.h"
#include "DlgDHHY.h"
#include "mainfrm.h"
#include "falcon_jxcview.h"
#include "DlgZCXS.h"
#include "DlgZCXS_SHHY.h"
#include "Dlgdiaobo.h"
#include "DlgZCXS_SQWK.h"
#include "Dlggzd.h"
#include "XsgzcxDlg.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CBarFontUser dialog
IMPLEMENT_DYNCREATE(CBarFontUser, CDialog)

CBarFontUser::CBarFontUser(CWnd* pParent /*=NULL*/)
	: CDialog(CBarFontUser::IDD, pParent)
{
	//{{AFX_DATA_INIT(CBarFontUser)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CBarFontUser::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CBarFontUser)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CBarFontUser, CDialog)
	//{{AFX_MSG_MAP(CBarFontUser)
	ON_BN_CLICKED(IDC_dinghuo, Ondinghuo)
	ON_BN_CLICKED(IDC_soukuanpinju, Onsoukuanpinju)
	ON_BN_CLICKED(IDC_songhuo, Onsonghuo)
	ON_BN_CLICKED(IDC_diaobodan, Ondiaobodan)
	ON_BN_CLICKED(IDC_shouquweikuan, Onshouquweikuan)
	ON_BN_CLICKED(IDC_BUTTON9, OnButton9)
	ON_BN_CLICKED(IDC_BUTTON10, OnButton10)
	ON_BN_CLICKED(IDC_BUTTON11, OnButton11)
	ON_BN_CLICKED(IDC_BUTTON12, OnButton12)
	ON_BN_CLICKED(IDC_Gengzhongdan, OnGengzhongdan)
	ON_BN_CLICKED(IDC_XSGZCX, OnXsgzcx)
	ON_BN_CLICKED(IDC_Gengzhongdan2, OnGengzhongdan2)
	ON_BN_CLICKED(IDC_XSGZCX2, OnXsgzcx2)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CBarFontUser message handlers

BOOL CBarFontUser::OnInitDialog() 
{
	CDialog::OnInitDialog();
//	SetSkin( "skin\\pstyle\\theme.ini" );
	
	// TODO: Add extra initialization here
	CPaintDC dc(this);

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}/*
#define     GetWindowStyle(hwnd)    ((DWORD)GetWindowLong(hwnd, GWL_STYLE))//

BOOL CALLBACK EnumChildProc4556(  HWND hwnd,      // handle to child window
							LPARAM lParam   // application-defined value
							)
{
	char classname[200];
	CBarFontUser *dlg = (CBarFontUser *)lParam;
	DWORD style;
		
	GetClassName( hwnd, classname, 200 );
	style = GetWindowStyle( hwnd );
	if ( strcmp( classname, "Button" ) == 0 )
	{
		style = (UINT)GetWindowLong(hwnd, GWL_STYLE) & 0xff;
		if ( style == BS_PUSHBUTTON || style == BS_DEFPUSHBUTTON )
			dlg->SubClassButton( hwnd );
		;
	}


	return TRUE;
}
BOOL CBarFontUser::SetSkin(CString file)
{
	m_skinWin.LoadSkin( file );
	m_btnres.LoadSkin( file );
	if ( m_bFirst )
	{
		m_skinWin.InstallSkin( this );
		EnumChildWindows( m_hWnd, EnumChildProc4556, (LPARAM)this );

		m_bFirst = FALSE;
	}
	SetWindowPos( 0, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE |SWP_FRAMECHANGED );
	return TRUE;

}
BOOL CBarFontUser::SubClassButton( HWND hwnd )
{
	CSkinButton * btn = new CSkinButton();
	CWnd* pWnd = CWnd::FromHandlePermanent(hwnd);
	if ( pWnd == NULL)
	{
		btn->SubclassWindow( hwnd );
		btn->SetResource( &m_btnres );
		return TRUE;
	}
	return FALSE;
}
*/

void CBarFontUser::Ondinghuo() 
{
	// TODO: Add your control notification handler code here
//	CDlgDHHY dhhy;
//	dhhy.DoModal();
	CMainFrame* pwnd=(CMainFrame*)AfxGetApp()->m_pMainWnd;
	CFALCON_JXCView* pView=(CFALCON_JXCView*)pwnd->GetActiveView();
	pView->Quotationform();


}

void CBarFontUser::Onsoukuanpinju() 
{
	// TODO: Add your control notification handler code here
//	CDlgZCXS_SKPJ dlg;
//	dlg.DoModal();
	CMainFrame* pwnd=(CMainFrame*)AfxGetApp()->m_pMainWnd;
	CFALCON_JXCView* pView=(CFALCON_JXCView*)pwnd->GetActiveView();
	pView->OnSkpjYdxs();
}

void CBarFontUser::Onsonghuo() 
{
//	CDlgZCXS_SHHY dlg;
//	dlg.DoModal();	
	CMainFrame* pwnd=(CMainFrame*)AfxGetApp()->m_pMainWnd;
	CFALCON_JXCView* pView=(CFALCON_JXCView*)pwnd->GetActiveView();
	pView->OnZcxsShhy();
}

void CBarFontUser::Ondiaobodan() 
{
	// TODO: Add your control notification handler code here
	CMainFrame* pwnd=(CMainFrame*)AfxGetApp()->m_pMainWnd;
	CFALCON_JXCView* pView=(CFALCON_JXCView*)pwnd->GetActiveView();	
	if(pView->GetDocument()->m_sQuanXianArray[5]=="0")
	{
		AfxMessageBox("你没有权限!");
		return ;
	}
		CDlgDiaobo dlg;
	dlg.DoModal();
}

void CBarFontUser::Onshouquweikuan() 
{
	CMainFrame* pwnd=(CMainFrame*)AfxGetApp()->m_pMainWnd;
	CFALCON_JXCView* pView=(CFALCON_JXCView*)pwnd->GetActiveView();	
	if(pView->GetDocument()->m_sQuanXianArray[6]=="0")
	{
		AfxMessageBox("你没有权限!");
		return ;
	}
	CDlgZCXS_SQWK dlg;
	dlg.DoModal();	
}

void CBarFontUser::OnButton9() 
{
//	CDlgZCXS_SKPJ dlg;
//	dlg.DoModal();	CMainFrame* pwnd=(CMainFrame*)AfxGetApp()->m_pMainWnd;
	CMainFrame* pwnd=(CMainFrame*)AfxGetApp()->m_pMainWnd;

	CFALCON_JXCView* pView=(CFALCON_JXCView*)pwnd->GetActiveView();
	pView->OnZcxsSkpj();
}

void CBarFontUser::OnButton10() 
{
	CMainFrame* pwnd=(CMainFrame*)AfxGetApp()->m_pMainWnd;
	CFALCON_JXCView* pView=(CFALCON_JXCView*)pwnd->GetActiveView();
	pView->OnZcxsShhy();
}

void CBarFontUser::OnButton11() 
{
	CMainFrame* pwnd=(CMainFrame*)AfxGetApp()->m_pMainWnd;
	CFALCON_JXCView* pView=(CFALCON_JXCView*)pwnd->GetActiveView();	
	if(pView->GetDocument()->m_sQuanXianArray[5]=="0")
	{
		AfxMessageBox("你没有权限!");
		return ;
	}
	CDlgDiaobo dlg;
	dlg.DoModal();	
}

void CBarFontUser::OnButton12() 
{
	CMainFrame* pwnd=(CMainFrame*)AfxGetApp()->m_pMainWnd;
	CFALCON_JXCView* pView=(CFALCON_JXCView*)pwnd->GetActiveView();	
	if(pView->GetDocument()->m_sQuanXianArray[6]=="0")
	{
		AfxMessageBox("你没有权限!");
		return ;
	}
	CDlgZCXS_SQWK dlg;
	dlg.DoModal();	
}

void CBarFontUser::OnGengzhongdan() 
{
	CMainFrame* pwnd=(CMainFrame*)AfxGetApp()->m_pMainWnd;
	CFALCON_JXCView* pView=(CFALCON_JXCView*)pwnd->GetActiveView();	
	if(pView->GetDocument()->m_sQuanXianArray[7]=="0")
	{
		AfxMessageBox("你没有权限!");
		return ;
	}
	CDlgGZD dlg;
	dlg.DoModal();
}

void CBarFontUser::OnXsgzcx() 
{
	CMainFrame* pwnd=(CMainFrame*)AfxGetApp()->m_pMainWnd;
	CFALCON_JXCView* pView=(CFALCON_JXCView*)pwnd->GetActiveView();	
	if(pView->GetDocument()->m_sQuanXianArray[8]=="0")
	{
		AfxMessageBox("你没有权限!");
		return ;
	}
	CXsgzcxDlg dlg;
	dlg.DoModal();
}

void CBarFontUser::OnGengzhongdan2() 
{
	CMainFrame* pwnd=(CMainFrame*)AfxGetApp()->m_pMainWnd;
	CFALCON_JXCView* pView=(CFALCON_JXCView*)pwnd->GetActiveView();	
	if(pView->GetDocument()->m_sQuanXianArray[7]=="0")
	{
		AfxMessageBox("你没有权限!");
		return ;
	}
	CDlgGZD dlg;
	dlg.DoModal();
}

void CBarFontUser::OnXsgzcx2() 
{
	CMainFrame* pwnd=(CMainFrame*)AfxGetApp()->m_pMainWnd;
	CFALCON_JXCView* pView=(CFALCON_JXCView*)pwnd->GetActiveView();	
	if(pView->GetDocument()->m_sQuanXianArray[8]=="0")
	{
		AfxMessageBox("你没有权限!");
		return ;
	}
	CXsgzcxDlg dlg;
	dlg.DoModal();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -