📄 htglxt.cpp
字号:
// htglxt.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "htglxt.h"
#include "MainFrm.h"
#include "MyDoc.h"
#include "MyView.h"
#include "DMain.h"
#include "DllHeader.h"
#include "DLogin.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CHtglxtApp
BEGIN_MESSAGE_MAP(CHtglxtApp, CWinApp)
//{{AFX_MSG_MAP(CHtglxtApp)
//}}AFX_MSG_MAP
// Standard file based document commands
ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
// Standard print setup command
ON_COMMAND(ID_FILE_PRINT_SETUP, CWinApp::OnFilePrintSetup)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CHtglxtApp construction
CHtglxtApp::CHtglxtApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CHtglxtApp object
CHtglxtApp theApp;
RxADO ado;
HINSTANCE hInstance;
PrintStruct m_ps;
/////////////////////////////////////////////////////////////////////////////
// CHtglxtApp initialization
BOOL CHtglxtApp::InitInstance()
{
AfxEnableControlContainer();
//载入动态库
hInstance =LoadLibrary("RxDLL.dll");
//载入RXDLL中的函数
MoneyToChineseCode=(_MoneyToChineseCode*)GetProcAddress(hInstance,"MoneyToChineseCode");
CTimeToCString=(_CTimeToCString*)GetProcAddress(hInstance,"CTimeToCString");
CStringTOCTime=(_CStringTOCTime*)GetProcAddress(hInstance,"CStringTOCTime");
Padl=(_Padl*)GetProcAddress(hInstance,"Padl");
CharToLetterCode=(_CharToLetterCode*)GetProcAddress(hInstance,"CharToLetterCode");
if(ado.SetConnection("Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=htglxt;Data Source=(local)")==false)
return false;
cnn=ado.GetConnection();
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
SetRegistryKey(_T("Local AppWizard-Generated Applications"));
LoadStdProfileSettings(); // Load standard INI file options (including MRU)
CDLogin dlg;
dlg.DoModal();
return TRUE;
}
/////////////////////////////////////////////////////////////////////////////
// CHtglxtApp message handlers
void CHtglxtApp::Print()
{
this->m_pDocManager=NULL;
this->m_pMainWnd=NULL;
CSingleDocTemplate* pDocTemplate;
pDocTemplate = new CSingleDocTemplate(
IDR_MAINFRAME,
RUNTIME_CLASS(CMyDoc),
RUNTIME_CLASS(CMainFrame), // main SDI frame window
RUNTIME_CLASS(CMyView));
AddDocTemplate(pDocTemplate);
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
if (!ProcessShellCommand(cmdInfo))
return ;
m_pMainWnd->ShowWindow(SW_SHOWMAXIMIZED);
m_pMainWnd->UpdateWindow();
}
int CHtglxtApp::ExitInstance()
{
::FreeLibrary(hInstance);
return CWinApp::ExitInstance();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -