Wayne Vucenic
11/24/2004 5:37:00 PM
Hi Zach,
Since OnPrintPage is a pure virtual method in wxPrintout, you need to
derive a class from wxPrintout, and define OnPrintPage in that class.
Something like:
class wxPrintoutWrap : public wxPrintout
{
bool OnPrintPage( int page );
};
bool wxPrintoutWrap::OnPrintPage( int page )
{
// your code goes here
return true;
}
Hope this helps,
Wayne
On Thu, 25 Nov 2004 02:07:47 +0900, Zach Dennis <zdennis@mktec.com> wrote:
> I'm not a huge c++ guy, and I'm trying to help w/wxRuby development and
> I've ran into an error. perhaps someone with more c++ knowledge can help
> me out.
>
> There is a classs wxPrintout in the the wxWindows library, I am trying
> to wrap it for use in WxRuby. Whenever I try to create it
>
> new wxPrintout()
>
> it says I cannot instantiate the abstract class due to the following
> members. Then it gives me the method signautre for a pure virtual method
> OnPrintPage.
>
> So I override wxPrintout in my file:
>
> class wxPrintout{
> public:
> virtual bool OnPrintPage( int page )
> }
>
> Then it errors out because of a "class type redefinition". Any ideas how
> to get around class type redefinition?
>
> Thanks,
>
> Zach
>
>