Changeset 498 in dev for trunk/ab5.0
- Timestamp:
- Apr 22, 2008, 7:13:13 PM (17 years ago)
- Location:
- trunk/ab5.0/abdev/abdev
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/abdev/abdev.cpp
r497 r498 1350 1350 HDROP hDrop; 1351 1351 HGLOBAL hGlobal; 1352 CHARRANGE CharRange;1353 1352 HANDLE hFile; 1354 1353 BOOL bChecked; … … 1374 1373 case WM_COMMAND: 1375 1374 switch(LOWORD(wParam)){ 1376 case IDM_DELETE:1377 hChild=GetWindow(hClient,GW_CHILD);1378 WndNum=GetWndNum(hChild);1379 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType)){1380 hEdit=GetWindow(hChild,GW_CHILD);1381 TextEdit_ReplaceUpdateUndoData(WndNum,"",0,1);1382 }1383 else if(MdiInfo[WndNum].DocType==WNDTYPE_RAD)1384 SendMessage(MdiInfo[WndNum].MdiRadInfo->hRad,WM_COMMAND,IDM_RAD_ITEM_DELETE,0);1385 return 0;1386 case IDM_ALLSELECT:1387 hChild=GetWindow(hClient,GW_CHILD);1388 WndNum=GetWndNum(hChild);1389 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType)){1390 hEdit=GetWindow(hChild,GW_CHILD);1391 1392 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x=0;1393 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y=0;1394 1395 GetCaretPosFromBufferIndex(1396 MdiInfo[WndNum].pMdiTextEdit->buffer,1397 lstrlen(MdiInfo[WndNum].pMdiTextEdit->buffer),1398 &MdiInfo[WndNum].pMdiTextEdit->EndCaretPos);1399 1400 InvalidateRect(hEdit,NULL,0);1401 1402 ResetState_EditMenu();1403 }1404 else if(MdiInfo[WndNum].DocType==WNDTYPE_RAD){1405 i2=GetWndInfoNum(MdiInfo[WndNum].path);1406 for(i3=0;i3<ProjectInfo.pWindowInfo[i2].NumberOfChildWindows;i3++){1407 MdiInfo[WndNum].MdiRadInfo->SelectingItem[i3]=i3;1408 }1409 DrawRadWindow(WndNum,&ProjectInfo.pWindowInfo[i2]);1410 }1411 return 0;1412 case IDM_FIND:1413 DialogBox(hResInst,MAKEINTRESOURCE(IDD_FIND),hOwner,(DLGPROC)DlgFind);1414 return 0;1415 case IDM_PERMUTATION:1416 DialogBox(hResInst,MAKEINTRESOURCE(IDD_PERMUTATION),hOwner,(DLGPROC)DlgPermutation);1417 return 0;1418 1375 1419 1376 -
trunk/ab5.0/abdev/abdev/include/MainFrame.h
r497 r498 105 105 void OnCmdPaste( UINT uNotifyCode, int nID, CWindow wndCtl ); 106 106 107 // 「削除」メニューがクリックされた 108 void OnCmdDelete( UINT uNotifyCode, int nID, CWindow wndCtl ); 109 110 // 「すべて選択」メニューがクリックされた 111 void OnCmdAllSelect( UINT uNotifyCode, int nID, CWindow wndCtl ); 112 113 // 「検索」メニューがクリックされた 114 void OnCmdFind( UINT uNotifyCode, int nID, CWindow wndCtl ); 115 116 // 「置換」メニューがクリックされた 117 void OnCmdPermutation( UINT uNotifyCode, int nID, CWindow wndCtl ); 118 107 119 private: 108 120 // メッセージマップ … … 142 154 COMMAND_ID_HANDLER_EX( IDM_COPY, OnCmdCopy ) 143 155 COMMAND_ID_HANDLER_EX( IDM_PASTE, OnCmdPaste ) 156 COMMAND_ID_HANDLER_EX( IDM_DELETE, OnCmdDelete ) 157 COMMAND_ID_HANDLER_EX( IDM_ALLSELECT, OnCmdAllSelect ) 158 COMMAND_ID_HANDLER_EX( IDM_FIND, OnCmdFind ) 159 COMMAND_ID_HANDLER_EX( IDM_PERMUTATION, OnCmdPermutation ) 144 160 END_MSG_MAP() 145 161 }; -
trunk/ab5.0/abdev/abdev/src/MainFrame.cpp
r497 r498 615 615 } 616 616 } 617 618 void MainFrame::OnCmdDelete( UINT uNotifyCode, int nID, CWindow wndCtl ) 619 { 620 HWND hChild=::GetWindow(hClient,GW_CHILD); 621 int WndNum=GetWndNum(hChild); 622 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType)){ 623 HWND hEdit=::GetWindow(hChild,GW_CHILD); 624 TextEdit_ReplaceUpdateUndoData(WndNum,"",0,1); 625 } 626 else if(MdiInfo[WndNum].DocType==WNDTYPE_RAD) 627 SendMessage(MdiInfo[WndNum].MdiRadInfo->hRad,WM_COMMAND,IDM_RAD_ITEM_DELETE,0); 628 } 629 630 void MainFrame::OnCmdAllSelect( UINT uNotifyCode, int nID, CWindow wndCtl ) 631 { 632 HWND hChild=::GetWindow(hClient,GW_CHILD); 633 int WndNum=GetWndNum(hChild); 634 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum].DocType)){ 635 HWND hEdit=::GetWindow(hChild,GW_CHILD); 636 637 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.x=0; 638 MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y=0; 639 640 GetCaretPosFromBufferIndex( 641 MdiInfo[WndNum].pMdiTextEdit->buffer, 642 lstrlen(MdiInfo[WndNum].pMdiTextEdit->buffer), 643 &MdiInfo[WndNum].pMdiTextEdit->EndCaretPos); 644 645 ::InvalidateRect(hEdit,NULL,0); 646 647 ResetState_EditMenu(); 648 } 649 else if(MdiInfo[WndNum].DocType==WNDTYPE_RAD){ 650 int i2=GetWndInfoNum(MdiInfo[WndNum].path); 651 for(int i3=0;i3<ProjectInfo.pWindowInfo[i2].NumberOfChildWindows;i3++){ 652 MdiInfo[WndNum].MdiRadInfo->SelectingItem[i3]=i3; 653 } 654 DrawRadWindow(WndNum,&ProjectInfo.pWindowInfo[i2]); 655 } 656 } 657 658 void MainFrame::OnCmdFind( UINT uNotifyCode, int nID, CWindow wndCtl ) 659 { 660 DialogBox(hResInst,MAKEINTRESOURCE(IDD_FIND),m_hWnd,(DLGPROC)DlgFind); 661 } 662 663 void MainFrame::OnCmdPermutation( UINT uNotifyCode, int nID, CWindow wndCtl ) 664 { 665 DialogBox(hResInst,MAKEINTRESOURCE(IDD_PERMUTATION),m_hWnd,(DLGPROC)DlgPermutation); 666 }
Note:
See TracChangeset
for help on using the changeset viewer.