[ wxwindows-Bugs-1728376 ] MDI child frame and wxCheckListBox menu
problem
SourceForge.net
noreply at sourceforge.net
Wed Feb 13 01:28:54 PST 2008
Bugs item #1728376, was opened at 2007-05-30 16:50
Message generated for change (Comment added) made by troelsk
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1728376&group_id=9863
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: wxMSW specific
Group: None
Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: Örjan Persson (asciono)
Assigned to: Nobody/Anonymous (nobody)
Summary: MDI child frame and wxCheckListBox menu problem
Initial Comment:
I'm having a problem getting a wxMDIChildFrame derived class' menu to work. It seems that some problem occurs when Windows is trying to draw/measure the menu items due to an invalid handle.
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.).
To reproduce the problem, add 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 wxCheckListBox(this, -1);
checkListBox->Append(L"Test");
}
If you remove the Append() call, the menu will work as intended. At least this happends under Windows XP.
----------------------------------------------------------------------
Comment By: troelsk (troelsk)
Date: 2008-02-13 10:28
Message:
Logged In: YES
user_id=1290727
Originator: NO
Unfortunately wxCheckListBox continues to have a bad effect on menu
drawing, bug 1713158 persists.
http://sourceforge.net/tracker/index.php?func=detail&aid=1713158&group_id=9863&atid=109863
----------------------------------------------------------------------
Comment By: Örjan Persson (asciono)
Date: 2008-02-13 10:04
Message:
Logged In: YES
user_id=625666
Originator: YES
This was fixed in both in head and 2.8-branch. Thanks!
http://svn.wxwidgets.org/viewvc/wx?view=rev&revision=51379
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=109863&aid=1728376&group_id=9863
More information about the wx-dev
mailing list