×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Contact US

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

C++Builder1.0 Component does not port to 3.0 or higher

C++Builder1.0 Component does not port to 3.0 or higher

C++Builder1.0 Component does not port to 3.0 or higher

(OP)
I get 3 errors and 2 warnings when I try to compile in 3.0.

(2)Error::Cannot Override a dynamic with a virtual function
    virtual void __fastcall KeyDown();
    virtual void __fastcall MouseDown();

(2)Warning::GetChildren hides virtual function __fastcall Controls::TWinControl::GetChildern()
    virtual void __fastcall GetChildren(Classes::TGetChildProc Proc);

(1)Error::Too few parameters in call to __fastcall Controls::TWinControl::GetChildern()
void __fastcall TFurunoRadioGroup::GetChildren(Classes::TGetChildProc Proc)
{
    TCustomControl::GetChildren(Proc);
}

Any help would be appreciated,
Joe


/////////////////////////////////////////////////////////////////////////////
FurunoRadioGroup.h
/////////////////////////////////////////////////////////////////////////////

//---------------------------------------------------------------------------
#ifndef FurunoRadioGroupH
#define FurunoRadioGroupH
//---------------------------------------------------------------------------
#include <vcl\SysUtils.hpp>
#include <vcl\Controls.hpp>
#include <vcl\Classes.hpp>
#include <vcl\Forms.hpp>
#include <vcl\Graphics.hpp>
#include <vcl\Messages.hpp>
#include <vcl\Windows.hpp>
#include <vcl\System.hpp>
#include <vcl\consts.hpp>
//---------------------------------------------------------------------------
enum TFurunoRadioHighlighting { frhUnderline, frhInverse };

//---------------------------------------------------------------------------
class TFurunoRadioGroup : public TCustomControl
{
private:
    Classes::TList* FButtons;
    Classes::TStrings* FItems;
    int FItemIndex;
    int FColumns;
    TFurunoRadioHighlighting FHighlighting;
    bool FDrawRect;
    bool FReading;
    bool FUpdating;
    Classes::TNotifyEvent FOnResize;
    void __fastcall ArrangeButtons(void);
    void __fastcall ButtonClick(System::TObject* Sender);
    void __fastcall ItemsChange(System::TObject* Sender);
    void __fastcall SetButtonCount(int Value);
    void __fastcall SetColumns(int Value);
    void __fastcall SetItemIndex(int Value);
    void __fastcall SetItems(Classes::TStrings* Value);
    void __fastcall SetDrawRect(bool Value);
    void __fastcall SetHighlighting(TFurunoRadioHighlighting Value);
    void __fastcall UpdateButtons(void);
    MESSAGE void __fastcall CMWantSpecialKey(TCMWantSpecialKey &Message);
    HIDESBASE MESSAGE void __fastcall CMEnabledChanged(Messages::TMessage &Message);
    HIDESBASE MESSAGE void __fastcall CMFontChanged(Messages::TMessage &Message);
    HIDESBASE MESSAGE void __fastcall WMSize(Messages::TWMSize &Message);

protected:
    virtual void __fastcall KeyDown(Word &Key, TShiftState Shift);
    virtual void __fastcall MouseDown(TMouseButton button, TShiftState shift, int x, int y);
    virtual void __fastcall AlignControls(Controls::TControl* AControl, Windows::TRect &Rect);
    virtual void __fastcall Paint(void);
    virtual void __fastcall ReadState(Classes::TReader* Reader);
    virtual bool __fastcall CanModify(void);
    virtual void __fastcall GetChildren(Classes::TGetChildProc Proc);

public:
    __fastcall TFurunoRadioGroup(TComponent* Owner);
    __fastcall virtual ~TFurunoRadioGroup(void);
public:
     __fastcall TFurunoRadioGroup(HWND ParentWindow) : TCustomControl(ParentWindow) { };

BEGIN_MESSAGE_MAP
    MESSAGE_HANDLER(CM_WANTSPECIALKEY , TCMWantSpecialKey,CMWantSpecialKey)
END_MESSAGE_MAP(TCustomControl)

__published:
    __property int Columns = {read=FColumns, write=SetColumns, default=1};
    __property int ItemIndex = {read=FItemIndex, write=SetItemIndex, default=-1};
    __property Classes::TStrings* Items = {read=FItems, write=SetItems, nodefault};
    __property bool DrawRect = {read=FDrawRect, write=SetDrawRect, default=true};
    __property TFurunoRadioHighlighting Highlighting = {read=FHighlighting, write=SetHighlighting, default=0};
    __property Font;
    __property ParentFont;
    __property TabOrder;
    __property TabStop;
    __property Enabled;
    __property Visible;
    __property OnEnter;
    __property OnExit;
    __property OnKeyDown ;
    __property OnKeyPress ;
    __property OnKeyUp ;
    __property OnMouseDown ;
    __property OnMouseMove ;
    __property OnMouseUp ;
};
//---------------------------------------------------------------------------
#endif

RE: C++Builder1.0 Component does not port to 3.0 or higher

nowaday windows uses __stdcall, not __fastcall

Ion Filipski


filipski@excite.com

RE: C++Builder1.0 Component does not port to 3.0 or higher

try taking out either virtual or void before your __fastcall, and also. do you have the name of the handle that your virtual void __fastcall is in, (i.e.,  virtual void __fastcall TForm1::KeyDown();  virtual void __fastcall TForm1::MouseDown();

Cyprus

RE: C++Builder1.0 Component does not port to 3.0 or higher

try taking out either virtual or void before your __fastcall, and also. do you have the name of the handle that your virtual void __fastcall is in, (i.e.,  virtual void __fastcall TForm1::KeyDown();  virtual void __fastcall TForm1::MouseDown(); ) or the name of your component as the case may be. im just curious.

Cyprus

RE: C++Builder1.0 Component does not port to 3.0 or higher

(OP)
Getting rid of the virtual for MouseDown ans KeyDown works.

The call to  TCustomControl::GetChildren(Proc); still generates an error so I dropped the "TCustomControl::" and call GetChildren(Proc) which compiles with warnings but doesn't generate an error.

The procedures are:
//---------------------------------------------------------------------------
void __fastcall TFurunoRadioGroup::KeyDown(Word &Key, TShiftState Shift)
//---------------------------------------------------------------------------
void __fastcall TFurunoRadioGroup::MouseDown(TMouseButton button, TShiftState shift, int x, int y)
//---------------------------------------------------------------------------
void __fastcall TFurunoRadioGroup::GetChildren(Classes::TGetChildProc Proc)
{
    TCustomControl::GetChildren(Proc);
}

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close