Click here to Skip to main content
15,903,201 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to get the taskbar icon for an invisible main window Pin
Naveen17-May-06 17:14
Naveen17-May-06 17:14 
GeneralRe: How to get the taskbar icon for an invisible main window Pin
Smitha Rao17-May-06 18:25
Smitha Rao17-May-06 18:25 
GeneralRe: How to get the taskbar icon for an invisible main window Pin
Naveen17-May-06 18:29
Naveen17-May-06 18:29 
GeneralRe: How to get the taskbar icon for an invisible main window Pin
Smitha Rao25-May-06 7:06
Smitha Rao25-May-06 7:06 
GeneralRe: How to get the taskbar icon for an invisible main window Pin
Smitha Rao17-May-06 7:24
Smitha Rao17-May-06 7:24 
QuestionHow to encrypt folder? Pin
westdawn17-May-06 1:28
westdawn17-May-06 1:28 
QuestionPolymorphic pointer points to what? Pin
G_urr_A17-May-06 1:12
G_urr_A17-May-06 1:12 
AnswerRe: Polymorphic pointer points to what? Pin
Cedric Moonen17-May-06 1:21
Cedric Moonen17-May-06 1:21 
I would suggest what you said in your post: add a variable in the base_class that specify which kind of object it is.
To secure the code (so in order to always specify a value for that variable), you can force it through the constructor: remove the default ctor and let only a constructor that supply the type.
Then, in the constructor of your derived classes, in their constructor, simply call the base constructor with the appropriate type.

You can also enable Run-time type information but I don't have a lot of experience with that.


Cédric Moonen
Software developer

Charting control

-- modified at 7:21 Wednesday 17th May, 2006
GeneralRe: Polymorphic pointer points to what? Pin
Stephen Hewitt17-May-06 5:06
Stephen Hewitt17-May-06 5:06 
GeneralRe: Polymorphic pointer points to what? Pin
Cedric Moonen17-May-06 5:15
Cedric Moonen17-May-06 5:15 
GeneralRe: Polymorphic pointer points to what? Pin
Stephen Hewitt17-May-06 14:04
Stephen Hewitt17-May-06 14:04 
GeneralRe: Polymorphic pointer points to what? Pin
Cedric Moonen17-May-06 21:26
Cedric Moonen17-May-06 21:26 
GeneralRe: Polymorphic pointer points to what? Pin
Stephen Hewitt18-May-06 0:52
Stephen Hewitt18-May-06 0:52 
GeneralRe: Polymorphic pointer points to what? Pin
Cedric Moonen18-May-06 1:52
Cedric Moonen18-May-06 1:52 
GeneralRe: Polymorphic pointer points to what? Pin
Stephen Hewitt18-May-06 2:42
Stephen Hewitt18-May-06 2:42 
GeneralRe: Polymorphic pointer points to what? Pin
Cedric Moonen18-May-06 2:58
Cedric Moonen18-May-06 2:58 
GeneralRe: Polymorphic pointer points to what? Pin
Stephen Hewitt18-May-06 3:44
Stephen Hewitt18-May-06 3:44 
AnswerRe: Polymorphic pointer points to what? Pin
Sarath C17-May-06 1:23
Sarath C17-May-06 1:23 
GeneralRe: Polymorphic pointer points to what? Pin
Cedric Moonen17-May-06 1:37
Cedric Moonen17-May-06 1:37 
GeneralRe: Polymorphic pointer points to what? Pin
markkuk17-May-06 3:18
markkuk17-May-06 3:18 
GeneralRe: Polymorphic pointer points to what? Pin
Cedric Moonen17-May-06 3:46
Cedric Moonen17-May-06 3:46 
AnswerRe: Polymorphic pointer points to what? Pin
Sarath C17-May-06 1:35
Sarath C17-May-06 1:35 
QuestionRe: Polymorphic pointer points to what? Pin
David Crow17-May-06 3:13
David Crow17-May-06 3:13 
AnswerRe: Polymorphic pointer points to what? Pin
SimonSays17-May-06 10:47
SimonSays17-May-06 10:47 
GeneralRe: Polymorphic pointer points to what? Pin
G_urr_A17-May-06 11:49
G_urr_A17-May-06 11: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.