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

📄 hwimplicituse.cpp

📁 C++编程实践与技巧一书各章节的源码
💻 CPP
字号:
// HWImplicitUse.cpp : Defines the entry point for the application.
//

#include "stdafx.h"
#include "HWImplicitUse.h"

//CMainApp Implementation
CMainApp::CMainApp()
{}

CMainApp::~CMainApp()
{}

BOOL CMainApp::InitInstance()
{
	if (!CWinApp::InitInstance())
		return FALSE;
    CMainWnd* t_pMainWnd=new CMainWnd();
	if (t_pMainWnd==NULL)
		return FALSE;
	
	m_pMainWnd=t_pMainWnd;
    
	m_pMainWnd->ShowWindow(m_nCmdShow);
    m_pMainWnd->UpdateWindow();

	return TRUE;
}

int CMainApp::Run( )
{
	CClientDC m_DemoDC(m_pMainWnd);
	char szDLLParams[]="                                            ";
	CWDllDemo* t_hwDLLClass=new CWDllDemo();
	
	int t_iDLLClassVar=t_hwDLLClass->WDllFunc();
	wsprintf(szDLLParams,"WDllFunc=%d",t_iDLLClassVar);
	m_DemoDC.TextOut(0,0,szDLLParams);
	
	t_iDLLClassVar=t_hwDLLClass->m_WDllData;
	wsprintf(szDLLParams,"m_WDllData=%d",t_iDLLClassVar);
	m_DemoDC.TextOut(0,15,szDLLParams);

	t_iDLLClassVar=m_outclass;
	wsprintf(szDLLParams,"m_outclass=%d",t_iDLLClassVar);
	m_DemoDC.TextOut(0,30,szDLLParams);

	UINT t_bDLLExpFunc=(UINT)OutFunc(FALSE);
	wsprintf(szDLLParams,"OutFunc(FALSE)=%d",t_bDLLExpFunc);
	m_DemoDC.TextOut(0,45,szDLLParams);

	
    return CWinApp::Run();
}


CMainApp MainApplication;

//CMainWnd Implementation
CMainWnd::CMainWnd()
{
	Create(NULL,"Win32 DLL测试程序");
}

CMainWnd::~CMainWnd()
{
}



⌨️ 快捷键说明

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