Click here to Skip to main content
15,906,626 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
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 
Hi,

I assume you want to go over the list and do GetOrientation() to each node.

If this node doesn't have 'orientation' , you want to know it doesn't have one.

So, it will return NO_ORIENTATION.

Another way -

typedef enum
{
    eIT_UNDEFINED = 0,
    eIT_ITEM,
    eIT_EMBOSS,
    eIT_ANNEAL,
} EItemType; 


in CNode
EItemType m_eItemType;

int GetOrientation()
{
     int result = NO_ORIENTATION;
     switch (m_eItemType)
     {
         case eIT_EMBOSS:
         {
             result = ((CEmboss *)  m_pItem)->GetOrientation();
             break;
         }
         default:
            break;
     }
     return result;
}


I can't think of any other way - if you want to do GetOrientation() on an object, it must have that method.
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 
GeneralRe: char * to TCHAR Pin
Cedric Moonen18-Mar-08 2:14
Cedric Moonen18-Mar-08 2:14 
QuestionRe: char * to TCHAR Pin
David Crow18-Mar-08 3:36
David Crow18-Mar-08 3:36 
General[Message Deleted] Pin
preeti sharma18-Mar-08 0:30
preeti sharma18-Mar-08 0:30 

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.