List Info

Thread: Trouble with wxScrolledWindow (deriving a class)




Trouble with wxScrolledWindow (deriving a class)
country flaguser name
Norway
2007-06-18 03:04:17

Hi

I have noticed that when deriving a class from the wxScrolledWindow, the
creator statment is generated with an extra parameter causing an error
in compilation :

wxIntScrolledWindow::wxIntScrolledWindow(wxWindow* parent, wxWindowID
id, const wxPoint& pos, const wxSize&; size, 100), long style)

It is the "const wxSize&; size, 100)" parameter that is generated wrong.
Changing this to "const wxSize&; size" works.

I'm using DialogBlocks 4.10 unicode build with Visual Studio 2003.

Regards
Eirik Nesje

__._,_.___
.

__,_._,___
Re: Trouble with wxScrolledWindow (deriving a class)
country flaguser name
United Kingdom
2007-06-18 03:44:42

Hello Eirik,

Sorry about that, I'll fix the bug in the next release.

Thanks!

Julian

Eirik Nesje wrote:
> Hi
>
> I have noticed that when deriving a class from the wxScrolledWindow, the
> creator statment is generated with an extra parameter causing an error
> in compilation :
>
> wxIntScrolledWindow::wxIntScrolledWindow(wxWindow* parent, wxWindowID
> id, const wxPoint& pos, const wxSize&; size, 100), long style)
>
> It is the "const wxSize&; size, 100)" parameter that is generated wrong.
> Changing this to "const wxSize&; size" works.
>
> I'm using DialogBlocks 4.10 unicode build with Visual Studio 2003.
>
> Regards
> Eirik Nesje
>
>
>
>;
> Yahoo! Groups Links
>
>
>
>;
>
>

--
Julian Smart, Anthemion Software Ltd.
28/5 Gillespie Crescent, Edinburgh, Midlothian, EH10 4HU
www.anthemion.co.uk | +44 (0)131 229 5306
Tools for writers: www.writerscafe.co.uk
wxWidgets RAD: www.anthemion.co.uk/dialogblocks

__._,_.___
.

__,_._,___
Re: Trouble with wxScrolledWindow (deriving a class)
country flaguser name
United States
2007-06-18 04:49:25

>-- On Mon, 18 Jun 2007 09:44:42 +0100 Julian Smart wrote --
> Hello Eirik,
>
> Sorry about that, I'll fix the bug in the next release.
>
> Thanks!
>
> Julian
>
 
>-- On Mon, 18 Jun 2007 10:04:17 +0200 Eirik Nesje wrote --
> Hi
>
> I have noticed that when deriving a class from the
> wxScrolledWindow, the creator statment is generated with an extra
> parameter causing an error in compilation :
>
> wxIntScrolledWindow::wxIntScrolledWindow(wxWindow* parent,
> wxWindowID id, const wxPoint& pos, const wxSize&; size, 100), long
> style)
>
> It is the "const wxSize&; size, 100)" parameter that is generated
> wrong. Changing this to "const wxSize&; size" works.
>
> I'm using DialogBlocks 4.10 unicode build with Visual Studio 2003.
>
> Regards
> Eirik Nesje
>
 
Hi!
 
I'm sorry, I guess I'm missing something. I've been doing exactly that over the last few days with no problems. Here's the Property Sheets (in a zip attached, too, if your email doesn't allow embedded images):
 
poco" WIDTH="996" HEIGHT="693">
 
poco" WIDTH="996" HEIGHT="693">
 
 
And the generated code:
 
BitmapCanvas.h
 
class BitmapCanvas: public wxScrolledWindow
{    
    DECLARE_DYNAMIC_CLASS( BitmapCanvas )
    DECLARE_EVENT_TABLE()
 ;
public:
    /// Constructors
    BitmapCanvas();
    BitmapCanvas(wxWindow* parent, wxWindowID id = ID_BitmapCanvas, const wxPoint& pos = wxDefaultPosition, const wxSize&; size = wxDefaultSize, long style = wxSUNKEN_BORDER|wxHSCROLL|wxVSCROLL);
 
    /// Creation
    bool Create(wxWindow* parent, wxWindowID id = ID_BitmapCanvas, const wxPoint& pos = wxDefaultPosition, const wxSize&; size = wxDefaultSize, long style = wxSUNKEN_BORDER|wxHSCROLL|wxVSCROLL);
 
    /// Destructor
    ~BitmapCanvas();
 
    /// Initialises member variables
    void Init();
 
    /// Creates the controls and sizers
    void CreateControls();
 
////begin BitmapCanvas event handler declarations
////end BitmapCanvas event handler declarations
 
////begin BitmapCanvas member function declarations
    /// Retrieves bitmap resources
    wxBitmap GetBitmapResource( const wxString& name );
 
    /// Retrieves icon resources
    wxIcon GetIconResource( const wxString& name );
////end BitmapCanvas member function declarations
 
    /// Should we show tooltips?
    static bool ShowToolTips();
 
////begin BitmapCanvas member variables
////end BitmapCanvas member variables
};
 
 
BitmapCanvas.cpp
 
BitmapCanvas::BitmapCanvas(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize&; size, long style)
{
    Init();
    Create(parent, id, pos, size, style);
}
 
 ;
 
bool BitmapCanvas::Create(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize&; size, long style)
{
////begin BitmapCanvas creation
    wxScrolledWindow::Create(parent, id, pos, size, style);
    CreateControls();
////end BitmapCanvas creation
    return true;
}
 
 ;
All the compiles I've been doing have been working fine!
 ;
Windows XP Pro SP2
Visual Studio 2005
DialogBlocks 4.10
wxWidgets-2.8.4

thx,
Dave S.

At times one becomes impressed with one's own accomplishments.
Lest we forget...

"Man with all his noble qualities,... with his god-like intellect, with sympathy which feels for the most debased, which has penetrated into the movements and constitution of the solar system -- with all these exalted powers -- Man still bears in his bodily frame the indelible stamp of his lowly origin."

'The Descent of Man'
1871
Charles Darwin

wxMS_developers · Development with wxWidgets on MSWindows 
 
wxWidgets Code Exchange

__._,_.___
.

__,_._,___
  Approximate file size 162610 bytes
  Approximate file size 155968 bytes
  Approximate file size 185726 bytes
[1-3]

about | contact  Other archives ( Real Estate discussion Medical topics )