Changeset 499 in dev for trunk/ab5.0
- Timestamp:
- Apr 23, 2008, 10:43:37 AM (17 years ago)
- Location:
- trunk/ab5.0/abdev/abdev
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/abdev/abdev.cpp
r498 r499 1343 1343 WNDPROC oldMainFrameWndProc; 1344 1344 LRESULT CALLBACK WindowFunc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 1345 int i,i2, i3,WndNum;1345 int i,i2,WndNum; 1346 1346 char str[MAX_PATH],temporary[1024],temp2[MAX_PATH],temp3[MAX_PATH],*pTemp; 1347 HWND hChild ,hEdit;1347 HWND hChild; 1348 1348 RECT rect; 1349 1349 POINT pos; … … 1351 1351 HGLOBAL hGlobal; 1352 1352 HANDLE hFile; 1353 BOOL bChecked;1354 1353 1355 1354 static COLORREF colorUser=RGB(255,255,255); … … 1373 1372 case WM_COMMAND: 1374 1373 switch(LOWORD(wParam)){ 1375 1376 1377 ///////////////////////1378 // 変換メニュー1379 ///////////////////////1380 case IDM_CONV_ALPHA_SMALL:1381 case IDM_CONV_ALPHA_BIG:1382 case IDM_CONV_HALF:1383 case IDM_CONV_MULTI:1384 case IDM_CONV_KATAKANA:1385 case IDM_CONV_HIRAGANA:1386 case IDM_CONV_SPACE:1387 case IDM_CONV_TAB:1388 #ifdef THETEXT1389 case IDM_CONV_HASRETURN:1390 case IDM_CONV_QUOTE:1391 #else1392 case IDM_CODEFORMAT:1393 #endif1394 TextEdit_Convert(LOWORD(wParam));1395 return 0;1396 1397 #ifdef THETEXT1398 ///////////////////////1399 // ツールメニュー1400 ///////////////////////1401 case IDM_STRING_COUNT:1402 DialogBoxParam(hResInst,MAKEINTRESOURCE(IDD_STRING_COUNT),hOwner,(DLGPROC)DlgStringCount,0);1403 return 0;1404 case IDM_SEL_STRING_COUNT:1405 DialogBoxParam(hResInst,MAKEINTRESOURCE(IDD_STRING_COUNT),hOwner,(DLGPROC)DlgStringCount,1);1406 return 0;1407 #endif //THETEXT1408 1409 case IDM_PROJECTVIEW:1410 if(pobj_nv->bClipProjectView){1411 if(IsWindowVisible(hProjectView)){1412 ShowWindow(hProjectView,SW_HIDE);1413 bChecked=0;1414 }1415 else{1416 ShowWindow(hProjectView,SW_SHOW);1417 bChecked=1;1418 }1419 }1420 else{1421 if(IsWindowVisible(hProjectView_ToolWindow)){1422 ShowWindow(hProjectView_ToolWindow,SW_HIDE);1423 bChecked=0;1424 }1425 else{1426 ShowWindow(hProjectView_ToolWindow,SW_SHOW);1427 ShowWindow(hProjectView,SW_SHOW);1428 bChecked=1;1429 }1430 }1431 pobj_MainMenu->CheckMenu(IDM_PROJECTVIEW,bChecked);1432 1433 //再配置1434 ResizeOwnerWnd();1435 1436 ShowWindow(hClient,SW_SHOW);1437 return 0;1438 case IDM_PROJECT_OPTION:1439 DlgProjectOptionSetting(hwnd);1440 return 0;1441 case IDM_TOPMOST:1442 if(pobj_MainMenu->IsCheck(IDM_TOPMOST)){1443 SetWindowPos(hwnd,HWND_NOTOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);1444 pobj_MainMenu->CheckMenu(IDM_TOPMOST,0);1445 }1446 else{1447 SetWindowPos(hwnd,HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE);1448 pobj_MainMenu->CheckMenu(IDM_TOPMOST,1);1449 }1450 return 0;1451 1452 #ifdef THETEXT1453 case IDM_RIGHT_TURN:1454 pobj_nv->bRightTurn^=1;1455 ResetState_ViewMenu();1456 1457 //トップのウィンドウを再描画1458 RedrawAllWindow();1459 1460 return 0;1461 #endif1462 1463 case IDM_SET:1464 DlgOptionSetting(hwnd);1465 return 0;1466 1374 1467 1375 #ifndef THETEXT -
trunk/ab5.0/abdev/abdev/include/MainFrame.h
r498 r499 116 116 // 「置換」メニューがクリックされた 117 117 void OnCmdPermutation( UINT uNotifyCode, int nID, CWindow wndCtl ); 118 119 // 変換メニューのいずれかがクリックされた 120 void OnCmdConvertX( UINT uNotifyCode, int nID, CWindow wndCtl ); 121 122 // 「文字カウント」メニューがクリックされた 123 void OnCmdStringCount( UINT uNotifyCode, int nID, CWindow wndCtl ); 124 125 // 「選択範囲の文字カウント」メニューがクリックされた 126 void OnCmdSelStringCount( UINT uNotifyCode, int nID, CWindow wndCtl ); 127 128 // 「プロジェクトビュー」メニューがクリックされた 129 void OnCmdProjectView( UINT uNotifyCode, int nID, CWindow wndCtl ); 130 131 // 「プロジェクトオプション」メニューがクリックされた 132 void OnCmdProjectOption( UINT uNotifyCode, int nID, CWindow wndCtl ); 133 134 // 「最前面表示」メニューがクリックされた 135 void OnCmdTopMost( UINT uNotifyCode, int nID, CWindow wndCtl ); 136 137 // 「右端で折り返す」メニューがクリックされた 138 void OnCmdRightTurn( UINT uNotifyCode, int nID, CWindow wndCtl ); 139 140 // 「オプション」メニューがクリックされた 141 void OnCmdSet( UINT uNotifyCode, int nID, CWindow wndCtl ); 118 142 119 143 private: … … 135 159 COMMAND_ID_HANDLER_EX( IDM_OPEN, OnCmdOpen ) 136 160 COMMAND_ID_HANDLER_EX( IDM_CLOSE, OnCmdClose ) 161 #ifndef THETEXT 137 162 COMMAND_ID_HANDLER_EX( IDM_PROJECT_OPEN, OnCmdProjectOpen ) 138 163 COMMAND_ID_HANDLER_EX( IDM_PROJECT_SAVE, OnCmdProjectSave ) 139 164 COMMAND_ID_HANDLER_EX( IDM_PROJECT_CLOSE, OnCmdProjectClose ) 140 165 COMMAND_ID_HANDLER_EX( IDM_PROJECT_FOLDER_OPEN, OnCmdProjectFolderOpen ) 166 #endif 141 167 COMMAND_ID_HANDLER_EX( IDM_SAVE, OnCmdSave ) 142 168 COMMAND_ID_HANDLER_EX( IDM_NEWSAVE, OnCmdNewSave ) … … 158 184 COMMAND_ID_HANDLER_EX( IDM_FIND, OnCmdFind ) 159 185 COMMAND_ID_HANDLER_EX( IDM_PERMUTATION, OnCmdPermutation ) 186 COMMAND_ID_HANDLER_EX( IDM_CONV_ALPHA_SMALL, OnCmdConvertX ) 187 COMMAND_ID_HANDLER_EX( IDM_CONV_ALPHA_BIG, OnCmdConvertX ) 188 COMMAND_ID_HANDLER_EX( IDM_CONV_HALF, OnCmdConvertX ) 189 COMMAND_ID_HANDLER_EX( IDM_CONV_MULTI, OnCmdConvertX ) 190 COMMAND_ID_HANDLER_EX( IDM_CONV_KATAKANA, OnCmdConvertX ) 191 COMMAND_ID_HANDLER_EX( IDM_CONV_HIRAGANA, OnCmdConvertX ) 192 COMMAND_ID_HANDLER_EX( IDM_CONV_SPACE, OnCmdConvertX ) 193 COMMAND_ID_HANDLER_EX( IDM_CONV_TAB, OnCmdConvertX ) 194 #ifdef THETEXT 195 COMMAND_ID_HANDLER_EX( IDM_CONV_HASRETURN, OnCmdConvertX ) 196 COMMAND_ID_HANDLER_EX( IDM_CONV_QUOTE, OnCmdConvertX ) 197 COMMAND_ID_HANDLER_EX( IDM_STRING_COUNT, OnCmdStringCount ) 198 COMMAND_ID_HANDLER_EX( IDM_SEL_STRING_COUNT, OnCmdSelStringCount ) 199 #else 200 COMMAND_ID_HANDLER_EX( IDM_CODEFORMAT, OnCmdConvertX ) 201 #endif 202 COMMAND_ID_HANDLER_EX( IDM_PROJECTVIEW, OnCmdProjectView ) 203 COMMAND_ID_HANDLER_EX( IDM_PROJECT_OPTION, OnCmdProjectOption ) 204 COMMAND_ID_HANDLER_EX( IDM_TOPMOST, OnCmdTopMost ) 205 #ifdef THETEXT 206 COMMAND_ID_HANDLER_EX( IDM_RIGHT_TURN, OnCmdRightTurn ) 207 #endif 208 COMMAND_ID_HANDLER_EX( IDM_SET, OnCmdSet ) 160 209 END_MSG_MAP() 161 210 }; -
trunk/ab5.0/abdev/abdev/src/MainFrame.cpp
r498 r499 665 665 DialogBox(hResInst,MAKEINTRESOURCE(IDD_PERMUTATION),m_hWnd,(DLGPROC)DlgPermutation); 666 666 } 667 668 void MainFrame::OnCmdConvertX( UINT uNotifyCode, int nID, CWindow wndCtl ) 669 { 670 TextEdit_Convert( nID ); 671 } 672 673 #ifdef THETEXT 674 void MainFrame::OnCmdStringCount( UINT uNotifyCode, int nID, CWindow wndCtl ) 675 { 676 DialogBoxParam(hResInst,MAKEINTRESOURCE(IDD_STRING_COUNT),m_hWnd,(DLGPROC)DlgStringCount,0); 677 } 678 679 void MainFrame::OnCmdSelStringCount( UINT uNotifyCode, int nID, CWindow wndCtl ) 680 { 681 DialogBoxParam(hResInst,MAKEINTRESOURCE(IDD_STRING_COUNT),m_hWnd,(DLGPROC)DlgStringCount,1); 682 } 683 #endif 684 685 void MainFrame::OnCmdProjectView( UINT uNotifyCode, int nID, CWindow wndCtl ) 686 { 687 extern HWND hProjectView; 688 bool isCheck = false; 689 if(pobj_nv->bClipProjectView){ 690 if(::IsWindowVisible(hProjectView)){ 691 ::ShowWindow(hProjectView,SW_HIDE); 692 } 693 else{ 694 ::ShowWindow(hProjectView,SW_SHOW); 695 isCheck = true; 696 } 697 } 698 else{ 699 extern HWND hProjectView_ToolWindow; 700 if(::IsWindowVisible(hProjectView_ToolWindow)){ 701 ::ShowWindow(hProjectView_ToolWindow,SW_HIDE); 702 } 703 else{ 704 ::ShowWindow(hProjectView_ToolWindow,SW_SHOW); 705 ::ShowWindow(hProjectView,SW_SHOW); 706 isCheck = true; 707 } 708 } 709 pobj_MainMenu->CheckMenu(IDM_PROJECTVIEW,isCheck); 710 711 //再配置 712 ResizeOwnerWnd(); 713 714 ::ShowWindow(hClient,SW_SHOW); 715 } 716 717 void MainFrame::OnCmdProjectOption( UINT uNotifyCode, int nID, CWindow wndCtl ) 718 { 719 DlgProjectOptionSetting( m_hWnd ); 720 } 721 722 void MainFrame::OnCmdTopMost( UINT uNotifyCode, int nID, CWindow wndCtl ) 723 { 724 if(pobj_MainMenu->IsCheck(IDM_TOPMOST)){ 725 SetWindowPos( HWND_NOTOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE); 726 pobj_MainMenu->CheckMenu(IDM_TOPMOST,0); 727 } 728 else{ 729 SetWindowPos( HWND_TOPMOST,0,0,0,0,SWP_NOMOVE|SWP_NOSIZE); 730 pobj_MainMenu->CheckMenu(IDM_TOPMOST,1); 731 } 732 } 733 734 void ResetState_ViewMenu(void); 735 void MainFrame::OnCmdRightTurn( UINT uNotifyCode, int nID, CWindow wndCtl ) 736 { 737 pobj_nv->bRightTurn^=1; 738 ResetState_ViewMenu(); 739 740 //トップのウィンドウを再描画 741 RedrawAllWindow(); 742 } 743 744 void MainFrame::OnCmdSet( UINT uNotifyCode, int nID, CWindow wndCtl ) 745 { 746 DlgOptionSetting( m_hWnd ); 747 } -
trunk/ab5.0/abdev/abdev/stdafx.h
r493 r499 38 38 #include <abdev/ab_common/Environment.h> 39 39 40 #ifdef THETEXT 41 #include "../res_TheText/resource.h" 42 #else 40 43 #include "../res/resource.h" 44 #endif 41 45 42 46 #include <WindowComponents/BaseWindow.h>
Note:
See TracChangeset
for help on using the changeset viewer.