[ wxwindows-Patches-1535693 ] wxWindowCreateEvents not sent for wxControl derivatives

SourceForge.net noreply at sourceforge.net
Sun Aug 6 19:59:05 PDT 2006


Patches item #1535693, was opened at 2006-08-06 23:59
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1535693&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: MSW specific
Group: bug fix
Status: Open
Resolution: None
Priority: 5
Submitted By: SnakeChomp (snakechomp)
Assigned to: Nobody/Anonymous (nobody)
Summary: wxWindowCreateEvents not sent for wxControl derivatives

Initial Comment:
wxWindowCreateEvents are not sent for widgets like
wxTextCtrl or wxTreeCtrl. The cause is that WM_CREATE
is sent because the window is subclasses so wxWidgets
never sees WM_CREATE. The following code addition to
wxControl::MSWCreateControl corrects this problem by
sending wxWindowCreateEvent after the window has been
created with CreateWindowEx and after it has been
subclassed:

Line 168 of src/msw/control.cpp in 2.6.3, replace this
block:
    // install wxWidgets window proc for this window
    SubclassWin(m_hWnd);

    // set up fonts and colours
    InheritAttributes();

With this block:
    // install wxWidgets window proc for this window
    SubclassWin(m_hWnd);

    // Make sure to send the wxWindowCreateEvent
    wxWindowCreateEvent create_event(this);
    GetEventHandler()->ProcessEvent(create_event);

    // set up fonts and colours
    InheritAttributes();

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1535693&group_id=9863




More information about the wx-dev mailing list