Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VS2008 MFC VC++
I want to use SetLook() method in my application
 
header file is
 
#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
// 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 23-Sep-12 21:27pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

You class is derived from CPropertySheet, not from CMFCPropertySheet.
 
You must replace all occurences of CPropertySheeet by CMFCPropertySheet in your header and source files.
  Permalink  
Comments
Member 7909353 at 24-Sep-12 4:30am
   
As you suggest, I did but it gives error
error C2504: 'CMFCPropertySheet' : base class undefined
Jochen Arndt at 24-Sep-12 4:33am
   
You probably forgot to include the header file afxpropertysheet.h.
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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.
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

SetLook()method is a CMFCPropertySheet class method which is in vs2010,2012 not present in vs 2008
  Permalink  
v2

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

  Print Answers RSS
0 CPallini 405
1 Sergey Alexandrovich Kryukov 262
2 OriginalGriff 165
3 George Jonsson 134
4 Richard MacCutchan 110
0 OriginalGriff 6,344
1 Sergey Alexandrovich Kryukov 5,890
2 CPallini 5,175
3 George Jonsson 3,559
4 Gihan Liyanage 2,522


Advertise | Privacy | Mobile
Web01 | 2.8.140916.1 | Last Updated 26 Sep 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100