void COwnerVstEditor::DoClose() //----------------------------- { // Prevent some plugins from storing a bogus window size (e.g. Electri-Q) ShowWindow(SW_HIDE); if(m_isMinimized) OnNcLButtonDblClk(HTCAPTION, CPoint(0, 0)); static_cast<CVstPlugin &>(m_VstPlugin).Dispatch(effEditClose, 0, 0, NULL, 0); CAbstractVstEditor::DoClose(); }
LRESULT CSkinDialog::DefWindowProc(UINT message, WPARAM wParam, LPARAM lParam) { LRESULT lrst = TRUE; if (!::IsWindow(m_hWnd)) return lrst; //重绘标题栏 if (message==WM_NCPAINT||message==WM_NCACTIVATE) { DrawTitleBar(); return lrst; } //鼠标双击标题栏 if(message==WM_NCLBUTTONDBLCLK){ CPoint pt; ::GetCursorPos(&pt); OnNcLButtonDblClk(pt); return lrst; } //鼠标按下处理 if(message==WM_NCLBUTTONDOWN){ CPoint pt; ::GetCursorPos(&pt); if(OnNcLButtonDown(pt)){ return lrst; } } //重新计算标题栏高度 if(message==WM_NCCALCSIZE){ NCCALCSIZE_PARAMS* lpncsp = (NCCALCSIZE_PARAMS*)lParam; BOOL bCalcValidRects = (BOOL)wParam; OnNcCalcSize(bCalcValidRects,lpncsp); } //鼠标焦点处理 if(message==WM_NCMOUSEMOVE){ CPoint pt; ::GetCursorPos(&pt); OnNcMouseMove(pt); } //鼠标弹起处理 if(message==WM_NCLBUTTONUP){ CPoint pt; ::GetCursorPos(&pt); OnNcLButtonUp(pt); } //鼠标离开标题栏处理 if(message==WM_NCMOUSELEAVE){ OnNcMouseLeave(); } //默认消息处理 return CDialog::DefWindowProc(message, wParam, lParam); }