Changeset 84 in dev for ProjectEditor/ProjectControl.cpp
- Timestamp:
- Mar 29, 2007, 3:28:28 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ProjectEditor/ProjectControl.cpp
r81 r84 398 398 return DefWindowProc(hwnd,message,wParam,lParam); 399 399 } 400 void ShowFileView(){ 401 TabCtrl_SetCurSel(hProjectViewTab,0); 402 ShowWindow(pobj_FileTree->hTree,SW_SHOW); 403 ShowWindow(hProcedureTreeView,SW_HIDE); 404 ShowWindow(hMaterialTreeView,SW_HIDE); 405 } 406 void ShowClassView(){ 407 TabCtrl_SetCurSel(hProjectViewTab,1); 408 ShowWindow(pobj_FileTree->hTree,SW_HIDE); 409 ShowWindow(hMaterialTreeView,SW_HIDE); 410 ShowWindow(hProcedureTreeView,SW_SHOW); 411 } 412 void ShowMaterialView(){ 413 TabCtrl_SetCurSel(hProjectViewTab,2); 414 ShowWindow(pobj_FileTree->hTree,SW_HIDE); 415 ShowWindow(hProcedureTreeView,SW_HIDE); 416 ShowWindow(hMaterialTreeView,SW_SHOW); 417 } 400 418 LRESULT CALLBACK ProjectViewProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ 401 419 extern HINSTANCE hInst,hResInst; … … 404 422 extern HFONT hStatusFont; 405 423 extern HWND hProjectView_ToolWindow; 406 int i;407 424 RECT rect; 408 425 HWND hButton; … … 510 527 hdr=(NMHDR *)lParam; 511 528 if(hdr->hwndFrom==hProjectViewTab&&hdr->code==TCN_SELCHANGE){ 512 i=TabCtrl_GetCurSel(hProjectViewTab); 513 if(i==0){ 514 ShowWindow(pobj_FileTree->hTree,SW_SHOW); 515 ShowWindow(hProcedureTreeView,SW_HIDE); 516 ShowWindow(hMaterialTreeView,SW_HIDE); 517 } 518 else if(i==1){ 519 ShowWindow(pobj_FileTree->hTree,SW_HIDE); 520 ShowWindow(hMaterialTreeView,SW_HIDE); 521 ShowWindow(hProcedureTreeView,SW_SHOW); 522 } 523 else if(i==2){ 524 ShowWindow(pobj_FileTree->hTree,SW_HIDE); 525 ShowWindow(hProcedureTreeView,SW_HIDE); 526 ShowWindow(hMaterialTreeView,SW_SHOW); 529 switch( TabCtrl_GetCurSel(hProjectViewTab) ){ 530 case 0: 531 ShowFileView(); 532 break; 533 case 1: 534 ShowClassView(); 535 break; 536 case 2: 537 ShowMaterialView(); 538 break; 527 539 } 528 540 } … … 1601 1613 } 1602 1614 sscanf(temporary,"%d",&i2); 1603 TabCtrl_SetCurSel(hProjectViewTab,i2); 1604 if(i2==0){ 1605 ShowWindow(pobj_FileTree->hTree,SW_SHOW); 1606 ShowWindow(hProcedureTreeView,SW_HIDE); 1607 ShowWindow(hMaterialTreeView,SW_HIDE); 1608 } 1609 else if(i2==1){ 1610 ShowWindow(pobj_FileTree->hTree,SW_HIDE); 1611 ShowWindow(hMaterialTreeView,SW_HIDE); 1612 ShowWindow(hProcedureTreeView,SW_SHOW); 1613 } 1614 else if(i2==2){ 1615 ShowWindow(pobj_FileTree->hTree,SW_HIDE); 1616 ShowWindow(hProcedureTreeView,SW_HIDE); 1617 ShowWindow(hMaterialTreeView,SW_SHOW); 1618 } 1615 1616 switch( i2 ){ 1617 case 0: 1618 ShowFileView(); 1619 break; 1620 case 1: 1621 ShowClassView(); 1622 break; 1623 case 2: 1624 ShowMaterialView(); 1625 break; 1626 } 1627 1619 1628 if(buffer[i]=='\0') goto EndToSetWorkFile; 1620 1629 … … 1726 1735 } 1727 1736 sscanf(temporary,"%d",&i2); 1728 TabCtrl_SetCurSel(hProjectViewTab,i2); 1729 if(i2==0){ 1730 ShowWindow(hProcedureTreeView,SW_HIDE); 1731 ShowWindow(hMaterialTreeView,SW_HIDE); 1732 ShowWindow(pobj_FileTree->hTree,SW_SHOW); 1733 } 1734 else if(i2==1){ 1735 ShowWindow(pobj_FileTree->hTree,SW_HIDE); 1736 ShowWindow(hMaterialTreeView,SW_HIDE); 1737 ShowWindow(hProcedureTreeView,SW_SHOW); 1738 } 1739 else if(i2==2){ 1740 ShowWindow(pobj_FileTree->hTree,SW_HIDE); 1741 ShowWindow(hProcedureTreeView,SW_HIDE); 1742 ShowWindow(hMaterialTreeView,SW_SHOW); 1743 } 1737 1738 switch( i2 ){ 1739 case 0: 1740 ShowFileView(); 1741 break; 1742 case 1: 1743 ShowClassView(); 1744 break; 1745 case 2: 1746 ShowMaterialView(); 1747 break; 1748 } 1749 1744 1750 if(buffer[i]=='\0') goto EndToSetWorkFile; 1745 1751
Note:
See TracChangeset
for help on using the changeset viewer.