0
votes
class CSampleDlg : public CDialog

I have an MFC dialog based application in which dialog class extends CDialog. How can i change base class of my MFC applcation from CDialog to CDialogEx?I don't want to create a new application i.e. i want to change my existing application

1
Find and replace all the occurrence of CDialog with CDialogExJeeva
ofcourse i tried, But that is not working.DTdev
what is the error you are gettingJeeva
It is telling that it can't find base class CDialogExDTdev
are you using visual studio 2010? include "afxdialogex.h"Jeeva

1 Answers

0
votes
  • Ensure that you are using VC10 (Visual Studio 2010), and also ensure v100 is set as Platform Toolset in project settings.
  • Include <afxdialogex.h>, preferbly in stdafx.h

If you can't use CDialogEx, you may need to write OnEraseBkgnd and do background paining yourself, and would also need handle backgrounds of controls via OnCtlColor