LRESULT CMainFrame::WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam) { // switch (uMsg) // { // } // switch (uMsg) return WndProcDefault(uMsg, wParam, lParam); } // LRESULT CMainFrame::WndProc(...)
LRESULT CMainFrame::WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam) { // switch (uMsg) // { // Add case statements for each messages to be handled here // } // pass unhandled messages on for default processing return WndProcDefault(uMsg, wParam, lParam); }
LRESULT CMDIChildText::WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_SETFOCUS: return OnSetFocus(wParam, lParam); } // Do default processing for other messages return WndProcDefault(uMsg, wParam, lParam); }
LRESULT CMainFrame::WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam) { // switch (uMsg) // { // // } // pass any unhandled messages on for default processing return WndProcDefault(uMsg, wParam, lParam); }
LRESULT CMyCombo::WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_DESTROY: { SendMessage(CBEM_SETIMAGELIST, 0L, 0L); break; } } return WndProcDefault(uMsg, wParam, lParam); }
LRESULT CViewMax::WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_SIZE: Invalidate(); return 0L; } return WndProcDefault(uMsg, wParam, lParam); }
LRESULT CMainFrame::WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_MOUSEACTIVATE: // Store the active docker before processing the menu events m_pLastActiveDocker = m_DockTabbedMDI.GetActiveDocker(); break; } // Always pass unhandled messages on to WndProcDefault return WndProcDefault(uMsg, wParam, lParam); }
LRESULT CHyperlink::WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_LBUTTONDOWN: OnLButtonDown(); break; case WM_LBUTTONUP: OnLButtonUp(lParam); break; case WM_SETCURSOR: return OnSetCursor(); case WM_NCHITTEST: return HTCLIENT; // Claim that the mouse is in a client area } return WndProcDefault(uMsg, wParam, lParam); }
LRESULT CView::WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_DROPFILES: return OnDropFiles(wParam, lParam); case WM_HSCROLL: return OnHScroll(wParam, lParam); case WM_VSCROLL: return OnVScroll(wParam, lParam); case WM_WINDOWPOSCHANGED: return OnWindowPosChanged(wParam, lParam); } // Pass unhandled messages on for default processing return WndProcDefault(uMsg, wParam, lParam); }
LRESULT CMainFrame::WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case UWM_DROPFILE: { LPCTSTR szFileName = (LPCTSTR)wParam; assert(szFileName); LoadFile(szFileName); break; } } // switch (uMsg) return WndProcDefault(uMsg, wParam, lParam); } // LRESULT CMainFrame::WndProc(...)
LRESULT CView::WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam) { // This function is our message procedure. We process the messages for // the view window here. Unprocessed messages are passed on for // default processing. switch(uMsg) { case WM_SIZE: return OnSize(); case WM_SYSCOMMAND: return OnSysCommand(wParam, lParam); case MSG_TRAYICON: return OnTrayIcon(wParam, lParam); } // pass unhandled messages on for default processing return WndProcDefault(uMsg, wParam, lParam); }
LRESULT CMainFrame::WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_DESTROY: PostThreadMessage(m_View.GetThreadID(), WM_QUIT, 0, 0); ::WaitForSingleObject(m_View.GetThread(), INFINITE); break; case UWM_VIEWCREATED: RecalcLayout(); break; } // pass unhandled messages on for default processing return WndProcDefault(uMsg, wParam, lParam); }
LRESULT CTestWindow::WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_CLOSE: { CString str; str.Format(_T("Closing test Window %d\n"), m_nWindow); TRACE(str); } break; case WM_DESTROY: // Terminate the thread. ::PostQuitMessage(0); break; } return WndProcDefault(uMsg, wParam, lParam); }
LRESULT CTestWindow::WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam) { static LRESULT nMessages = 0; switch (uMsg) { case WM_CLOSE: { CString str; str.Format(str, _T("Closing test Window #%d\n"), m_nWindow); TRACE(str); } break; case WM_TESTMESSAGE: // return the number of WM_TESTMESSAGE messages processsed so far return ++nMessages; } return WndProcDefault(uMsg, wParam, lParam); }
LRESULT CMyTreeView::WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_DRAWITEM: case WM_MENUCHAR: case WM_MEASUREITEM: case WM_INITMENUPOPUP: { if (m_ccm2.GetIContextMenu2()) m_ccm2.HandleMenuMsg(uMsg, wParam, lParam); } break; case WM_DESTROY: // Cleanup m_pItems.clear(); break; } return WndProcDefault(uMsg, wParam, lParam); }
/*============================================================================*/ LRESULT CustomButton:: WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam) /* This method processes all messages sent to the button control. The uMsg parameter specifies the message and both wParam and lParam specify message-specific information not of importance to this class, but which is relayed on to the window default process. *-----------------------------------------------------------------------------*/ { // switch (uMsg) // { // // Add case statements for each message to be handled here // // default: // break; // } // pass unhandled messages on for default processing return WndProcDefault(uMsg, wParam, lParam); }
LRESULT CMainMDIFrame::WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam) { switch (uMsg) { case WM_MOUSEACTIVATE: // Called when a MDI child is activated with a mouse click { // Redraw all MDI children to update docker caption std::vector<MDIChildPtr>::const_iterator iter; for (iter = GetAllMDIChildren().begin(); iter < GetAllMDIChildren().end(); ++iter) { (*iter)->RedrawWindow(); } } break; } // pass unhandled messages on for default processing return WndProcDefault(uMsg, wParam, lParam); }
LRESULT CMainFrame::WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam) { // handle left mouse button up/down and mouse move messages // a seperate function for each case keeps the code tidy. switch (uMsg) { case WM_LBUTTONDOWN: OnLButtonDown(wParam, lParam); break; case WM_MOUSEMOVE: OnMouseMove(wParam, lParam); break; case WM_LBUTTONUP: OnLButtonUp(wParam, lParam); break; } // Pass unhandled messages on to WndProcDefault return WndProcDefault(uMsg, wParam, lParam); }
LRESULT GVSearchListBox::WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam) { switch(uMsg) { case WM_LBUTTONDOWN: { #if 0 //auto rowIndex = SendMessage(m_hWnd, LB_GETCURSEL, 0, 0); auto x = LOWORD(lParam); auto y = HIWORD(lParam); //D2D1::Point2U p2u(LOWORD(x), HIWORD(y)) auto xPixels = x * 72 / 96; auto yPixels = y * 72 / 96; LONG_PTR rowIndex = LOWORD(SendMessage(m_hWnd, LB_ITEMFROMPOINT, (WPARAM)xPixels, (LPARAM)yPixels)); if (rowIndex == LB_ERR) break; //log_debug("~~~~~~~~~~~~~~~~ GVSearchListBox::WndProc click rowIndex = " << rowIndex); log_debug("~~~~~~~~~~~~~~~~ rowIndex = " << rowIndex << ", x = " << x << ", y = " << y); #endif } break; default: break; } return WndProcDefault(uMsg, wParam, lParam); }
LRESULT CViewContainer::WndProc(UINT uMsg, WPARAM wParam, LPARAM lParam) { switch(uMsg) { case WM_SIZE: OnAfterResize(false); m_resized = true; break; case WM_ERASEBKGND: // intercept message to avoid flicker during resize return 1; case WM_PAINT: if(m_showInfoBar) { // we need to paint the splitter manually because // we intercept WM_ERASEBKGND. RECT l_viewArea = GetClientRect(); int l_nfoAreaHeight = l_viewArea.bottom - l_viewArea.top - m_infoBarHeight; PAINTSTRUCT l_ps; HDC l_dc = ::BeginPaint(GetHwnd(), &l_ps); RECT l_rect = { 0, l_nfoAreaHeight - ::GetSystemMetrics(SM_CYSIZEFRAME), l_viewArea.right - l_viewArea.left, l_nfoAreaHeight }; ::FillRect(l_dc, &l_rect, ::GetSysColorBrush(COLOR_BTNFACE)); ::EndPaint(GetHwnd(), &l_ps); return 0; } else break; case WM_LBUTTONDOWN: if(IsYOnSplitter(GET_Y_LPARAM(lParam))) { m_infoBarResizing = true; ::SetCursor(::LoadCursor(NULL, IDC_SIZENS)); SetCapture(); } break; case WM_LBUTTONUP: if(IsYOnSplitter(GET_Y_LPARAM(lParam))) { m_infoBarResizing = false; ::SetCursor(::LoadCursor(NULL, IDC_ARROW)); ReleaseCapture(); } break; case WM_MOUSEMOVE: if(m_infoBarResizing) { RECT l_client = GetClientRect(); int l_infoBarHeight = (l_client.bottom - l_client.top - ::GetSystemMetrics(SM_CYSIZEFRAME) / 2) - GET_Y_LPARAM(lParam); if(l_infoBarHeight > INFOBAR_MINIMUM_HEIGHT && l_infoBarHeight < l_client.bottom - l_client.top - INFOBAR_MINIMUM_HEIGHT) { m_infoBarHeight = l_infoBarHeight; OnAfterResize(false); } } else if(IsYOnSplitter(GET_Y_LPARAM(lParam))) { m_cursor = IDC_SIZENS; } else { m_cursor = IDC_ARROW; } break; case WM_CAPTURECHANGED: m_infoBarResizing = false; break; case WM_SETCURSOR: return CUtilWin32GUI::GenericOnSetCursor(m_cursor, lParam); } return WndProcDefault(uMsg, wParam, lParam); }