Пример #1
0
	void OnDestroy()
	{
		SetMsgHandled(false);
		CMessageLoop * pLoop = _Module.GetMessageLoop();
		ATLASSERT(NULL != pLoop);
		pLoop->RemoveIdleHandler(this);		
	}
Пример #2
0
CNoteDlg::~CNoteDlg() 
{
	ATLTRACE(_T("CNoteDlg::~CNoteDlg()\n")); 
	
	// Destroy the brush
	if (!m_brBkgnd.DeleteObject())
		ATLTRACE(_T("Note's brush was not destroyed!\n"));

	// Destroy the bitmaps
	if (!::DeleteObject(m_hBmpNote))
		ATLTRACE(_T("Note bitmap was not destroyed!\n"));
	if (!::DeleteObject(m_hBmpPinopen))
		ATLTRACE(_T("Pinopen bitmap was not destroyed!\n"));
	if (!::DeleteObject(m_hBmpPinclose))
		ATLTRACE(_T("Pinclose bitmap was not destroyed!\n"));
	if (!::DeleteObject(m_hBmpPinhoover))
		ATLTRACE(_T("Pinhoover bitmap was not destroyed!\n"));

	// Destroy the font
	if (!::DeleteObject(m_hFontClose))
		ATLTRACE(_T("Font for a close button was not destroyed!\n"));

	m_Printer.ClosePrinter();
	
	CMessageLoop* pLoop = _Module.GetMessageLoop();
	ATLASSERT(pLoop != NULL);
	pLoop->RemoveMessageFilter(this);
	pLoop->RemoveIdleHandler(this);
}
Пример #3
0
LRESULT CMainFrame::OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled)
{
	CMessageLoop* pLoop = _Module.GetMessageLoop();
	ATLASSERT(pLoop != NULL);
	pLoop->RemoveMessageFilter(this);
	pLoop->RemoveIdleHandler(this);

	// NOTE: the pane windows will delete themselves,
	//  so we just need to remove them from the list
	m_PaneWindows.erase(m_PaneWindows.begin(),m_PaneWindows.end());

	for(_PaneWindowIconsIter iter=m_PaneWindowIcons.begin(); iter!=m_PaneWindowIcons.end(); iter++)
	{
		::DestroyIcon(*iter);
		*iter = NULL;
	}
	m_PaneWindowIcons.erase(m_PaneWindowIcons.begin(), m_PaneWindowIcons.end());

#ifdef DF_FOCUS_FEATURES
		m_focusHandler.RemoveHook(m_hWnd);
#endif

	//map<VGMFile*, CItemTreeView*> itemViewMap;
	//map<HWND, CItemTreeView*> hwndToItemTreeView;
	//for (map<VGMFile*, CItemTreeView*>::iterator iter = itemViewMap.begin(); iter != itemViewMap.end(); iter++)
	//	delete iter->second;
		//iter->second->DestroyWindow();
	//for (map<HWND, CItemTreeView*>::iterator iter = hwndToItemTreeView.begin(); iter != hwndToItemTreeView.end(); iter++)
	//	*iter->second->DestroyWindow();
	//hwndToItemTreeView.clear();
	PostQuitMessage(0);

	bHandled = TRUE;
	return 0;
}
Пример #4
0
LRESULT CMainDlg::OnDestroy(
    UINT /*uMsg*/, WPARAM /*wParam*/,
    LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
    if ( m_pDeviceManager )
    {
        m_pDeviceManager->VideoCaptureStop();
        m_pDeviceManager->DeviceFree();
        m_pDeviceManager = NULL;
        ::FreeLibrary(m_Hinstance);

        IVUIFactory::ReleaseIVConfigDlg();
        IVUIFactory::UnitIVConfig();

    }
    // unregister message filtering and idle updates
    CMessageLoop* pLoop = _Module.GetMessageLoop();
    ATLASSERT(pLoop != NULL);
    pLoop->RemoveMessageFilter(this);
    pLoop->RemoveIdleHandler(this);



    return 0;
}
Пример #5
0
CSearchDlg::~CSearchDlg()
{
	ATLTRACE(_T("CSearchDlg::~CSearchDlg()\n"));

	CMessageLoop* pLoop = _Module.GetMessageLoop();
	ATLASSERT(pLoop != NULL);
	pLoop->RemoveMessageFilter(this);
	pLoop->RemoveIdleHandler(this);
}
Пример #6
0
LRESULT CPictureSettingDlg::OnDestroy( UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/ )
{
	m_previewDlg.DestroyWindow();
	CMessageLoop* pLoop = _Module.GetMessageLoop();
	ATLASSERT(pLoop != NULL);
	pLoop->RemoveMessageFilter(this);
	pLoop->RemoveIdleHandler(this);
	return 0;
}
void PreviousImagesView::DestroyView()
{
   // remove idle handler
   CMessageLoop* pLoop = _Module.GetMessageLoop();
   ATLASSERT(pLoop != nullptr);
   pLoop->RemoveIdleHandler(this);

   ATLVERIFY(TRUE == DestroyWindow());
}
Пример #8
0
LRESULT CMainDlg::OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	// unregister message filtering and idle updates
	CMessageLoop* pLoop = _Module.GetMessageLoop();
	ATLASSERT(pLoop != NULL);
	pLoop->RemoveMessageFilter(this);
	pLoop->RemoveIdleHandler(this);

	return 0;
}
Пример #9
0
LRESULT CMainDlg::OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	beRunning = false;
	// unregister message filtering and idle updates
	CMessageLoop* pLoop = _Module.GetMessageLoop();
	ATLASSERT(pLoop != NULL);
	pLoop->RemoveMessageFilter(this);
	pLoop->RemoveIdleHandler(this);
	//::MessageBox(NULL, L"程序退出", L"Error", MB_OK);
	return 0;
}
Пример #10
0
LRESULT CMainDlg::OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	AtlTrace("CMainDlg::OnDestroy");
	// unregister message filtering and idle updates
	//CMessageLoop* pLoop = _Module.GetMessageLoop();
	CMessageLoop* pLoop = _thread->GetMessageLoop();
	//if(pLoop == NULL)
	//	return 0;
	pLoop->RemoveMessageFilter(this);
	pLoop->RemoveIdleHandler(this);
	return 0;
}
Пример #11
0
void CMainFrame::OnDestroy()
{
		m_CmdBar.AttachMenu(NULL);

	// unregister message filtering and idle updates
	CMessageLoop* pLoop = _Module.GetMessageLoop();
	ATLASSERT(pLoop != NULL);
	pLoop->RemoveMessageFilter(this);
	pLoop->RemoveIdleHandler(this);

    SetMsgHandled(FALSE);
	//bHandled = FALSE;
}
Пример #12
0
LRESULT CMainFrame::OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled)
{
//	FireWorkspaceClose();
	m_PluginManager.DisconnectionAll(NULL);
	// unregister message filtering and idle updates
	CMessageLoop* pLoop = _Module.GetMessageLoop();
	ATLASSERT(pLoop != NULL);
	pLoop->RemoveMessageFilter(this);
	pLoop->RemoveIdleHandler(this);

	bHandled = FALSE;
	return 1;
}
Пример #13
0
LRESULT CMainFrame::OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled)
{
    // unregister message filtering and idle updates
    CMessageLoop* pLoop = _Module.GetMessageLoop();
    ATLASSERT(pLoop != NULL);
    pLoop->RemoveMessageFilter(this);
    pLoop->RemoveIdleHandler(this);

    delete m_pMainController;
    m_pMainController = NULL;

    bHandled = FALSE;
    return 1;
}
Пример #14
0
LRESULT CMainFrame::OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled)
{
    LRunSql::Close();		//断开数据库连接

    // unregister message filtering and idle updates
    CMessageLoop* pLoop = _Module.GetMessageLoop();
    ATLASSERT(pLoop != NULL);
    pLoop->RemoveMessageFilter(this);
    pLoop->RemoveIdleHandler(this);

    bHandled = FALSE;

    return 1;
}
Пример #15
0
LRESULT CFlashPlayerDlg::OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	m_inited = false;
	pFlashPtr->Release();

	// unregister message filtering and idle updates
	CMessageLoop* pLoop = _Module.GetMessageLoop();
	ATLASSERT(pLoop != NULL);
	pLoop->RemoveMessageFilter(this);
	pLoop->RemoveIdleHandler(this);


	return 0;
}
Пример #16
0
LRESULT CMainWindow::OnDestroy(UINT, WPARAM, LPARAM, BOOL& bHandled)
{
    
    //bHandled = TRUE;


	// unregister object for message filtering and idle updates
	CMessageLoop* pLoop = _Module.GetMessageLoop();
	ATLASSERT(pLoop != NULL);
	pLoop->RemoveMessageFilter(this);
	pLoop->RemoveIdleHandler(this);

    ::PostQuitMessage(0);
    return 1;
}
Пример #17
0
LRESULT CWebinosUI::OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	WTSUnRegisterSessionNotification(m_hWnd);

	ClearSession();

	Shell_NotifyIcon(NIM_DELETE, &m_trayIcon);

	// unregister message filtering and idle updates
	CMessageLoop* pLoop = _Module.GetMessageLoop();
	ATLASSERT(pLoop != NULL);
	pLoop->RemoveMessageFilter(this);
	pLoop->RemoveIdleHandler(this);

	return 0;
}
Пример #18
0
LRESULT CMainDlg::OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	// unregister message filtering and idle updates
	for (int i = 0; i < m_vetdlgs.size(); i++)
	{
		m_vetdlgs[i]->DestroyWindow();
		delete m_vetdlgs[i];
	}

	CMessageLoop* pLoop = _Module.GetMessageLoop();
	ATLASSERT(pLoop != NULL);
	pLoop->RemoveMessageFilter(this);
	pLoop->RemoveIdleHandler(this);

	return 0;
}
Пример #19
0
LRESULT MainFrame::OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& bHandled)
{
   m_processor.SetOutputDebugStringHandler(nullptr);

   m_processor.GetScheduler().SetExecutionStateChangedHandler(
      LuaScheduler::T_fnOnExecutionStateChanged());

   m_processor.Stop();

   // unregister message filtering and idle updates
   CMessageLoop* pLoop = _Module.GetMessageLoop();
   ATLASSERT(pLoop != nullptr);
   pLoop->RemoveMessageFilter(this);
   pLoop->RemoveIdleHandler(this);

   bHandled = false;
   return 1;
}
Пример #20
0
LRESULT CLoginDlg::OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
	// TODO: Add your message handler code here and/or call default
	CMessageLoop* pLoop = _Module.GetMessageLoop();
	ATLASSERT(pLoop != NULL);
	pLoop->RemoveMessageFilter(this);
	pLoop->RemoveIdleHandler(this);

	BSTR IP=0;
	GetDlgItemText(IDC_COMBO1, IP);
	if(IP == 0) IP=L"auto";
	m_cfg.Set(L"Config", L"ISIP",IP);
	CComboBox box;
	box = GetDlgItem(IDC_APPID);
	m_cfg.Set(L"Config", L"AppID", box.GetCurSel() );
	box = GetDlgItem(IDC_SUBID);
	m_cfg.Set(L"Config", L"SubID",box.GetCurSel());
	m_cfg.Set(L"Config", L"MajorVer",1);
	m_cfg.Set(L"Config", L"SubVer",1);


	return 0;
}
Пример #21
0
LRESULT [!output WTL_MAINDLG_CLASS]::OnDestroy(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
//{{WTLBUILDER_MEMBER_DESTRUCTION
//}}WTLBUILDER_MEMBER_DESTRUCTION

	// unregister message filtering and idle updates
	CMessageLoop* pLoop = _Module.GetMessageLoop();
	ATLASSERT(pLoop != NULL);
	pLoop->RemoveMessageFilter(this);
	pLoop->RemoveIdleHandler(this);
[!if WTL_COM_SERVER]

	// if UI is the last thread, no need to wait
	if(_Module.GetLockCount() == 1)
	{
		_Module.m_dwTimeOut = 0L;
		_Module.m_dwPause = 0L;
	}
	_Module.Unlock();
[!endif]

	return 0;
}