bobsgoodfortune wrote:
> Greetings,
> I have a simple custom control that I want to add to my project. I
> created it in the custom control "wizard" of DB, everything seemed
> straightforward there. The issue is when it is inserted into the
> project using the visual editor. DB creates the code for this. And
> when the control is added to a sizer I get a bit of an error. DB uses
> the Add() function of wxBoxSizer to insert the control; however Add()
> is expecting the first parameter to be a wxWindow pointer not a
> MyClass pointer. My control needs to be cast accordingly. How do I
> get DB to do that?
>
The control has to be derived from wxWindow (directly or indirectly).
Otherwise I don't know how sizers are expected to be able to manage
them... If your control is already derived from wxWindow, you probably
need to include the appropriate header so the compiler knows what type
it is.
Regards,
Julian
.