printerdevice.cpp

来自「Windows 图形编程 书籍」· C++ 代码 · 共 68 行

CPP
68
字号
//-----------------------------------------------------------------------------------//
//              Windows Graphics Programming: Win32 GDI and DirectDraw               //
//                             ISBN  0-13-086985-6                                   //
//                                                                                   //
//  Written            by  Yuan, Feng                             www.fengyuan.com   //
//  Copyright (c) 2000 by  Hewlett-Packard Company                www.hp.com         //
//  Published          by  Prentice Hall PTR, Prentice-Hall, Inc. www.phptr.com      //
//                                                                                   //
//  FileName   : printerdevice.cpp				                                     //
//  Description: Printer device context demo program, Chapter 17                     //
//  Version    : 1.00.000, May 31, 2000                                              //
//-----------------------------------------------------------------------------------//

#define STRICT
#define NOCRYPT

#include <windows.h>
#include <tchar.h>
#include "resource.h"

#include "..\\..\\include\\property.h"
#include "..\\..\\include\\listview.h"

#include "DevPage.h"

class KMain : public KPropertySheet
{
	KDevicePage * m_Device;

public: 

	KMain(void)
	{
		m_Device = NULL;
	}

	~KMain(void)
	{
		if ( m_Device )
		{
			delete m_Device;
			m_Device = NULL;
		}
	}

	void Run(HINSTANCE hInst)
	{
        HPROPSHEETPAGE hPage[3];

		m_Device = new KDevicePage(hInst);
		hPage[0] = m_Device->createPropertySheetPage(hInst, IDD_DEVICEPAGE);

		propertySheet(hInst, NULL, IDI_PRINT, 1, hPage, "Printer Device");
	}
};


int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR, int)
{
	KMain    main;
    
	InitCommonControls();

	main.Run(hInstance);

	return TRUE;
}	

⌨️ 快捷键说明

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