Click here to Skip to main content
15,892,072 members
Please Sign up or sign in to vote.
3.50/5 (2 votes)
See more: , +
I want to use SetLook() method in my application

header file is

C++
#pragma once
#include "ComputerScience.h"
#include "InformationTechnology.h"
class CLifePlanningSheet : public CPropertySheet
{
	DECLARE_DYNAMIC(CLifePlanningSheet)
public:
	CLifePlanningSheet(UINT nIDCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
	CLifePlanningSheet(LPCTSTR pszCaption, CWnd* pParentWnd = NULL, UINT iSelectPage = 0);
	CLifePlanningSheet();
	//virtual ~CLifePlanningSheet();
private:
	  CComputerScience		pgeComputerScience;
    CInformationTechnology	pgeInformationTechnology;

protected:
	DECLARE_MESSAGE_MAP()
};

and vc++ file is
C++
// LifePlanningSheet.cpp : implementation file
//

#include "stdafx.h"
#include "LifePlanning.h"
#include "LifePlanningSheet.h"
#include <cstdlib>
IMPLEMENT_DYNAMIC(CLifePlanningSheet, CPropertySheet)
CLifePlanningSheet::CLifePlanningSheet()
{
	AddPage(&pgeComputerScience);
	AddPage(&pgeInformationTechnology);
	SetLook(CPropertySheet::PropSheetLook_Tabs);
}
BEGIN_MESSAGE_MAP(CLifePlanningSheet, CPropertySheet)
END_MESSAGE_MAP()

When run the program it gives following errors
error C3861: 'SetLook': identifier not found
error C2065: 'PropSheetLook_Tabs' : undeclared identifier
error C2039: 'PropSheetLook_Tabs' : is not a member of 'CPropertySheet'

how to remove that?
Posted

You class is derived from CPropertySheet, not from CMFCPropertySheet.

You must replace all occurences of CPropertySheeet by CMFCPropertySheet in your header and source files.
 
Share this answer
 
Comments
Member 7909353 24-Sep-12 4:30am    
As you suggest, I did but it gives error
error C2504: 'CMFCPropertySheet' : base class undefined
Jochen Arndt 24-Sep-12 4:33am    
You probably forgot to include the header file afxpropertysheet.h.
You are referring to a member function which you have not declared, and a data member which is not a member of CPropertySheet. By the way you are not running the program, you are merely trying to compile it, these messages are from the compiler telling you that you have things missing from your source code.
 
Share this answer
 
SetLook()method is a CMFCPropertySheet class method which is in vs2010,2012 not present in vs 2008
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900