readme.wzd

来自「The programs and applications on this di」· WZD 代码 · 共 46 行

WZD
46
字号
/////////////////////////////////////////////////////////////////////
// Example files.
/////////////////////////////////////////////////////////////////////

WzdClDlg.cpp -- a common color dialog class that allows the dialog
WzdClDlg.h		template to be edited

NOTE: If you want to add controls to this dialog, please refer to the book
to locate the template to add to your project.

/////////////////////////////////////////////////////////////////////
// Modify any class.
/////////////////////////////////////////////////////////////////////

// 1) create a class object
	CWzdColorDialog dlg(
		rgb,				// initial color selection
//		CC_FULLOPEN|		// intially opens both sides of color dialog
//		CC_PREVENTFULLOPEN|	// prevent user from opening customize side of color dialog
		CC_SHOWHELP|		// creates help button
//		CC_SOLIDCOLOR|		// display only non-dithered colors
		CC_ENABLETEMPLATE|	// use a custom dialog template
		0,
		NULL);		// parent window


// 2) to initialize custom colors to an array of 16 COLORREF values
//	dlg.m_cc.lpCustColors=lpCustColors;
		
// 3) if CC_ENABLETEMPLATE is set, define the custom dialog template here
	dlg.m_cc.lpTemplateName=MAKEINTRESOURCE(IDD_WZD_CHOOSECOLOR);

// 4) to open color dialog and get colors
	if (dlg.DoModal()==IDOK)
	{

// 5) to retrieve color
		rgb=dlg.GetColor();
	}

/////////////////////////////////////////////////////////////////////
// From: Visual C++ MFC Programming by Example by John E. Swanke
// Copyright (C) 1999 jeswanke. All rights reserved.
/////////////////////////////////////////////////////////////////////

⌨️ 快捷键说明

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