Click here to Skip to main content
16,011,949 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Convert code from VS6.0 to VC 1.52 Pin
Joe Woodbury18-Mar-08 16:09
professionalJoe Woodbury18-Mar-08 16:09 
Questionwhy does mouse dispear in CRectTracker? Pin
includeh1018-Mar-08 4:39
includeh1018-Mar-08 4:39 
GeneralDifferent methods in objects in a List Pin
piul18-Mar-08 1:54
piul18-Mar-08 1:54 
GeneralRe: Different methods in objects in a List Pin
Cedric Moonen18-Mar-08 2:18
Cedric Moonen18-Mar-08 2:18 
GeneralRe: Different methods in objects in a List Pin
Hanan88818-Mar-08 2:34
Hanan88818-Mar-08 2:34 
GeneralRe: Different methods in objects in a List Pin
piul18-Mar-08 2:43
piul18-Mar-08 2:43 
GeneralRe: Different methods in objects in a List Pin
BadKarma18-Mar-08 2:54
BadKarma18-Mar-08 2:54 
GeneralRe: Different methods in objects in a List Pin
Cedric Moonen18-Mar-08 3:11
Cedric Moonen18-Mar-08 3:11 
piul wrote:
On the other hand, I'd considered using dynamic casting, but the book I'm reading says it is not recommendable. That it might be a sign of poor inheritance hierarchy design.


It seems that you didn't really understand this sentence Wink | ;) . It might be a sign of poor inheritance so, if you want to avoid using it, then you should review your inheritance and not make CEmboss inherits from CItem, but instead have a list with CEmboss objects only.
That's why it says might, because it is not always possible to avoid it. The two suggested approaches (dynamic cast and virtual functions) have both their disadvantages:
- dynamic cast will be a bit slower (but in the most cases, you won't even notice it, unless this code is heavily called)
- virtual functions in your case make the code less readable (what is this GetOrientation function doing in my CItem class ??)

It's up to you to decide.

Cédric Moonen
Software developer

Charting control [v1.3]

GeneralRe: Different methods in objects in a List Pin
CPallini18-Mar-08 5:11
mveCPallini18-Mar-08 5:11 
GeneralRe: Different methods in objects in a List Pin
Cedric Moonen18-Mar-08 5:34
Cedric Moonen18-Mar-08 5:34 
GeneralRe: Different methods in objects in a List Pin
Hanan88818-Mar-08 3:15
Hanan88818-Mar-08 3:15 
GeneralRe: Different methods in objects in a List Pin
BadKarma18-Mar-08 2:45
BadKarma18-Mar-08 2:45 
QuestionRe: Different methods in objects in a List Pin
CPallini18-Mar-08 3:00
mveCPallini18-Mar-08 3:00 
GeneralRe: Different methods in objects in a List [modified] Pin
Member 75496020-Mar-08 5:25
Member 75496020-Mar-08 5:25 
GeneralDrawing pictures c++ win32 Pin
Hanan88818-Mar-08 1:45
Hanan88818-Mar-08 1:45 
QuestionRe: Drawing pictures c++ win32 Pin
David Crow18-Mar-08 3:25
David Crow18-Mar-08 3:25 
GeneralRe: Drawing pictures c++ win32 Pin
Hanan88818-Mar-08 3:33
Hanan88818-Mar-08 3:33 
GeneralRe: Drawing pictures c++ win32 Pin
Mark Salsbery18-Mar-08 7:06
Mark Salsbery18-Mar-08 7:06 
Generalchar * to TCHAR Pin
Royaltvk18-Mar-08 1:40
Royaltvk18-Mar-08 1:40 
GeneralRe: char * to TCHAR PinPopular
CPallini18-Mar-08 1:59
mveCPallini18-Mar-08 1:59 
GeneralRe: char * to TCHAR Pin
Royaltvk18-Mar-08 2:17
Royaltvk18-Mar-08 2:17 
GeneralRe: char * to TCHAR Pin
CPallini18-Mar-08 3:06
mveCPallini18-Mar-08 3:06 
GeneralRe: char * to TCHAR Pin
Rajesh R Subramanian18-Mar-08 4:11
professionalRajesh R Subramanian18-Mar-08 4:11 
GeneralRe: char * to TCHAR Pin
CPallini18-Mar-08 4:51
mveCPallini18-Mar-08 4:51 
GeneralRe: char * to TCHAR Pin
Mark Salsbery18-Mar-08 7:09
Mark Salsbery18-Mar-08 7:09 

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.