Changeset 1338
- Timestamp:
- 01/02/08 21:04:43 (8 months ago)
- Location:
- trunk/src
- Files:
-
- 1 removed
- 17 modified
-
buze/main.cpp (modified) (1 diff)
-
buzelib/FileBrowserView.cpp (modified) (3 diffs)
-
buzelib/FileBrowserView.h (modified) (3 diffs)
-
buzelib/HelpView.cpp (modified) (2 diffs)
-
buzelib/HelpView.h (modified) (3 diffs)
-
buzelib/MachineParameterView.cpp (modified) (5 diffs)
-
buzelib/MachineParameterView.h (modified) (3 diffs)
-
buzelib/MachineView.cpp (modified) (2 diffs)
-
buzelib/MachineView.h (modified) (3 diffs)
-
buzelib/MainFrm.cpp (modified) (4 diffs)
-
buzelib/MainFrm.h (modified) (3 diffs)
-
buzelib/Preferences (deleted)
-
buzelib/PropertyListView.cpp (modified) (1 diff)
-
buzelib/PropertyListView.h (modified) (3 diffs)
-
buzelib/SequenceView.cpp (modified) (2 diffs)
-
buzelib/SequenceView.h (modified) (3 diffs)
-
buzelib/WaveTableView.cpp (modified) (1 diff)
-
buzelib/WaveTableView.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/buze/main.cpp
r1332 r1338 9 9 #include "../buzelib/MainFrm.h" 10 10 #include "../buzelib/buze.h" 11 #include "../buzelib/Preferences/PreferencesDialog.h"12 11 #include "../libzzub/tools.h" 13 12 #ifndef _USE_OLD_IOSTREAMS -
trunk/src/buzelib/FileBrowserView.cpp
r1331 r1338 118 118 } 119 119 120 121 LRESULT CFileBrowserView::OnClose(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) {122 // denne fixet crash når vi lukker hele clienten123 mainFrame->removeAccelerator(m_hWnd);124 mainFrame->closeClientWindow(const_cast<ClientView*>(mainFrame->get(m_hWnd)));125 return 0;126 }127 128 LRESULT CFileBrowserView::OnSize(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM lParam, BOOL& /*bHandled*/) {129 WORD cx = LOWORD( lParam);130 WORD cy = HIWORD( lParam);131 132 int toolbarHeight=getToolbarHeight();133 fileList.MoveWindow(0, getToolbarHeight(), cx, cy-getToolbarHeight());134 135 return 0;136 }137 138 120 LRESULT CFileBrowserView::OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& /*bHandled*/) { 139 121 // http://groups.google.no/group/microsoft.public.vc.atl/browse_thread/thread/afb91a02192bd05b/d67319f5d6b58936?lnk=st&q=CListViewCtrl+additem&rnum=1&hl=no#d67319f5d6b58936 … … 154 136 insertToolbarBand(shortcutDropdown, "", 100); 155 137 156 157 138 hWndButtonToolBar=mainFrame->CreateSimpleToolBarCtrl(m_hWnd, IDR_FILEBROWSER, FALSE, ATL_SIMPLE_TOOLBAR_PANE_STYLE); 158 139 SIZE size; 159 140 SendMessage(hWndButtonToolBar, TB_GETMAXSIZE, 0, (LPARAM)&size); 160 141 insertToolbarBand(hWndButtonToolBar, "", size.cx); 161 162 mainFrame->addAccelerator(m_hWnd, AtlLoadAccelerators(IDR_FILEBROWSER)); 142 143 hAccel = AtlLoadAccelerators(IDR_FILEBROWSER); 144 145 CMessageLoop* pLoop = _Module.GetMessageLoop(); 146 ATLASSERT(pLoop != NULL); 147 pLoop->AddMessageFilter(this); 163 148 164 149 CBrowseHistory bh; … … 167 152 168 153 return 0; 154 } 155 156 BOOL CFileBrowserView::PreTranslateMessage(MSG* pMsg) { 157 if (GetFocus() == *this || GetFocus() == fileList) 158 if (::TranslateAccelerator(m_hWnd, hAccel, pMsg)) 159 return TRUE; 160 return FALSE; 161 } 162 163 LRESULT CFileBrowserView::OnClose(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) { 164 CMessageLoop* pLoop = _Module.GetMessageLoop(); 165 ATLASSERT(pLoop != NULL); 166 pLoop->RemoveMessageFilter(this); 167 168 // denne fixet crash når vi lukker hele clienten 169 mainFrame->closeClientWindow(const_cast<ClientView*>(mainFrame->get(m_hWnd))); 170 return 0; 171 } 172 173 LRESULT CFileBrowserView::OnSize(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM lParam, BOOL& /*bHandled*/) { 174 WORD cx = LOWORD( lParam); 175 WORD cy = HIWORD( lParam); 176 177 int toolbarHeight=getToolbarHeight(); 178 fileList.MoveWindow(0, getToolbarHeight(), cx, cy-getToolbarHeight()); 179 180 return 0; 169 181 } 170 182 -
trunk/src/buzelib/FileBrowserView.h
r1331 r1338 26 26 }; 27 27 28 class CFileBrowserView : public CToolbarWindow<CFileBrowserView> { 28 class CFileBrowserView 29 : public CToolbarWindow<CFileBrowserView> 30 , public CMessageFilter 31 { 29 32 ClientViewListener* clientViewListener; 30 33 … … 51 54 bool isCtrlDown(); 52 55 bool isShiftDown(); 56 HACCEL hAccel; 53 57 54 58 public: … … 101 105 102 106 LRESULT OnToolbarChildSize(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); 107 virtual BOOL PreTranslateMessage(MSG* pMsg); 103 108 104 109 std::vector<CFileInfo*> getSelectedFiles(); -
trunk/src/buzelib/HelpView.cpp
r1331 r1338 23 23 helpText.SetReadOnly(); 24 24 helpText.SetFont(helpFont); 25 mainFrame->addAccelerator(m_hWnd, AtlLoadAccelerators(IDR_SEQUENCER)); 25 26 hAccel = AtlLoadAccelerators(IDR_HELPVIEW); 27 28 CMessageLoop* pLoop = _Module.GetMessageLoop(); 29 ATLASSERT(pLoop != NULL); 30 pLoop->AddMessageFilter(this); 26 31 27 32 mainFrame->addTabableView(m_hWnd); 28 33 return 0; 34 } 35 36 BOOL CHelpView::PreTranslateMessage(MSG* pMsg) { 37 if (GetFocus() == *this || GetFocus() == helpText) 38 if (::TranslateAccelerator(m_hWnd, hAccel, pMsg)) 39 return TRUE; 40 return FALSE; 29 41 } 30 42 … … 37 49 38 50 LRESULT CHelpView::OnClose(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { 51 CMessageLoop* pLoop = _Module.GetMessageLoop(); 52 ATLASSERT(pLoop != NULL); 53 pLoop->RemoveMessageFilter(this); 54 39 55 mainFrame->closeClientWindow(const_cast<ClientView*>(mainFrame->get(m_hWnd))); 40 mainFrame->removeAccelerator(m_hWnd); 56 41 57 return 0; 42 58 } -
trunk/src/buzelib/HelpView.h
r1218 r1338 5 5 6 6 class CHelpView 7 : public CWindowImpl<CHelpView> { 7 : public CWindowImpl<CHelpView> 8 , public CMessageFilter 9 { 8 10 public: 9 11 ClientViewListener* clientViewListener; … … 11 13 CFont helpFont; 12 14 CEdit helpText; 15 HACCEL hAccel; 13 16 14 17 DECLARE_WND_CLASS("HelpView") … … 29 32 LRESULT OnFocus(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); 30 33 LRESULT OnHelp(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL& bHandled); 34 virtual BOOL PreTranslateMessage(MSG* pMsg); 31 35 }; -
trunk/src/buzelib/MachineParameterView.cpp
r1331 r1338 78 78 79 79 machine->addEventHandler(this); 80 mainFrame->addAccelerator(m_hWnd, AtlLoadAccelerators(IDR_PARAMETERVIEW)); 81 mainFrame->addDisabledAcceleratorComboBox(presetDropDown); 80 81 hAccel = AtlLoadAccelerators(IDR_PARAMETERVIEW); 82 83 CMessageLoop* pLoop = _Module.GetMessageLoop(); 84 ATLASSERT(pLoop != NULL); 85 pLoop->AddMessageFilter(this); 82 86 83 87 std::string uri = machine->loader->plugin_info->uri; … … 111 115 112 116 117 BOOL CMachineParameterView::PreTranslateMessage(MSG* pMsg) { 118 if (GetFocus() == *this || (selectedSlider < sliderView.sliders.size() && GetFocus() == sliderView.sliders[selectedSlider]->trackBar.m_slider)) 119 if (::TranslateAccelerator(m_hWnd, hAccel, pMsg)) 120 return TRUE; 121 return FALSE; 122 } 123 113 124 LRESULT CMachineParameterView::OnClose(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) { 114 125 115 126 document->removeView(this); 116 mainFrame->removeAccelerator(m_hWnd);117 mainFrame->removeDisabledAcceleratorComboBox(presetDropDown);118 127 119 128 machine->removeEventHandler(this); 120 129 this->machine = 0; // in case machine is deleted and window updated before window is fully destroyed 130 131 CMessageLoop* pLoop = _Module.GetMessageLoop(); 132 ATLASSERT(pLoop != NULL); 133 pLoop->RemoveMessageFilter(this); 121 134 122 135 mainFrame->closeClientWindow(const_cast<ClientView*>(mainFrame->get(m_hWnd))); … … 208 221 209 222 void CMachineParameterView::bindPresets() { 210 while (presetDropDown.GetCount() > 0)211 presetDropDown.DeleteString(0);223 presetDropDown.ResetContent(); 224 presetDropDown.SetRedraw(FALSE); 212 225 213 226 // create and add default settings … … 235 248 presetDropDown.SetItemData(i+1, (DWORD_PTR)pi); 236 249 } 250 presetDropDown.SetRedraw(TRUE); 237 251 } 238 252 … … 671 685 672 686 for (size_t i=0; i<sliders.size(); i++) { 673 int labelWidth=80;674 int valueWidth=80;675 int sliderWidth=width-labelWidth-valueWidth;676 677 687 sliders[i]->MoveWindow(0, i*CParameterSliderCtrl::sliderHeight, width, CParameterSliderCtrl::sliderHeight); 678 688 } -
trunk/src/buzelib/MachineParameterView.h
r1331 r1338 50 50 : public CViewImpl<CMainFrame, CDocument, CMachineParameterView> 51 51 , public CToolbarWindow<CMachineParameterView> 52 , public zzub::event_handler { 52 , public zzub::event_handler 53 , public CMessageFilter 54 { 53 55 protected: 54 56 zzub_event_id tickEvent, parameterChangedEvent; … … 63 65 HWND hWndButtonToolBar; 64 66 int selectedSlider; 65 virtual bool invoke(zzub_event_data_t& data);67 HACCEL hAccel; 66 68 public: 67 69 DECLARE_WND_CLASS("CMachineParameterView") … … 140 142 LRESULT OnToolbarChildSize(int idCtrl, LPNMHDR pnmh, BOOL& bHandled); 141 143 144 virtual BOOL PreTranslateMessage(MSG* pMsg); 142 145 void OnUpdate(CView* pSender, LPARAM lHint, LPVOID pHint); 146 virtual bool invoke(zzub_event_data_t& data); 143 147 144 148 zzub::metaplugin* getMachine() { return machine; } -
trunk/src/buzelib/MachineView.cpp
r1331 r1338 155 155 mainFrame->addTabableView(m_hWnd); 156 156 157 mainFrame->addAccelerator(m_hWnd, AtlLoadAccelerators(IDR_MACHINEVIEW)); 157 hAccel = AtlLoadAccelerators(IDR_MACHINEVIEW); 158 159 CMessageLoop* pLoop = _Module.GetMessageLoop(); 160 ATLASSERT(pLoop != NULL); 161 pLoop->AddMessageFilter(this); 158 162 159 163 document->selectMachine(document->player->master); … … 162 166 } 163 167 168 BOOL CMachineView::PreTranslateMessage(MSG* pMsg) { 169 if (GetFocus() == *this) 170 if (::TranslateAccelerator(m_hWnd, hAccel, pMsg)) 171 return TRUE; 172 return FALSE; 173 } 174 164 175 LRESULT CMachineView::OnClose(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) { 176 CMessageLoop* pLoop = _Module.GetMessageLoop(); 177 ATLASSERT(pLoop != NULL); 178 pLoop->RemoveMessageFilter(this); 179 165 180 document->removeView(this); 166 181 167 182 // denne fixet crash når vi lukker hele clienten 168 183 mainFrame->closeClientWindow(const_cast<ClientView*>(mainFrame->get(m_hWnd))); 169 mainFrame->removeAccelerator(m_hWnd);170 184 171 185 return 0; -
trunk/src/buzelib/MachineView.h
r1307 r1338 23 23 : public CViewImpl<CMainFrame, CDocument, CMachineView> 24 24 , public CMachineDropTargetWindow 25 , public CWindowImpl<CMachineView> { 25 , public CWindowImpl<CMachineView> 26 , public CMessageFilter 27 { 26 28 27 29 protected: … … 71 73 72 74 std::map<zzub::metaplugin*, bool> ledStates; 75 HACCEL hAccel; 73 76 74 77 public: … … 146 149 LRESULT OnMachineParameters(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); 147 150 void OnUpdate(CView* pSender, LPARAM lHint, LPVOID pHint); 151 virtual BOOL PreTranslateMessage(MSG* pMsg); 148 152 149 153 bool OnDragOver(const POINTL& pt, FORMATETC* pFmtEtc, STGMEDIUM& medium,DWORD *pdwEffect); -
trunk/src/buzelib/MainFrm.cpp
r1336 r1338 19 19 #include "WaveTableView.h" 20 20 #include "FileBrowserView.h" 21 #include "Preferences/PreferencesDialog.h"22 21 #include "EditorActions.h" 23 22 #include "WaitWindow.h" … … 347 346 } 348 347 349 void CMainFrame::addAccelerator(HWND hWnd, HACCEL accel) {350 acceleratorHandlers.insert(pair<HWND, HACCEL>(hWnd, accel));351 }352 353 void CMainFrame::removeAccelerator(HWND hWnd) {354 map<HWND, HACCEL>::iterator i = acceleratorHandlers.find(hWnd);355 if (i != acceleratorHandlers.end())356 acceleratorHandlers.erase(i);357 }358 359 // dont process accelerators when these controls have focus360 void CMainFrame::addDisabledAcceleratorControl(HWND hWnd) {361 disabledAcceleratorControls.push_back(hWnd);362 }363 364 void CMainFrame::addDisabledAcceleratorComboBox(CComboBox& combo) {365 COMBOBOXINFO cbi;366 cbi.cbSize = sizeof(COMBOBOXINFO);367 combo.GetComboBoxInfo(&cbi);368 369 addDisabledAcceleratorControl(cbi.hwndItem);370 }371 372 void CMainFrame::removeDisabledAcceleratorComboBox(CComboBox& combo) {373 COMBOBOXINFO cbi;374 cbi.cbSize = sizeof(COMBOBOXINFO);375 combo.GetComboBoxInfo(&cbi);376 377 removeDisabledAcceleratorControl(cbi.hwndItem);378 }379 380 void CMainFrame::removeDisabledAcceleratorControl(HWND hWnd) {381 std::vector<HWND>::iterator i = find(disabledAcceleratorControls.begin(), disabledAcceleratorControls.end(), hWnd);382 if (i == disabledAcceleratorControls.end()) return ;383 disabledAcceleratorControls.erase(i);384 }385 386 bool CMainFrame::isDisabledAcceleratorControl(HWND hWnd) {387 std::vector<HWND>::iterator i = find(disabledAcceleratorControls.begin(), disabledAcceleratorControls.end(), hWnd);388 if (i == disabledAcceleratorControls.end()) return false;389 return true;390 }391 392 348 //! \brief For tracking the ctrl in ctrl-tabbing 393 349 BOOL CMainFrame::PreTranslateMessage(MSG* pMsg) { … … 404 360 } 405 361 406 if (CFrameWindowImpl<CMainFrame>::PreTranslateMessage(pMsg)) 407 return TRUE; 408 409 HWND clientView = frame.focusedClientView(); 410 411 if (isDisabledAcceleratorControl(GetFocus())) return FALSE; 412 413 map<HWND, HACCEL>::iterator itacc = acceleratorHandlers.find(clientView); 414 if (itacc == acceleratorHandlers.end()) return FALSE; 415 if (::TranslateAccelerator(clientView, itacc->second, pMsg)) 416 return TRUE; 417 362 if (::GetWindowLong(pMsg->hwnd, GWL_HINSTANCE) == (DWORD)_Module.m_hInst) 363 if (CFrameWindowImpl<CMainFrame>::PreTranslateMessage(pMsg)) 364 return TRUE; 418 365 return FALSE; 419 366 } … … 584 531 LRESULT CMainFrame::OnShowPreferences(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { 585 532 showPreferencesView(); 586 587 //CPreferencesDialog prefs(this);588 //prefs.DoModal();589 533 return 0; 590 534 } -
trunk/src/buzelib/MainFrm.h
r1326 r1338 142 142 143 143 std::vector<CTimerHandler*> timerHandlers; 144 std::map<HWND, HACCEL> acceleratorHandlers;145 144 146 145 public: … … 191 190 std::vector<std::string> recents; 192 191 193 std::vector<HWND> disabledAcceleratorControls;194 192 CMenu themeMenu; 195 193 CMenu recentMenu; … … 506 504 void removeTimerHandler(CTimerHandler* handler); 507 505 508 void addAccelerator(HWND hWnd, HACCEL accel);509 void removeAccelerator(HWND hWnd);510 void addDisabledAcceleratorControl(HWND hWnd); // dont process accelerators when these controls have focus511 void addDisabledAcceleratorComboBox(CComboBox& combo); // dont process accelerators when these controls have focus512 void removeDisabledAcceleratorControl(HWND hWnd);513 void removeDisabledAcceleratorComboBox(CComboBox& combo); // dont process accelerators when these controls have focus514 bool isDisabledAcceleratorControl(HWND hWnd);515 516 506 CPatternView* showPatternEditor(zzub::pattern* p, zzub::metaplugin* machine); // need to pass zzub_metaplugin_t in case Pattern in null, so we can create one. optimally parameters should be machine, patternindex 517 507 void showMachineParameters(zzub::metaplugin* m); -
trunk/src/buzelib/PropertyListView.cpp
r1322 r1338 39 39 document->addView(this); 40 40 41 mainFrame->addAccelerator(m_hWnd, AtlLoadAccelerators(IDR_PROPERTYVIEW)); 41 hAccel = AtlLoadAccelerators(IDR_PROPERTYVIEW); 42 43 CMessageLoop* messageLoop = _Module.GetMessageLoop(); 44 messageLoop->AddMessageFilter(this); 45 42 46 return DefWindowProc();; 43 47 } 44 48 49 BOOL CPropertyListView::PreTranslateMessage(MSG* pMsg) { 50 if (GetFocus() == *this || GetFocus() == propertyList || GetFocus() == propertyList.m_hwndInplace) 51 if (::TranslateAccelerator(m_hWnd, hAccel, pMsg)) 52 return TRUE; 53 return FALSE; 54 } 55 45 56 LRESULT CPropertyListView::OnClose(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) { 57 CMessageLoop* messageLoop = _Module.GetMessageLoop(); 58 messageLoop->RemoveMessageFilter(this); 59 46 60 document->removeView(this); 47 61 mainFrame->closeClientWindow(const_cast<ClientView*>(mainFrame->get(m_hWnd))); 48 mainFrame->removeAccelerator(m_hWnd); 62 49 63 return 0; 50 64 } -
trunk/src/buzelib/PropertyListView.h
r1300 r1338 12 12 class CPropertyListView 13 13 : public CViewImpl<CMainFrame, CDocument, CPropertyListView> 14 , public CToolbarWindow<CPropertyListView> { 14 , public CToolbarWindow<CPropertyListView> 15 , public CMessageFilter 16 { 15 17 ClientViewListener* clientViewListener; 16 18 public: … … 21 23 CPropertyProvider* provider; 22 24 HWND hReturnView; 25 HACCEL hAccel; 23 26 24 27 DECLARE_WND_CLASS("PropertyListView") … … 51 54 LRESULT OnReturnToView(WORD /*wNotifyCode*/, WORD /*wID*/, HWND /*hWndCtl*/, BOOL& /*bHandled*/); 52 55 void OnUpdate(CView* pSender, LPARAM lHint, LPVOID pHint); 56 virtual BOOL PreTranslateMessage(MSG* pMsg); 53 57 54 58 void updateFromProvider(CPropertyProvider* provider); -
trunk/src/buzelib/SequenceView.cpp
r1331 r1338 101 101 document->addView(this); 102 102 103 hAccel = AtlLoadAccelerators(IDR_SEQUENCER); 104 103 105 CMessageLoop* messageLoop = _Module.GetMessageLoop(); 104 106 messageLoop->AddIdleHandler(this); 107 messageLoop->AddMessageFilter(this); 105 108 106 109 mainFrame->addTabableView(m_hWnd); 107 110 108 mainFrame->addAccelerator(m_hWnd, AtlLoadAccelerators(IDR_SEQUENCER)); 109 mainFrame->addDisabledAcceleratorComboBox(scaleDropDown); 110 mainFrame->addDisabledAcceleratorComboBox(stepDropDown); 111 112 return 0; 111 return 0; 112 } 113 114 115 BOOL CSequenceView::PreTranslateMessage(MSG* pMsg) { 116 if (GetFocus() == *this || GetFocus() == editor || GetFocus() == patternList) 117 if (::TranslateAccelerator(m_hWnd, hAccel, pMsg)) 118 return TRUE; 119 return FALSE; 113 120 } 114 121 … … 117 124 CMessageLoop* messageLoop = _Module.GetMessageLoop(); 118 125 messageLoop->RemoveIdleHandler(this); 126 messageLoop->RemoveMessageFilter(this); 119 127 120 128 document->removeView(this); 121 mainFrame->removeAccelerator(m_hWnd);122 mainFrame->removeDisabledAcceleratorComboBox(scaleDropDown);123 mainFrame->removeDisabledAcceleratorComboBox(stepDropDown);124 129 mainFrame->closeClientWindow(const_cast<ClientView*>(mainFrame->get(m_hWnd))); 125 130 return 0; -
trunk/src/buzelib/SequenceView.h
r1331 r1338 18 18 : public CViewImpl<CMainFrame, CDocument, CSequenceView> 19 19 , public CToolbarWindow<CSequenceView> 20 , public CMessageFilter 20 21 , public CIdleHandler 21 22 { … … 33 34 CStatusBarCtrl statusBar; 34 35 bool editScale; 36 HACCEL hAccel; 35 37 36 38 DECLARE_WND_SUPERCLASS("SequenceView", CToolbarWindow<CSequenceView>::GetWndClassName()) … … 118 120 CSequenceView(CMainFrame* mainFrm, ClientViewListener* cl); 119 121 ~CSequenceView(void); 122 123 virtual BOOL PreTranslateMessage(MSG* pMsg); 120 124 121 125 LRESULT OnDestroy(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); -
trunk/src/buzelib/WaveTableView.cpp
r1335 r1338 377 377 document->addView(this); 378 378 379 hAccel = AtlLoadAccelerators(IDR_WAVETABLE); 380 381 CMessageLoop* pLoop = _Module.GetMessageLoop(); 382 ATLASSERT(pLoop != NULL); 383 pLoop->AddIdleHandler(this); 384 pLoop->AddMessageFilter(this); 385 379 386 mainFrame->addTabableView(m_hWnd); 380 mainFrame->addAccelerator(m_hWnd, AtlLoadAccelerators(IDR_WAVETABLE)); 381 382 return 0; 383 } 387 388 return 0; 389 } 390 391 BOOL CWaveTableView::PreTranslateMessage(MSG* pMsg) { 392 if (GetFocus() == *this || GetFocus() == waveTableList || GetFocus() == waveEntryList || GetFocus() == waveEditorCtrl) 393 if (::TranslateAccelerator(m_hWnd, hAccel, pMsg)) 394 return TRUE; 395 return FALSE; 396 } 397 384 398 385 399 LRESULT CWaveTableView::OnClose(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) { 386 // denne fixet crash når vi lukker hele clienten 400 401 CMessageLoop* pLoop = _Module.GetMessageLoop();
