Click here to Skip to main content
15,920,383 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: initialising elements using new foo[] Pin
moredip16-Jul-02 7:28
moredip16-Jul-02 7:28 
GeneralWhy... Pin
Frank Deo15-Jul-02 12:28
Frank Deo15-Jul-02 12:28 
GeneralRe: Why... Pin
Christian Graus15-Jul-02 12:31
protectorChristian Graus15-Jul-02 12:31 
GeneralRe: Why... Pin
Frank Deo15-Jul-02 12:35
Frank Deo15-Jul-02 12:35 
GeneralRe: Why... Pin
Christian Graus15-Jul-02 12:53
protectorChristian Graus15-Jul-02 12:53 
GeneralRe: Why... Pin
Frank Deo15-Jul-02 13:00
Frank Deo15-Jul-02 13:00 
GeneralRe: Why... Pin
Nish Nishant15-Jul-02 14:56
sitebuilderNish Nishant15-Jul-02 14:56 
GeneralGetting RuntimeClass of a CObject Derived Class Pin
MightyThor15-Jul-02 12:16
MightyThor15-Jul-02 12:16 
Hi,

i have 3 objects derived from CObject.
These objects are the data source for my tree control. I want to find out which object is selected so i tried to use RUNTIME_CLASS macro.

CObject *selectedItem = ( CObject * ) m_treeMain.GetItemData( m_treeMain.GetSelectedItem() );

if( selectedItem )
{
if( selectedItem->IsKindOf( RUNTIME_CLASS( CBand ) ) )
{
AfxMessageBox( "so far so good" );
}
}

This code causes two errors :

1) error C2039: 'classCBand' : is not a member of 'CBand'
2) error C2065: 'classCBand' : undeclared identifier

What is this classCBand anyway?
I included Band.h into this function's file. And when i replace CBand with another class name such as CObject or CTreeCtrl, it works. So what's wrong with my class? What should i do to retrieve the runtime class ?

Thanks in advance.

GeneralRe: Getting RuntimeClass of a CObject Derived Class Pin
Christian Graus15-Jul-02 12:34
protectorChristian Graus15-Jul-02 12:34 
GeneralRe: Getting RuntimeClass of a CObject Derived Class Pin
Roman Fadeyev15-Jul-02 19:03
Roman Fadeyev15-Jul-02 19:03 
GeneralRe: Getting RuntimeClass of a CObject Derived Class Pin
Christian Graus15-Jul-02 19:13
protectorChristian Graus15-Jul-02 19:13 
GeneralRe: Getting RuntimeClass of a CObject Derived Class Pin
MightyThor15-Jul-02 23:35
MightyThor15-Jul-02 23:35 
Generalexcel automation, hprocess is not closing Pin
pnpfriend15-Jul-02 12:10
pnpfriend15-Jul-02 12:10 
Generalplease...... Pin
pnpfriend16-Jul-02 2:44
pnpfriend16-Jul-02 2:44 
GeneralRe: excel automation, hprocess is not closing Pin
Richard Ellis16-Jul-02 14:05
Richard Ellis16-Jul-02 14:05 
GeneralRe: excel automation, hprocess is not closing Pin
pnpfriend17-Jul-02 3:39
pnpfriend17-Jul-02 3:39 
Generalderive a class from my tree control Pin
Steve L.15-Jul-02 11:39
Steve L.15-Jul-02 11:39 
GeneralRe: derive a class from my tree control Pin
Joaquín M López Muñoz15-Jul-02 11:43
Joaquín M López Muñoz15-Jul-02 11:43 
GeneralRe: derive a class from my tree control Pin
Steve L.15-Jul-02 11:50
Steve L.15-Jul-02 11:50 
GeneralRe: derive a class from my tree control Pin
Joaquín M López Muñoz15-Jul-02 12:01
Joaquín M López Muñoz15-Jul-02 12:01 
GeneralRe: derive a class from my tree control Pin
Steve L.15-Jul-02 12:08
Steve L.15-Jul-02 12:08 
GeneralUsing CRecordset Pin
achandra00715-Jul-02 10:23
achandra00715-Jul-02 10:23 
GeneralRe: Using CRecordset Pin
Ranjan Banerji15-Jul-02 11:02
Ranjan Banerji15-Jul-02 11:02 
GeneralRe: Using CRecordset Pin
achandra00715-Jul-02 11:39
achandra00715-Jul-02 11:39 
GeneralComboBoxEx with DropList style problem Pin
Maciek Niedzielski15-Jul-02 10:10
Maciek Niedzielski15-Jul-02 10:10 

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.