Fernando_Fiore

fixed cut,copy and paste in tabbed view

Sep 11th, 2020 (edited)
58
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // in main frame
  2. BEGIN_MSG_MAP(CMainFrame)
  3.         MESSAGE_HANDLER(WM_CREATE, OnCreate)
  4.         MESSAGE_HANDLER(WM_DESTROY, OnDestroy)
  5.         COMMAND_ID_HANDLER(ID_APP_EXIT, OnFileExit)
  6.         COMMAND_ID_HANDLER(ID_FILE_NEW, OnFileNew)
  7.         COMMAND_ID_HANDLER(ID_VIEW_TOOLBAR, OnViewToolBar)
  8.         COMMAND_ID_HANDLER(ID_VIEW_STATUS_BAR, OnViewStatusBar)
  9.         COMMAND_ID_HANDLER(ID_APP_ABOUT, OnAppAbout)
  10.         COMMAND_ID_HANDLER(ID_WINDOW_CLOSE, OnWindowClose)
  11.         COMMAND_ID_HANDLER(ID_WINDOW_CLOSE_ALL, OnWindowCloseAll)
  12.         COMMAND_RANGE_HANDLER(ID_WINDOW_TABFIRST, ID_WINDOW_TABLAST, OnWindowActivate)
  13.         COMMAND_RANGE_HANDLER(ID_EDIT_CLEAR, ID_EDIT_FIND_PREVIOUS,OnEdit)
  14.         CHAIN_MSG_MAP(CUpdateUI<CMainFrame>)
  15.         CHAIN_MSG_MAP(CFrameWindowImpl<CMainFrame>)
  16.     END_MSG_MAP()
  17.  
  18. //
  19. LRESULT OnEdit(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& /*bHandled*/)
  20. {
  21.     int i = m_view.GetActivePage();
  22.  
  23.     if (i >= 0) {
  24.         CWindow wnd = m_view.GetPageHWND(i);
  25.         wnd.SendMessage(WM_COMMAND, MAKEWPARAM(wID, wNotifyCode), (LPARAM)hWndCtl);
  26.     }
  27.     return 0;
  28. }
RAW Paste Data