Example #1
0
void wxMDIChildFrame::MSWDestroyWindow()
{
    invalidHandle = GetHwnd();

    wxMDIParentFrame *parent = (wxMDIParentFrame *)GetParent();

    // Must make sure this handle is invalidated (set to NULL) since all sorts
    // of things could happen after the child client is destroyed, but before
    // the wxFrame is destroyed.

    HWND oldHandle = (HWND)GetHWND();
    SendMessage(GetWinHwnd(parent->GetClientWindow()), WM_MDIDESTROY,
                (WPARAM)oldHandle, 0);

    if (parent->GetActiveChild() == (wxMDIChildFrame*) NULL)
        ResetWindowStyle((void*) NULL);

    invalidHandle = 0;

    if (m_hMenu)
    {
        ::DestroyMenu((HMENU) m_hMenu);
        m_hMenu = 0;
    }
    wxRemoveHandleAssociation(this);
    m_hWnd = 0;
}
Example #2
0
wxRadioBox::~wxRadioBox()
{
    m_isBeingDeleted = true;

    if (m_hWnd)
        wxRemoveHandleAssociation(this);
    if (m_ahRadioButtons)
    {
        for (int i = 0; i < m_nNoItems; i++)
        {
            wxWindow* pWin = wxFindWinFromHandle((WXHWND)m_ahRadioButtons[i]);
            wxRemoveHandleAssociation(pWin);
            ::WinDestroyWindow((HWND)m_ahRadioButtons[i]);
        }
        delete[] m_ahRadioButtons;
    }
    if (m_pnRadioWidth)
        delete[] m_pnRadioWidth;
    if (m_pnRadioHeight)
        delete[] m_pnRadioHeight;
} // end of wxRadioBox::~wxRadioBox