Click here to Skip to main content
15,911,789 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Dialog box is looks like hang. Pin
CPallini21-Feb-09 5:31
mveCPallini21-Feb-09 5:31 
Questiona qustion Pin
Archy_Yu20-Feb-09 1:11
Archy_Yu20-Feb-09 1:11 
AnswerRe: a qustion Pin
Nishad S20-Feb-09 1:43
Nishad S20-Feb-09 1:43 
GeneralRe: a qustion Pin
CPallini20-Feb-09 1:47
mveCPallini20-Feb-09 1:47 
GeneralRe: a qustion Pin
Nishad S20-Feb-09 2:05
Nishad S20-Feb-09 2:05 
GeneralRe: a qustion Pin
Archy_Yu20-Feb-09 13:05
Archy_Yu20-Feb-09 13:05 
GeneralRe: a qustion Pin
Nishad S20-Feb-09 18:21
Nishad S20-Feb-09 18:21 
QuestionPure Functions.. Pin
dehseth20-Feb-09 0:59
dehseth20-Feb-09 0:59 
Hey ppl,

I got stuck with this pure thing.. I got a class which contains pure functions:

virtual void OnMouseDown(int Button, int X, int Y) = NULL;
virtual void OnMouseMove(int X, int Y) = NULL;
virtual void OnMouseUp(int Button, int X, int Y) = NULL;
virtual bool OnRender(void) = NULL;

And I have a derived class which overrides these methods:

bool OnRender(void);
void OnMouseDown(int Button, int X, int Y);
void OnMouseMove(int X, int Y);
void OnMouseUp(int Button, int X, int Y);

But the compiler says:

Error 5 error C2535: 'void CXWindow::OnMouseDown(int,int,int)' : member function already defined or declared
Error 6 error C2535: 'void CXWindow::OnMouseMove(int,int)' : member function already defined or declared
Error 7 error C2535: 'void CXWindow::OnMouseUp(int,int,int)' : member function already defined or declared
Error 12 error C2535: 'void CXWindow::OnMouseDown(int,int,int)' : member function already defined or declared

D'Oh! | :doh:

Ok! if I remove my override functions compiler says:

Error 22 error C2259: 'CXWindow' : cannot instantiate abstract class d:\my codes\chess\chess\dx.cpp 16

Frown | :(

Since I do not override them it says this is abstract! WTF | :WTF:

Ok one more thing that i've noticed: OnRender method is also defined pure abstract but I do not get any error about that! Only difference is it does not contain any parameter and returns bool... Confused | :confused:


thank you in advance...
AnswerRe: Pure Functions.. Pin
«_Superman_»20-Feb-09 1:10
professional«_Superman_»20-Feb-09 1:10 
GeneralRe: Pure Functions.. Pin
dehseth20-Feb-09 2:03
dehseth20-Feb-09 2:03 
AnswerRe: Pure Functions.. Pin
David Crow20-Feb-09 2:57
David Crow20-Feb-09 2:57 
QuestionProblem while horizontal scrolling Pin
Deepu Antony20-Feb-09 0:43
Deepu Antony20-Feb-09 0:43 
AnswerRe: Problem while horizontal scrolling Pin
Nishad S20-Feb-09 2:01
Nishad S20-Feb-09 2:01 
GeneralRe: Problem while horizontal scrolling Pin
Deepu Antony20-Feb-09 2:21
Deepu Antony20-Feb-09 2:21 
GeneralRe: Problem while horizontal scrolling Pin
Nishad S20-Feb-09 2:29
Nishad S20-Feb-09 2:29 
GeneralRe: Problem while horizontal scrolling Pin
Deepu Antony20-Feb-09 2:52
Deepu Antony20-Feb-09 2:52 
GeneralRe: Problem while horizontal scrolling Pin
Nishad S20-Feb-09 18:39
Nishad S20-Feb-09 18:39 
AnswerRe: Problem while horizontal scrolling Pin
Iain Clarke, Warrior Programmer20-Feb-09 4:26
Iain Clarke, Warrior Programmer20-Feb-09 4:26 
AnswerRe: Problem while horizontal scrolling [modified] Pin
Deepu Antony22-Feb-09 20:18
Deepu Antony22-Feb-09 20:18 
QuestionFix for boken class view in Visual Studio 2008 Pin
Desmond Mardle20-Feb-09 0:36
Desmond Mardle20-Feb-09 0:36 
AnswerRe: Fix for boken class view in Visual Studio 2008 Pin
Desmond Mardle20-Feb-09 1:34
Desmond Mardle20-Feb-09 1:34 
QuestionDynamic programming Pin
rnsk_for_u20-Feb-09 0:13
rnsk_for_u20-Feb-09 0:13 
AnswerRe: Dynamic programming Pin
CPallini20-Feb-09 0:33
mveCPallini20-Feb-09 0:33 
AnswerRe: Dynamic programming Pin
Nishad S20-Feb-09 0:36
Nishad S20-Feb-09 0:36 
AnswerRe: Dynamic programming Pin
David Crow20-Feb-09 2:58
David Crow20-Feb-09 2:58 

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.