Lost Password?


Go Back   CodeCall Programming Forum > Software Development > C and C++

C and C++ C and C++ forum for discussing all forms of C except for C#. These languages are powerful low level languages used for creating Operating Systems, Device Drivers, compilers and much more.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #11 (permalink)  
Old 11-02-2007, 11:04 AM
dargueta dargueta is offline
Guru
 
Join Date: Oct 2007
Age: 18
Posts: 793
Last Blog:
Programs Under the Hoo...
Rep Power: 13
dargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the rough
Default

No, it's not. I could derive it from ConsoleObject, but it'd be a waste since Window has no visual representation - it's just a collection of ConsoleObject objects with a few extra things such as event handler functions, etc.

Last edited by dargueta; 11-03-2007 at 06:00 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #12 (permalink)  
Old 11-05-2007, 10:04 PM
dargueta dargueta is offline
Guru
 
Join Date: Oct 2007
Age: 18
Posts: 793
Last Blog:
Programs Under the Hoo...
Rep Power: 13
dargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the roughdargueta is a jewel in the rough
Default

Okay, I'm down to just 6 compile errors from over 100! Unfortunately, I'm having a little trouble typecasting a pointer to a function. TitleBar is a derived class of ConsoleObject, which is the default parent class of the event handler function pointers. Can I typecast a TitleBar function pointer to a ConsoleObject function pointer? I know it might not be "safe" per se, but is it possible?

Code:
class TitleBar : public ConsoleObject
{
    protected:
        CommandButton *closeButton;
    public:
    TitleBar(/*args*/) : ConsoleObject(/*args*/)
    {
        //typecast needed here.
        closeButton->eventHandler->setMouseOverEventHandler_Class(&TitleBar::closeWindow);
    }
};
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Issue writing to file: pointer to a class which contains pointers to other classes Sheemer C and C++ 0 08-21-2007 02:17 AM
multi-pass preprocessing kenna C and C++ 11 08-14-2007 11:45 AM
Reg Fucntion pointers sowmi C and C++ 9 07-29-2007 04:29 AM
small help in this generator function plz SamehSpiky C and C++ 3 06-22-2007 12:47 PM


All times are GMT -5. The time now is 02:15 AM.

Contest Stats

WingedPanther ........ 2753.6
Xav ........ 2704
Brandon W ........ 1702.32
John ........ 1207.73
marwex89 ........ 1175.24
morefood2001 ........ 966.05
dcs ........ 655.75
Steve.L ........ 475.59
orjan ........ 418.58
Aereshaa ........ 383.54

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 100%


Complete - Celebrate!

Ads