MDI child frame and wxCheckListBox menu problem
Örjan Persson
o.persson at gmail.com
Thu Jul 12 01:23:41 PDT 2007
I didn't manage to find what's wrong, but something must've changed in
Windows SDK 1.0. A workaround is to downgrade to SDK 2003 R2. Windows
SDK 1.0 is not compatible with VS6.
Regards,
Örjan
On 6/1/07, Örjan Persson <o.persson at gmail.com> wrote:
> Thank you for your time Chris! I'm using "Windows SDK for Vista",
> Visual Studio 2005 and Windows XP. I just tested in VS6 and SDK 2003
> R2, and the problem is not there anymore. Hm. I'll see if I can figure
> out why.
>
> Why I mixed the canvas and wxCheckListBox? Well, the canvas was
> already there. I just tried to find the easiest way to reproduce the
> problem, and that was by adding these two lines. Of course I'm not
> doing it like this in my application. ;)
> wxCheckListBox *checkListBox = new wxCheckListBox(this, -1);
> checkListBox->Append(L"Test");
>
> Regards,
> Örjan
>
> On 5/31/07, chris elliott <biol75 at york.ac.uk> wrote:
> > I've tried this with 2.8.cvs and Visual C 6 and don't see any error
> > messages. I 'd like to know more details of wxversion and compiler.
> >
> > Secondly, I don't understand what you are trying to do; normally you
> > don't add both the canvas and the wxCheckListBox to the smae frame to
> > occupy the same screen estate
> >
> > chris
> >
> > Örjan Persson wrote:
> > > Hi,
> > >
> > > I'm having a problem getting a wxMDIChildFrame derived class' menu to
> > > beeing painted correctly. It seems that some problem occurs when
> > > Windows is trying to draw/measure the menu items due to an invalid
> > > handle.
> > >
> > > I can reproduce the problem by adding the last two lines to the
> > > constructor of the mdi sample project like this;
> > >
> > > MyChild::MyChild(wxMDIParentFrame *parent, const wxString& title)
> > > : wxMDIChildFrame(parent, wxID_ANY, title, wxDefaultPosition,
> > > wxDefaultSize,
> > > wxDEFAULT_FRAME_STYLE |
> > > wxNO_FULL_REPAINT_ON_RESIZE)
> > > {
> > > canvas = (MyCanvas *) NULL;
> > > my_children.Append(this);
> > >
> > > // this should work for MDI frames as well as for normal ones
> > > SetSizeHints(100, 100);
> > >
> > > // this triggers the measuring and font creation
> > > wxCheckListBox *checkListBox = new (this, -1);
> > > checkListBox->Append(L"Test");
> > > }
> > >
> > > The wxCheckListBox::Append() seem to trigger the .. resulting in these
> > > errors;
> > > 15:53:49: ..\..\src\msw\dc.cpp(1758): 'GetTextExtentPoint32()' failed
> > > with error 0x00000000 (the operation completed successfully.).
> > > 15:53:49: ..\..\src\msw\dc.cpp(1758): 'GetTextExtentPoint32()' failed
> > > with error 0x00000006 (the handle is invalid.).
> > > 15:53:49: ..\..\src\msw\dc.cpp(1758): 'GetTextExtentPoint32()' failed
> > > with error 0x00000006 (the handle is invalid.).
> > >
> > > If I don't use the wxCheckListbox, the menu seems to work. Anyone has
> > > any clues?
> > >
> > > Regards,
> > > Örjan
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: wx-users-unsubscribe at lists.wxwidgets.org
> > > For additional commands, e-mail: wx-users-help at lists.wxwidgets.org
> > >
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: wx-users-unsubscribe at lists.wxwidgets.org
> > For additional commands, e-mail: wx-users-help at lists.wxwidgets.org
> >
> >
>
More information about the wx-users
mailing list