Click here to Skip to main content
15,889,462 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionexample Pin
thathvamsi10-Jul-06 18:02
thathvamsi10-Jul-06 18:02 
AnswerRe: example Pin
Steve Echols10-Jul-06 18:19
Steve Echols10-Jul-06 18:19 
AnswerRe: example Pin
ThatsAlok10-Jul-06 19:09
ThatsAlok10-Jul-06 19:09 
AnswerRe: example Pin
Code_Zombie10-Jul-06 19:58
Code_Zombie10-Jul-06 19:58 
AnswerRe: example Pin
Hamid_RT10-Jul-06 20:19
Hamid_RT10-Jul-06 20:19 
GeneralRe: example Pin
thathvamsi10-Jul-06 20:31
thathvamsi10-Jul-06 20:31 
GeneralRe: example Pin
ThatsAlok10-Jul-06 22:50
ThatsAlok10-Jul-06 22:50 
QuestionDerived class from abstract class(COleControl in MFC) gave error while allocation memory Pin
dashprasannajit10-Jul-06 17:31
dashprasannajit10-Jul-06 17:31 
Created a class i.e. CFlipCustomViewer derived from COleConrol class(abstact class)and
overridden the "virtual void OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid)" method of COleControl class in the void CFlipCustomViewer::OnDraw(CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid).I tried to call this in OnInitDialog() method of my dialog class of the application.Here the code snippets..

BOOL CFlip::OnInitDialog()
{
//having a CStatic as a place holder and then
//create the flip custom control in InitDialog

COleControl* ptrOleControl; //abstract base class pointer
CFlipCustomViewer* ptrFlipCustomViewer; //derived class pointer
ptrOleControl = ptrFlipCustomViewer; //derived class pointer assigned to abstract base class pointer
ptrOleControl = new CFlipCustomViewer(); //error in this instantiation of derived one
CDC* pdc = GetDC(); //get the device context
CRect rcBounds;
CRect rcInvalid;
GetClientRect( &rcBounds);
GetClientRect( &rcInvalid);
ptrOleControl->OnDraw(pdc,rcBounds,rcInvalid);//place holder for flipping action
CDialog::OnInitDialog();
return TRUE;
}
****************************************************************************************
but while compiling i am getting the following errors as below :
error C2259: 'CFlipCustomViewer' : cannot instantiate abstract class due to following members:
d:\fancyviewer\flipsample\flipcustomviewer.h(14) : see declaration of 'CFlipCustomViewer'
d:\fancyviewer\flipsample\flip.cpp(200) : warning C4259: 'long __thiscall COleControl::GetClassID(struct _GUID *)' : pure virtual function was not defined
d:\program files\microsoft visual studio\vc98\mfc\include\afxctl.h(683) : see declaration of 'GetClassID'
d:\fancyviewer\flipsample\flip.cpp(200) : warning C4259: 'unsigned int __thiscall COleControl::GetUserTypeNameID(void)' : pure virtual function was not defined
d:\program files\microsoft visual studio\vc98\mfc\include\afxctl.h(936) : see declaration of 'GetUserTypeNameID'
d:\fancyviewer\flipsample\flip.cpp(200) : warning C4259: 'unsigned long __thiscall COleControl::GetMiscStatus(void)' : pure virtual function was not defined
d:\program files\microsoft visual studio\vc98\mfc\include\afxctl.h(937) : see declaration of 'GetMiscStatus'
d:\fancyviewer\flipsample\flip.cpp(200) : error C2259: 'CFlipCustomViewer' : cannot instantiate abstract class due to following members:
d:\fancyviewer\flipsample\flipcustomviewer.h(14) : see declaration of 'CFlipCustomViewer'
****************************************************************************************

Can anyone helpme out please ?
AnswerRe: Derived class from abstract class(COleControl in MFC) gave error while allocation memory Pin
Steve Echols10-Jul-06 18:29
Steve Echols10-Jul-06 18:29 
Question[Noob question] Reading a file gives me weird Y chars? Pin
Lord Kixdemp10-Jul-06 16:19
Lord Kixdemp10-Jul-06 16:19 
AnswerRe: [Noob question] Reading a file gives me weird Y chars? Pin
Lord Kixdemp13-Jul-06 11:51
Lord Kixdemp13-Jul-06 11:51 
Questiontimer for 1sec and more Pin
thathvamsi10-Jul-06 15:32
thathvamsi10-Jul-06 15:32 
AnswerRe: timer for 1sec and more Pin
Jun Du10-Jul-06 16:09
Jun Du10-Jul-06 16:09 
GeneralRe: timer for 1sec and more Pin
thathvamsi10-Jul-06 16:57
thathvamsi10-Jul-06 16:57 
GeneralRe: timer for 1sec and more Pin
ThatsAlok10-Jul-06 19:12
ThatsAlok10-Jul-06 19:12 
GeneralRe: timer for 1sec and more Pin
thathvamsi10-Jul-06 20:20
thathvamsi10-Jul-06 20:20 
GeneralRe: timer for 1sec and more Pin
ThatsAlok10-Jul-06 22:48
ThatsAlok10-Jul-06 22:48 
GeneralRe: timer for 1sec and more Pin
Jun Du11-Jul-06 3:31
Jun Du11-Jul-06 3:31 
Questionabout window message Pin
HOW WHAT10-Jul-06 15:20
HOW WHAT10-Jul-06 15:20 
AnswerRe: about window message Pin
Andy Moore10-Jul-06 16:36
Andy Moore10-Jul-06 16:36 
AnswerRe: about window message Pin
Steve Echols10-Jul-06 18:11
Steve Echols10-Jul-06 18:11 
Questioncan somebody show me a sourcecode about a game called "PACMAN"writing in MFC??HELP Pin
boilerroom10-Jul-06 15:07
boilerroom10-Jul-06 15:07 
AnswerRe: can somebody show me a sourcecode about a game called "PACMAN"writing in MFC??HELP Pin
ThatsAlok10-Jul-06 19:15
ThatsAlok10-Jul-06 19:15 
GeneralRe: can somebody show me a sourcecode about a game called "PACMAN"writing in MFC??HELP Pin
Taka Muraoka10-Jul-06 20:30
Taka Muraoka10-Jul-06 20:30 
JokeRe: can somebody show me a sourcecode about a game called "PACMAN"writing in MFC??HELP Pin
ThatsAlok10-Jul-06 22:49
ThatsAlok10-Jul-06 22:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.