- Timestamp:
- Jun 2, 2008, 11:50:24 PM (16 years ago)
- Location:
- trunk/ab5.0/abdev
- Files:
-
- 61 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/abdev/Backup.cpp
r626 r629 49 49 50 50 for(i=0;i<MdiInfo.size();i++){ 51 if(MdiInfo[i] .hwnd){51 if(MdiInfo[i]->hwnd){ 52 52 int WndNum; 53 53 WndNum=i; 54 54 55 if(!IS_DOCUMENT_TEXT(MdiInfo[WndNum] .DocType)) continue;55 if(!IS_DOCUMENT_TEXT(MdiInfo[WndNum]->DocType)) continue; 56 56 57 57 //ファイルを保存 58 58 sprintf(temporary,"%sdocument%02d.txt",szBackupDirPath,iNum); 59 WriteBuffer(temporary,MdiInfo[WndNum] .pMdiTextEdit->buffer,lstrlen(MdiInfo[WndNum].pMdiTextEdit->buffer), false);59 WriteBuffer(temporary,MdiInfo[WndNum]->pMdiTextEdit->buffer,lstrlen(MdiInfo[WndNum]->pMdiTextEdit->buffer), false); 60 60 61 61 //情報を追加 62 sprintf(temp2+lstrlen(temp2),"%s\r\n",MdiInfo[WndNum] .path.c_str());62 sprintf(temp2+lstrlen(temp2),"%s\r\n",MdiInfo[WndNum]->path.c_str()); 63 63 64 64 iNum++; … … 107 107 108 108 char szOldTitle[MAX_PATH]; 109 lstrcpy(szOldTitle,MdiInfo[WndNum] .title.c_str());109 lstrcpy(szOldTitle,MdiInfo[WndNum]->title.c_str()); 110 110 111 111 //ドキュメント セレクト コンボボックスから消去 112 112 extern HWND hDocCombo; 113 i2=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[WndNum] .title.c_str());113 i2=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[WndNum]->title.c_str()); 114 114 SendMessage(hDocCombo,CB_DELETESTRING,i2,0); 115 115 116 116 //パスを変更 117 MdiInfo[WndNum] .path = szBeforeFilePath;117 MdiInfo[WndNum]->path = szBeforeFilePath; 118 118 119 119 //ドキュメント セレクト コンボボックスに挿入 … … 129 129 } 130 130 DuplicateTitleCheck(str); 131 MdiInfo[WndNum] .title = str;132 SendMessage(hDocCombo,CB_ADDSTRING,0,(long)MdiInfo[WndNum] .title.c_str());133 i2=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[WndNum] .title.c_str());131 MdiInfo[WndNum]->title = str; 132 SendMessage(hDocCombo,CB_ADDSTRING,0,(long)MdiInfo[WndNum]->title.c_str()); 133 i2=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[WndNum]->title.c_str()); 134 134 SendMessage(hDocCombo,CB_SETCURSEL,i2,0); 135 135 136 136 //MDIウィンドウのタイトルを再設定 137 SetWindowText(hChild,MdiInfo[WndNum] .title.c_str());137 SetWindowText(hChild,MdiInfo[WndNum]->title.c_str()); 138 138 139 139 //タブコントロールを再設定 140 140 COLORREF TabColor; 141 TabColor=pobj_nv->pobj_ExtLink->GetTabColorFromFilePath(MdiInfo[WndNum] .path);141 TabColor=pobj_nv->pobj_ExtLink->GetTabColorFromFilePath(MdiInfo[WndNum]->path); 142 142 pobj_MainTab->DeleteItem( szOldTitle, false ); 143 pobj_MainTab->InsertItem( MdiInfo[WndNum] .title.c_str(), false, TabColor );144 145 MdiInfo[WndNum] .pMdiTextEdit->Modify();143 pobj_MainTab->InsertItem( MdiInfo[WndNum]->title.c_str(), false, TabColor ); 144 145 MdiInfo[WndNum]->pMdiTextEdit->Modify(); 146 146 147 147 -
trunk/ab5.0/abdev/abdev/Caret.cpp
r625 r629 124 124 125 125 pCharRange->cpMin=GetBufferIndexFromCaretPos( 126 MdiInfo[WndNum] .pMdiTextEdit->buffer,127 MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos.x,128 MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos.y);129 130 if(MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos.x==MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.x&&131 MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos.y==MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.y){126 MdiInfo[WndNum]->pMdiTextEdit->buffer, 127 MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.x, 128 MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.y); 129 130 if(MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.x==MdiInfo[WndNum]->pMdiTextEdit->EndCaretPos.x&& 131 MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.y==MdiInfo[WndNum]->pMdiTextEdit->EndCaretPos.y){ 132 132 //選択されていないとき 133 133 pCharRange->cpMax=pCharRange->cpMin; … … 135 135 else{ 136 136 pCharRange->cpMax=GetBufferIndexFromCaretPos( 137 MdiInfo[WndNum] .pMdiTextEdit->buffer,138 MdiInfo[WndNum] .pMdiTextEdit->EndCaretPos.x,139 MdiInfo[WndNum] .pMdiTextEdit->EndCaretPos.y);137 MdiInfo[WndNum]->pMdiTextEdit->buffer, 138 MdiInfo[WndNum]->pMdiTextEdit->EndCaretPos.x, 139 MdiInfo[WndNum]->pMdiTextEdit->EndCaretPos.y); 140 140 } 141 141 … … 150 150 151 151 memcpy(buffer, 152 MdiInfo[WndNum] .pMdiTextEdit->buffer+pCharRange->cpMin,152 MdiInfo[WndNum]->pMdiTextEdit->buffer+pCharRange->cpMin, 153 153 pCharRange->cpMax-pCharRange->cpMin); 154 154 buffer[pCharRange->cpMax-pCharRange->cpMin]=0; … … 158 158 159 159 HWND hEdit; 160 hEdit=MdiInfo[WndNum] .pMdiTextEdit->hEdit;160 hEdit=MdiInfo[WndNum]->pMdiTextEdit->hEdit; 161 161 162 162 //垂直スクロールバーの位置 … … 175 175 176 176 HWND hEdit; 177 hEdit=GetWindow(MdiInfo[WndNum] .hwnd,GW_CHILD);177 hEdit=GetWindow(MdiInfo[WndNum]->hwnd,GW_CHILD); 178 178 179 179 //垂直スクロールバーの位置 … … 192 192 193 193 GetCaretPosFromBufferIndex( 194 MdiInfo[WndNum] .pMdiTextEdit->buffer,194 MdiInfo[WndNum]->pMdiTextEdit->buffer, 195 195 StartIndex, 196 &MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos);196 &MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos); 197 197 198 198 GetCaretPosFromBufferIndex( 199 MdiInfo[WndNum] .pMdiTextEdit->buffer,199 MdiInfo[WndNum]->pMdiTextEdit->buffer, 200 200 EndIndex, 201 &MdiInfo[WndNum] .pMdiTextEdit->EndCaretPos);201 &MdiInfo[WndNum]->pMdiTextEdit->EndCaretPos); 202 202 203 203 HWND hEdit; 204 hEdit=GetWindow(MdiInfo[WndNum] .hwnd,GW_CHILD);204 hEdit=GetWindow(MdiInfo[WndNum]->hwnd,GW_CHILD); 205 205 206 206 if(!TextEdit_ScrollCaret(WndNum,0,bShowCenter)) … … 218 218 int iStartPos; 219 219 iStartPos=code_pos; 220 while(MdiInfo[WndNum] .pMdiTextEdit->buffer[iStartPos]!='\n'&&iStartPos>0) iStartPos--;221 if(MdiInfo[WndNum] .pMdiTextEdit->buffer[iStartPos]=='\n') iStartPos++;220 while(MdiInfo[WndNum]->pMdiTextEdit->buffer[iStartPos]!='\n'&&iStartPos>0) iStartPos--; 221 if(MdiInfo[WndNum]->pMdiTextEdit->buffer[iStartPos]=='\n') iStartPos++; 222 222 223 223 int iEndPos; 224 224 iEndPos=code_pos; 225 while(MdiInfo[WndNum] .pMdiTextEdit->buffer[iEndPos]!='\r'&&MdiInfo[WndNum].pMdiTextEdit->buffer[iEndPos]!='\0') iEndPos++;225 while(MdiInfo[WndNum]->pMdiTextEdit->buffer[iEndPos]!='\r'&&MdiInfo[WndNum]->pMdiTextEdit->buffer[iEndPos]!='\0') iEndPos++; 226 226 227 227 TextEdit_SetSel(WndNum,iStartPos,iEndPos,bShowCenter); … … 234 234 GetCaretPos(&OldPos); 235 235 236 x=MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos.x;237 y=MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos.y;236 x=MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.x; 237 y=MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.y; 238 238 GetScrollBaseCaretPos(WndNum,&x,&y); 239 239 240 240 //エディタ画面左端のコントロールタブ 241 241 int iControlTabSpace; 242 iControlTabSpace=MdiInfo[WndNum] .pMdiTextEdit->iWidth_ControlTabSpace;242 iControlTabSpace=MdiInfo[WndNum]->pMdiTextEdit->iWidth_ControlTabSpace; 243 243 244 244 //コントロールタブ上にカーソルがきたときに、非表示にする 245 if(OldPos.x>=iControlTabSpace&&x<0) HideCaret(MdiInfo[WndNum] .pMdiTextEdit->hEdit);246 else if(OldPos.x<iControlTabSpace&&x>=0) ShowCaret(MdiInfo[WndNum] .pMdiTextEdit->hEdit);245 if(OldPos.x>=iControlTabSpace&&x<0) HideCaret(MdiInfo[WndNum]->pMdiTextEdit->hEdit); 246 else if(OldPos.x<iControlTabSpace&&x>=0) ShowCaret(MdiInfo[WndNum]->pMdiTextEdit->hEdit); 247 247 248 248 SetCaretPos( … … 256 256 // Web検索文字列 257 257 ////////////////////////////////////////////// 258 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum] .DocType)){258 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum]->DocType)){ 259 259 int start,end; 260 if(MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos.x==MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.x&&261 MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos.y==MdiInfo[WndNum].pMdiTextEdit->EndCaretPos.y){260 if(MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.x==MdiInfo[WndNum]->pMdiTextEdit->EndCaretPos.x&& 261 MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.y==MdiInfo[WndNum]->pMdiTextEdit->EndCaretPos.y){ 262 262 //文字列を選択中でないとき 263 263 264 264 int sw=0; 265 265 if(bInputAndReset){ 266 if(MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos.x>1){267 MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos.x-=2;266 if(MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.x>1){ 267 MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.x-=2; 268 268 sw=1; 269 269 } … … 271 271 272 272 TextEdit_GetWordCaret( 273 MdiInfo[WndNum] .pMdiTextEdit->hEdit,273 MdiInfo[WndNum]->pMdiTextEdit->hEdit, 274 274 WndNum, 275 &MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos,275 &MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos, 276 276 &start,&end, 277 277 WORDCARET_BEFORE); 278 278 279 if(sw) MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos.x+=2;279 if(sw) MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.x+=2; 280 280 281 281 //半角文字列を選択時の全角とのズレを修正 282 282 POINT pos; 283 GetCaretPosFromBufferIndex(MdiInfo[WndNum] .pMdiTextEdit->buffer,start,&pos);284 start=GetBufferIndexFromCaretPos(MdiInfo[WndNum] .pMdiTextEdit->buffer,pos.x,pos.y);285 GetCaretPosFromBufferIndex(MdiInfo[WndNum] .pMdiTextEdit->buffer,end,&pos);286 end=GetBufferIndexFromCaretPos(MdiInfo[WndNum] .pMdiTextEdit->buffer,pos.x,pos.y);283 GetCaretPosFromBufferIndex(MdiInfo[WndNum]->pMdiTextEdit->buffer,start,&pos); 284 start=GetBufferIndexFromCaretPos(MdiInfo[WndNum]->pMdiTextEdit->buffer,pos.x,pos.y); 285 GetCaretPosFromBufferIndex(MdiInfo[WndNum]->pMdiTextEdit->buffer,end,&pos); 286 end=GetBufferIndexFromCaretPos(MdiInfo[WndNum]->pMdiTextEdit->buffer,pos.x,pos.y); 287 287 } 288 288 else{ 289 289 //文字列を選択中のとき 290 290 start=GetBufferIndexFromCaretPos( 291 MdiInfo[WndNum] .pMdiTextEdit->buffer,292 MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos.x,293 MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos.y);291 MdiInfo[WndNum]->pMdiTextEdit->buffer, 292 MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.x, 293 MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.y); 294 294 end=GetBufferIndexFromCaretPos( 295 MdiInfo[WndNum] .pMdiTextEdit->buffer,296 MdiInfo[WndNum] .pMdiTextEdit->EndCaretPos.x,297 MdiInfo[WndNum] .pMdiTextEdit->EndCaretPos.y);295 MdiInfo[WndNum]->pMdiTextEdit->buffer, 296 MdiInfo[WndNum]->pMdiTextEdit->EndCaretPos.x, 297 MdiInfo[WndNum]->pMdiTextEdit->EndCaretPos.y); 298 298 } 299 299 … … 310 310 if(length<0) length=0; 311 311 pTemp=(char *)HeapAlloc(hHeap,0,length+1024); 312 memcpy(pTemp,MdiInfo[WndNum] .pMdiTextEdit->buffer+start,length);312 memcpy(pTemp,MdiInfo[WndNum]->pMdiTextEdit->buffer+start,length); 313 313 pTemp[length]=0; 314 314 … … 340 340 extern METHODCHECKINFO MethodCheckInfo; 341 341 if(MethodCheckInfo.hWnd){ 342 if(MdiInfo[WndNum] .DocType==WNDTYPE_BASIC)342 if(MdiInfo[WndNum]->DocType==WNDTYPE_BASIC) 343 343 ShowParameterHint(WndNum); 344 344 } … … 354 354 char *pTemp,temporary[VN_SIZE]; 355 355 356 i=GetBufferIndexFromCaretPos(MdiInfo[WndNum] .pMdiTextEdit->buffer,357 MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos.x,358 MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos.y);356 i=GetBufferIndexFromCaretPos(MdiInfo[WndNum]->pMdiTextEdit->buffer, 357 MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.x, 358 MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.y); 359 359 360 360 if(i<ComplementWndInfo.iPos||ComplementWndInfo.iPos+ComplementWndInfo.iLength<i){ … … 379 379 pTemp=(char *)HeapAlloc(hHeap,0,ComplementWndInfo.iLength+1); 380 380 memcpy(pTemp, 381 MdiInfo[WndNum] .pMdiTextEdit->buffer+ComplementWndInfo.iPos,381 MdiInfo[WndNum]->pMdiTextEdit->buffer+ComplementWndInfo.iPos, 382 382 ComplementWndInfo.iLength); 383 383 pTemp[ComplementWndInfo.iLength]=0; … … 432 432 pTemp=(char *)HeapAlloc(hHeap,0,ComplementWndInfo.iLength+1); 433 433 memcpy(pTemp, 434 MdiInfo[WndNum] .pMdiTextEdit->buffer+ComplementWndInfo.iPos,434 MdiInfo[WndNum]->pMdiTextEdit->buffer+ComplementWndInfo.iPos, 435 435 ComplementWndInfo.iLength); 436 436 pTemp[ComplementWndInfo.iLength]=0; … … 462 462 463 463 HWND hEdit; 464 hEdit=MdiInfo[WndNum] .pMdiTextEdit->hEdit;465 466 x=MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos.x;467 y=MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos.y;464 hEdit=MdiInfo[WndNum]->pMdiTextEdit->hEdit; 465 466 x=MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.x; 467 y=MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.y; 468 468 GetScrollBaseCaretPos(WndNum,&x,&y); 469 469 … … 537 537 if(loose_y<0) loose_y=0; 538 538 539 pBuf=MdiInfo[WndNum] .pMdiTextEdit->buffer;539 pBuf=MdiInfo[WndNum]->pMdiTextEdit->buffer; 540 540 541 541 // 行の確認 … … 659 659 660 660 POINT *pCaretPos; 661 pCaretPos=&MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos;661 pCaretPos=&MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos; 662 662 663 663 if(pCaretPos->x==0&&pCaretPos->y==0){ … … 666 666 } 667 667 668 pBuf=MdiInfo[WndNum] .pMdiTextEdit->buffer;668 pBuf=MdiInfo[WndNum]->pMdiTextEdit->buffer; 669 669 670 670 i=GetBufferIndexFromCaretPos(pBuf, … … 711 711 char *pBuf; 712 712 713 pBuf=MdiInfo[WndNum] .pMdiTextEdit->buffer;713 pBuf=MdiInfo[WndNum]->pMdiTextEdit->buffer; 714 714 715 715 i=GetBufferIndexFromCaretPos(pBuf, … … 768 768 769 769 //上下のキャレット移動時には、左右方向の位置を保持する 770 if(MdiInfo[WndNum] .pMdiTextEdit->Temp_UpDown_CaretXPos==-1)771 MdiInfo[WndNum] .pMdiTextEdit->Temp_UpDown_CaretXPos=pCaretPos->x;770 if(MdiInfo[WndNum]->pMdiTextEdit->Temp_UpDown_CaretXPos==-1) 771 MdiInfo[WndNum]->pMdiTextEdit->Temp_UpDown_CaretXPos=pCaretPos->x; 772 772 773 773 pCaretPos->y--; 774 774 775 775 CaretPos_LooseToNatural(WndNum, 776 MdiInfo[WndNum] .pMdiTextEdit->Temp_UpDown_CaretXPos,776 MdiInfo[WndNum]->pMdiTextEdit->Temp_UpDown_CaretXPos, 777 777 pCaretPos->y, 778 778 pCaretPos); … … 784 784 785 785 //上下のキャレット移動時には、左右方向の位置を保持する 786 if(MdiInfo[WndNum] .pMdiTextEdit->Temp_UpDown_CaretXPos==-1)787 MdiInfo[WndNum] .pMdiTextEdit->Temp_UpDown_CaretXPos=pCaretPos->x;786 if(MdiInfo[WndNum]->pMdiTextEdit->Temp_UpDown_CaretXPos==-1) 787 MdiInfo[WndNum]->pMdiTextEdit->Temp_UpDown_CaretXPos=pCaretPos->x; 788 788 789 789 pCaretPos->y++; 790 790 791 791 CaretPos_LooseToNatural(WndNum, 792 MdiInfo[WndNum] .pMdiTextEdit->Temp_UpDown_CaretXPos,792 MdiInfo[WndNum]->pMdiTextEdit->Temp_UpDown_CaretXPos, 793 793 pCaretPos->y, 794 794 pCaretPos); … … 805 805 806 806 //上下のキャレット移動時には、左右方向の位置を保持する 807 if(MdiInfo[WndNum] .pMdiTextEdit->Temp_UpDown_CaretXPos==-1)808 MdiInfo[WndNum] .pMdiTextEdit->Temp_UpDown_CaretXPos=pCaretPos->x;807 if(MdiInfo[WndNum]->pMdiTextEdit->Temp_UpDown_CaretXPos==-1) 808 MdiInfo[WndNum]->pMdiTextEdit->Temp_UpDown_CaretXPos=pCaretPos->x; 809 809 810 810 SCROLLINFO si; 811 811 si.cbSize=sizeof(SCROLLINFO); 812 812 si.fMask=SIF_PAGE; 813 GetScrollInfo(MdiInfo[WndNum] .pMdiTextEdit->hEdit,SB_VERT,&si);813 GetScrollInfo(MdiInfo[WndNum]->pMdiTextEdit->hEdit,SB_VERT,&si); 814 814 pCaretPos->y-=si.nPage; 815 815 if(pCaretPos->y<0) pCaretPos->y=0; 816 816 817 817 CaretPos_LooseToNatural(WndNum, 818 MdiInfo[WndNum] .pMdiTextEdit->Temp_UpDown_CaretXPos,818 MdiInfo[WndNum]->pMdiTextEdit->Temp_UpDown_CaretXPos, 819 819 pCaretPos->y, 820 820 pCaretPos); … … 826 826 827 827 //上下のキャレット移動時には、左右方向の位置を保持する 828 if(MdiInfo[WndNum] .pMdiTextEdit->Temp_UpDown_CaretXPos==-1)829 MdiInfo[WndNum] .pMdiTextEdit->Temp_UpDown_CaretXPos=pCaretPos->x;828 if(MdiInfo[WndNum]->pMdiTextEdit->Temp_UpDown_CaretXPos==-1) 829 MdiInfo[WndNum]->pMdiTextEdit->Temp_UpDown_CaretXPos=pCaretPos->x; 830 830 831 831 SCROLLINFO si; 832 832 si.cbSize=sizeof(SCROLLINFO); 833 833 si.fMask=SIF_PAGE; 834 GetScrollInfo(MdiInfo[WndNum] .pMdiTextEdit->hEdit,SB_VERT,&si);834 GetScrollInfo(MdiInfo[WndNum]->pMdiTextEdit->hEdit,SB_VERT,&si); 835 835 pCaretPos->y+=si.nPage; 836 836 837 837 CaretPos_LooseToNatural(WndNum, 838 MdiInfo[WndNum] .pMdiTextEdit->Temp_UpDown_CaretXPos,838 MdiInfo[WndNum]->pMdiTextEdit->Temp_UpDown_CaretXPos, 839 839 pCaretPos->y, 840 840 pCaretPos); -
trunk/ab5.0/abdev/abdev/ChildWndOnRebar.cpp
r626 r629 48 48 SendMessage(hwnd,CB_GETLBTEXT,SendMessage(hwnd,CB_GETCURSEL,0,0),(long)str); 49 49 for(i=0;i<MdiInfo.size();i++){ 50 if(lstrcmpi(str,MdiInfo[i] .title.c_str())==0) break;50 if(lstrcmpi(str,MdiInfo[i]->title.c_str())==0) break; 51 51 } 52 BringWindowToTop(MdiInfo[i] .hwnd);52 BringWindowToTop(MdiInfo[i]->hwnd); 53 53 } 54 54 break; … … 199 199 if(IsWindow(hTempWnd)){ 200 200 for(i=0,i2=0;i<MdiInfo.size();i++){ 201 if(MdiInfo[i] .hwnd){202 GetWindowText(MdiInfo[i] .hwnd,buffer,MAX_PATH);203 if(MdiInfo[i] .hwnd==hTempWnd) i2=SendMessage(hDocCombo,CB_ADDSTRING,0,(long)buffer);201 if(MdiInfo[i]->hwnd){ 202 GetWindowText(MdiInfo[i]->hwnd,buffer,MAX_PATH); 203 if(MdiInfo[i]->hwnd==hTempWnd) i2=SendMessage(hDocCombo,CB_ADDSTRING,0,(long)buffer); 204 204 else SendMessage(hDocCombo,CB_ADDSTRING,0,(long)buffer); 205 205 } -
trunk/ab5.0/abdev/abdev/ClassTree.cpp
r625 r629 450 450 if( WndNum != -1 ) 451 451 { 452 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum] .DocType)){453 if(lstrcmpi(MdiInfo[WndNum] .path.c_str(),lpszFilePath)==0) break;452 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum]->DocType)){ 453 if(lstrcmpi(MdiInfo[WndNum]->path.c_str(),lpszFilePath)==0) break; 454 454 } 455 455 hChild=GetNextWindow(hChild,GW_HWNDNEXT); … … 460 460 if(hChild){ 461 461 //すでに指定されたファイルが開かれている場合 462 pBuf=MdiInfo[WndNum] .pMdiTextEdit->buffer;462 pBuf=MdiInfo[WndNum]->pMdiTextEdit->buffer; 463 463 } 464 464 else{ … … 579 579 HWND hChild=GetWindow(hClient,GW_CHILD); 580 580 int WndNum=GetWndNum(hChild); 581 char *pBuf=MdiInfo[WndNum] .pMdiTextEdit->buffer;581 char *pBuf=MdiInfo[WndNum]->pMdiTextEdit->buffer; 582 582 SetClassTreeFromOneFile_Buf( pBuf, -1 ); 583 583 -
trunk/ab5.0/abdev/abdev/CodeFormatter.cpp
r475 r629 12 12 WndNum=GetNowWndNum(); 13 13 14 if(MdiInfo[WndNum] .DocType!=WNDTYPE_BASIC){14 if(MdiInfo[WndNum]->DocType!=WNDTYPE_BASIC){ 15 15 goto NonFormater; 16 16 } … … 38 38 39 39 char *pBuf; 40 pBuf=MdiInfo[WndNum] .pMdiTextEdit->buffer;40 pBuf=MdiInfo[WndNum]->pMdiTextEdit->buffer; 41 41 42 42 //カーソルバッファ位置を取得 43 43 int i,i2; 44 44 i=GetBufferIndexFromCaretPos(pBuf, 45 MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos.x,46 MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos.y);47 int StartX=MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos.x;45 MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.x, 46 MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.y); 47 int StartX=MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.x; 48 48 49 49 //現在の行のインデントをコピー(iFirstIndent_Speciallyにタブ数を格納) … … 83 83 } 84 84 85 if(MdiInfo[WndNum] .DocType==WNDTYPE_BASIC){85 if(MdiInfo[WndNum]->DocType==WNDTYPE_BASIC){ 86 86 //インデント追加のコマンドかどうかを判断 87 87 if(IsIndentAdditionCommand_FromBuffer(pBuf+i+iIndent)) iIndent++; -
trunk/ab5.0/abdev/abdev/Common.h
r626 r629 366 366 char *IndentStr; 367 367 }; 368 extern std::vector<MDIINFO > MdiInfo;368 extern std::vector<MDIINFO *> MdiInfo; 369 369 370 370 //RADツールのマウスドラッグ … … 618 618 void CloseDocWindow(int WndNum); 619 619 void ResizeTextEditWnd(HWND hwnd,int cx,int cy); 620 void ResizeOwnerWnd(void);621 620 #define FLAG_DBLCLK 1 622 621 #define FLAG_BEAMCURSOR 2 … … 730 729 BOOL SetupProjectEditor(void); 731 730 void EndProjectEditor(void); 732 void SetupWindow(HWND hwnd);733 731 BOOL SetRunning(HWND hChild); 734 732 BOOL IsNeedCompile( const std::string &filepath, BOOL bDebug ); -
trunk/ab5.0/abdev/abdev/Complement.cpp
r625 r629 386 386 //エディタ画面左端のコントロールタブ 387 387 int iControlTabSpace; 388 iControlTabSpace=MdiInfo[WndNum] .pMdiTextEdit->iWidth_ControlTabSpace;388 iControlTabSpace=MdiInfo[WndNum]->pMdiTextEdit->iWidth_ControlTabSpace; 389 389 390 390 extern int font_width,font_height; 391 391 POINT pos; 392 pos=MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos;392 pos=MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos; 393 393 GetScrollBaseCaretPos(WndNum,(int *)&pos.x,(int *)&pos.y); 394 394 … … 396 396 pos.y=(pos.y+1)*font_height; 397 397 398 ClientToScreen(MdiInfo[WndNum] .pMdiTextEdit->hEdit,&pos);398 ClientToScreen(MdiInfo[WndNum]->pMdiTextEdit->hEdit,&pos); 399 399 400 400 extern HINSTANCE hInst; … … 621 621 //フォーカスをエディタに戻す 622 622 WndNum=GetWndNum(GetWindow(hClient,GW_CHILD)); 623 SetFocus(MdiInfo[WndNum] .pMdiTextEdit->hEdit);623 SetFocus(MdiInfo[WndNum]->pMdiTextEdit->hEdit); 624 624 return 0; 625 625 case WM_KEYDOWN: … … 633 633 //フォーカスをエディタに戻す 634 634 WndNum=GetWndNum(GetWindow(hClient,GW_CHILD)); 635 SetFocus(MdiInfo[WndNum] .pMdiTextEdit->hEdit);635 SetFocus(MdiInfo[WndNum]->pMdiTextEdit->hEdit); 636 636 637 637 LVHITTESTINFO lvHitTest; … … 659 659 660 660 for(i=ComplementWndInfo.iPos-1;;i--){ 661 if(MdiInfo[WndNum] .pMdiTextEdit->buffer[i]!='\t'){661 if(MdiInfo[WndNum]->pMdiTextEdit->buffer[i]!='\t'){ 662 662 i++; 663 663 break; … … 665 665 } 666 666 667 GetCaretPosFromBufferIndex(MdiInfo[WndNum] .pMdiTextEdit->buffer,667 GetCaretPosFromBufferIndex(MdiInfo[WndNum]->pMdiTextEdit->buffer, 668 668 i, 669 &MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos);669 &MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos); 670 670 671 671 //インデント … … 684 684 //クラスメンバ補完 685 685 686 GetCaretPosFromBufferIndex(MdiInfo[WndNum] .pMdiTextEdit->buffer,686 GetCaretPosFromBufferIndex(MdiInfo[WndNum]->pMdiTextEdit->buffer, 687 687 ComplementWndInfo.iPos, 688 &MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos);688 &MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos); 689 689 690 690 //リプレース前に補完機能を破棄する -
trunk/ab5.0/abdev/abdev/Debugger.cpp
r625 r629 44 44 else{ 45 45 if(IsWindow(hChild)){ 46 if(MdiInfo[GetWndNum(hChild)] .DocType==WNDTYPE_BASIC){46 if(MdiInfo[GetWndNum(hChild)]->DocType==WNDTYPE_BASIC){ 47 47 //有効(Basicプログラムファイルを開いているとき) 48 48 bEnableDocument=1; … … 52 52 53 53 if(IsWindow(hChild)){ 54 if(MdiInfo[GetWndNum(hChild)] .DocType==WNDTYPE_BASIC){54 if(MdiInfo[GetWndNum(hChild)]->DocType==WNDTYPE_BASIC){ 55 55 //ブレークポイント有効(Basicプログラムファイルを開いているとき) 56 56 bBreakPoint=1; … … 251 251 252 252 char temporary[MAX_PATH]; 253 sprintf(temporary,"\"%s\",%d",MdiInfo[WndNum] .path.c_str(),MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y);253 sprintf(temporary,"\"%s\",%d",MdiInfo[WndNum]->path.c_str(),MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.y); 254 254 255 255 char temp2[MAX_PATH]; … … 429 429 if(WndNum==-1) return; 430 430 431 if( !Jenga::Common::Path( MdiInfo[WndNum] .path ).IsExistFile() )431 if( !Jenga::Common::Path( MdiInfo[WndNum]->path ).IsExistFile() ) 432 432 { 433 433 return; … … 436 436 int i,i2,sw=0; 437 437 for(i=0;i<num;i++){ 438 if(lstrcmpi(MdiInfo[WndNum] .path.c_str(),ppItem[i]->lpszFileName)==0){438 if(lstrcmpi(MdiInfo[WndNum]->path.c_str(),ppItem[i]->lpszFileName)==0){ 439 439 for(i2=0;i2<ppItem[i]->num;i2++){ 440 if(MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos.y==ppItem[i]->piLine[i2]){440 if(MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.y==ppItem[i]->piLine[i2]){ 441 441 sw=1; 442 442 break; … … 449 449 if(sw==0){ 450 450 //ブレークポイントを追加 451 insert(MdiInfo[WndNum] .path.c_str(),MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y);451 insert(MdiInfo[WndNum]->path.c_str(),MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.y); 452 452 } 453 453 else{ 454 454 //ブレークポイントを削除 455 remove(MdiInfo[WndNum] .path.c_str(),MdiInfo[WndNum].pMdiTextEdit->StartCaretPos.y);455 remove(MdiInfo[WndNum]->path.c_str(),MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.y); 456 456 } 457 457 … … 464 464 465 465 //エディタを再描画 466 InvalidateRect(MdiInfo[WndNum] .pMdiTextEdit->hEdit,NULL,0);466 InvalidateRect(MdiInfo[WndNum]->pMdiTextEdit->hEdit,NULL,0); 467 467 } 468 468 void CDBBreakPoint::SaveToTempFile(void){ -
trunk/ab5.0/abdev/abdev/DialogBoxes.cpp
r619 r629 1130 1130 //delete pobj_SideWeb; 1131 1131 //pobj_SideWeb=new CSideWeb(hOwner); 1132 // ResizeOwnerWnd();1132 //ActiveBasic::IDE::Program::mainFrame.Resized(); 1133 1133 } 1134 1134 return; -
trunk/ab5.0/abdev/abdev/DocumentAdvice.cpp
r625 r629 180 180 #define MEM_SPACE 1024 //強制終了を防ぐためのゆとりスペース 181 181 for(i3=0;i3<MdiInfo.size();i3++){ 182 if(MdiInfo[i3] .hwnd){183 if(lstrcmpi(temporary,MdiInfo[i3] .path.c_str())==0) break;182 if(MdiInfo[i3]->hwnd){ 183 if(lstrcmpi(temporary,MdiInfo[i3]->path.c_str())==0) break; 184 184 } 185 185 } … … 202 202 else{ 203 203 //エディタから読み取る 204 FileSize=lstrlen(MdiInfo[i3] .pMdiTextEdit->buffer);204 FileSize=lstrlen(MdiInfo[i3]->pMdiTextEdit->buffer); 205 205 206 206 temp3=(char *)HeapAlloc(hHeap,0,FileSize+MEM_SPACE); 207 memcpy(temp3,MdiInfo[i3] .pMdiTextEdit->buffer,FileSize);207 memcpy(temp3,MdiInfo[i3]->pMdiTextEdit->buffer,FileSize); 208 208 temp3[FileSize]=0; 209 209 } -
trunk/ab5.0/abdev/abdev/DrawBuffer.cpp
r625 r629 193 193 if( projectInfo.IsOpened() ){ 194 194 pobj_FileBreakPoint= 195 projectInfo.pobj_DBBreakPoint->EnumLines(MdiInfo[m_WndNum] .path.c_str());195 projectInfo.pobj_DBBreakPoint->EnumLines(MdiInfo[m_WndNum]->path.c_str()); 196 196 } 197 197 else{ 198 198 extern CDBBreakPoint *pobj_DBBreakPoint; 199 pobj_FileBreakPoint=pobj_DBBreakPoint->EnumLines(MdiInfo[m_WndNum] .path.c_str());199 pobj_FileBreakPoint=pobj_DBBreakPoint->EnumLines(MdiInfo[m_WndNum]->path.c_str()); 200 200 } 201 201 … … 278 278 279 279 RECT ClientRect; 280 hEdit=GetWindow(MdiInfo[WndNum] .hwnd,GW_CHILD);280 hEdit=GetWindow(MdiInfo[WndNum]->hwnd,GW_CHILD); 281 281 GetClientRect(hEdit,&ClientRect); 282 282 … … 284 284 int iControlTabSpace; 285 285 int iLineNumberTextCount; 286 iControlTabSpace=MdiInfo[WndNum] .pMdiTextEdit->iWidth_ControlTabSpace;287 iLineNumberTextCount=MdiInfo[WndNum] .pMdiTextEdit->iLineNumberTextCount;286 iControlTabSpace=MdiInfo[WndNum]->pMdiTextEdit->iWidth_ControlTabSpace; 287 iLineNumberTextCount=MdiInfo[WndNum]->pMdiTextEdit->iLineNumberTextCount; 288 288 289 289 //一ページ中に表示できる行数を取得 … … 302 302 303 303 //テキストバッファをコード内で参照しやすいようにポインタ変数を利用する 304 pBuf=MdiInfo[WndNum] .pMdiTextEdit->buffer;304 pBuf=MdiInfo[WndNum]->pMdiTextEdit->buffer; 305 305 306 306 //選択範囲を取得 … … 336 336 if(pBuf[i]=='\0'){ 337 337 if(0<=y&&y<=OnePage_CharHeight){ 338 if(MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos.y==y-BaseY){338 if(MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.y==y-BaseY){ 339 339 //////////////////////////////////// 340 340 // カーソル行では余白を塗りつぶす … … 376 376 ///////////////// 377 377 378 if(MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos.y==y-BaseY){378 if(MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.y==y-BaseY){ 379 379 /////////////////////////////////////////////////////////// 380 380 //改行コードよりも右側は白いブラシで塗りつぶす(カーソル行用) … … 405 405 } 406 406 407 if(MdiInfo[WndNum] .DocType==WNDTYPE_BASIC){407 if(MdiInfo[WndNum]->DocType==WNDTYPE_BASIC){ 408 408 409 409 if(pBuf[i]=='\"'&&dwComment==0) IsStr^=1; … … 434 434 if(dwComment!=0&&dwComment!=10) dwComment--; 435 435 } 436 if(MdiInfo[WndNum] .DocType==WNDTYPE_HTML){436 if(MdiInfo[WndNum]->DocType==WNDTYPE_HTML){ 437 437 //複数行に渡るコメントを考慮 438 438 if(pBuf[i]=='<'&&pBuf[i+1]=='!'&&pBuf[i+2]=='-'&&pBuf[i+3]=='-'&&IsStr==0&&dwComment==0){ … … 447 447 448 448 //ハイパーリンク用下線 449 if(MdiInfo[WndNum] .pMdiTextEdit->iUnderStart<=i&&i<MdiInfo[WndNum].pMdiTextEdit->iUnderEnd)449 if(MdiInfo[WndNum]->pMdiTextEdit->iUnderStart<=i&&i<MdiInfo[WndNum]->pMdiTextEdit->iUnderEnd) 450 450 bHyperLinkUnderBar=1; 451 451 else bHyperLinkUnderBar=0; … … 464 464 else{ 465 465 //通常カラー 466 NextColor=MdiInfo[WndNum] .pMdiTextEdit->pColorRef[i];466 NextColor=MdiInfo[WndNum]->pMdiTextEdit->pColorRef[i]; 467 467 } 468 468 … … 473 473 } 474 474 else{ 475 if(MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos.y==y-BaseY){475 if(MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.y==y-BaseY){ 476 476 //カーソル行 477 477 NextBackColor=CaretBackColor; … … 524 524 525 525 526 if(MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos.y==y-BaseY){526 if(MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.y==y-BaseY){ 527 527 /////////////////////////////////////////////////////////// 528 528 //改行コードよりも右側は白いブラシで塗りつぶす(カーソル行用) -
trunk/ab5.0/abdev/abdev/DrawWindow.cpp
r625 r629 4 4 5 5 void DrawLineInClient(int WndNum,long StartX,long StartY,long EndX,long EndY){ 6 MoveToEx(MdiInfo[WndNum] .MdiRadInfo->hMemDC,7 StartX+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x,8 StartY+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y,6 MoveToEx(MdiInfo[WndNum]->MdiRadInfo->hMemDC, 7 StartX+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x, 8 StartY+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y, 9 9 NULL); 10 LineTo(MdiInfo[WndNum] .MdiRadInfo->hMemDC,11 EndX+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x,12 EndY+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y);10 LineTo(MdiInfo[WndNum]->MdiRadInfo->hMemDC, 11 EndX+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x, 12 EndY+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y); 13 13 } 14 14 void DrawRectangleInClient(int WndNum,long left,long top,long right,long bottom,COLORREF RGB_Pen,COLORREF RGB_Brush,BOOL bBrushing){ … … 19 19 if(bBrushing) hBrush=CreateSolidBrush(RGB_Brush); 20 20 else hBrush=(HBRUSH)GetStockObject(NULL_BRUSH); 21 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hPen);22 hOldBrush=(HBRUSH)SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hBrush);23 24 Rectangle(MdiInfo[WndNum] .MdiRadInfo->hMemDC,25 left+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x,26 top+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y,27 right+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x,28 bottom+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y);29 30 SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hOldPen);31 SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hOldBrush);21 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen); 22 hOldBrush=(HBRUSH)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hBrush); 23 24 Rectangle(MdiInfo[WndNum]->MdiRadInfo->hMemDC, 25 left+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x, 26 top+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y, 27 right+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x, 28 bottom+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y); 29 30 SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen); 31 SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldBrush); 32 32 DeleteObject(hPen); 33 33 if(bBrushing) DeleteObject(hBrush); … … 38 38 //光源方向の縁 39 39 hPen=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DHIGHLIGHT)); 40 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hPen);40 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen); 41 41 DrawLineInClient(WndNum, 42 42 pPos->x, pPos->y, … … 45 45 pPos->x, pPos->y, 46 46 pPos->x, pPos->y+pSize->cy-1); 47 SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hOldPen);47 SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen); 48 48 DeleteObject(hPen); 49 49 50 50 //影側の縁 51 51 hPen=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DDKSHADOW)); 52 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hPen);52 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen); 53 53 DrawLineInClient(WndNum, 54 54 pPos->x, pPos->y+pSize->cy-1, … … 57 57 pPos->x+pSize->cx-1, pPos->y, 58 58 pPos->x+pSize->cx-1, pPos->y+pSize->cy-1); 59 SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hOldPen);59 SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen); 60 60 DeleteObject(hPen); 61 61 62 62 hPen=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DSHADOW)); 63 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hPen);63 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen); 64 64 DrawLineInClient(WndNum, 65 65 pPos->x+1, pPos->y+pSize->cy-2, … … 68 68 pPos->x+pSize->cx-2, pPos->y+1, 69 69 pPos->x+pSize->cx-2, pPos->y+pSize->cy-2); 70 SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hOldPen);70 SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen); 71 71 DeleteObject(hPen); 72 72 … … 90 90 //モーダル フレーム境界線 91 91 92 rect.left=pPos->x+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x;93 rect.top=pPos->y+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y;94 rect.right=pPos->x+pSize->cx+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x;95 rect.bottom=pPos->y+pSize->cy+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y;96 DrawEdge(MdiInfo[WndNum] .MdiRadInfo->hMemDC,&rect,EDGE_RAISED,BF_RECT);92 rect.left=pPos->x+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x; 93 rect.top=pPos->y+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y; 94 rect.right=pPos->x+pSize->cx+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x; 95 rect.bottom=pPos->y+pSize->cy+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y; 96 DrawEdge(MdiInfo[WndNum]->MdiRadInfo->hMemDC,&rect,EDGE_RAISED,BF_RECT); 97 97 pPos->x+=2; 98 98 pPos->y+=2; … … 117 117 //影側の色 118 118 hPen=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DSHADOW)); 119 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hPen);119 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen); 120 120 DrawLineInClient(WndNum, 121 121 pPos->x, … … 128 128 pPos->x+pSize->cx-1, 129 129 pPos->y); 130 SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hOldPen);130 SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen); 131 131 DeleteObject(hPen); 132 132 133 133 //光源方向の縁 134 134 hPen=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DHIGHLIGHT)); 135 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hPen);135 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen); 136 136 DrawLineInClient(WndNum, 137 137 pPos->x, … … 144 144 pPos->x+pSize->cx-1, 145 145 pPos->y+pSize->cy); 146 SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hOldPen);146 SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen); 147 147 DeleteObject(hPen); 148 148 … … 156 156 //クライアント境界線 157 157 158 rect.left=pPos->x+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x;159 rect.top=pPos->y+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y;160 rect.right=pPos->x+pSize->cx+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x;161 rect.bottom=pPos->y+pSize->cy+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y;162 DrawEdge(MdiInfo[WndNum] .MdiRadInfo->hMemDC,&rect,EDGE_SUNKEN,BF_RECT);158 rect.left=pPos->x+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x; 159 rect.top=pPos->y+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y; 160 rect.right=pPos->x+pSize->cx+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x; 161 rect.bottom=pPos->y+pSize->cy+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y; 162 DrawEdge(MdiInfo[WndNum]->MdiRadInfo->hMemDC,&rect,EDGE_SUNKEN,BF_RECT); 163 163 pPos->x+=2; 164 164 pPos->y+=2; … … 198 198 if(style&WS_DISABLED){ 199 199 hPen=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DHIGHLIGHT)); 200 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hPen);200 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen); 201 201 pos.x++; 202 202 pos.y++; … … 205 205 DrawLineInClient(WndNum,i+pos.x+2,i2,i+pos.x+2,i2+(i*2)+1); 206 206 } 207 SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hOldPen);207 SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen); 208 208 DeleteObject(hPen); 209 209 rgb=GetSysColor(COLOR_GRAYTEXT); … … 213 213 else rgb=GetSysColor(COLOR_BTNTEXT); 214 214 hPen=CreatePen(PS_SOLID,0,rgb); 215 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hPen);215 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen); 216 216 i2=pos.y+(size.cy/2); 217 217 for(i=0;i<4;i++,i2--){ 218 218 DrawLineInClient(WndNum,i+pos.x+2,i2,i+pos.x+2,i2+(i*2)+1); 219 219 } 220 SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hOldPen);220 SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen); 221 221 DeleteObject(hPen); 222 222 … … 244 244 if(style&WS_DISABLED){ 245 245 hPen=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DHIGHLIGHT)); 246 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hPen);246 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen); 247 247 pos.x++; 248 248 pos.y++; … … 251 251 DrawLineInClient(WndNum,i+pos.x+3,i2,i+pos.x+3,i2+((3-i)*2)+1); 252 252 } 253 SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hOldPen);253 SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen); 254 254 DeleteObject(hPen); 255 255 rgb=GetSysColor(COLOR_GRAYTEXT); … … 259 259 else rgb=GetSysColor(COLOR_BTNTEXT); 260 260 hPen=CreatePen(PS_SOLID,0,rgb); 261 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hPen);261 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen); 262 262 i2=pos.y+(size.cy/2); 263 263 for(i=3;i>=0;i--,i2--){ 264 264 DrawLineInClient(WndNum,i+pos.x+3,i2,i+pos.x+3,i2+((3-i)*2)+1); 265 265 } 266 SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hOldPen);266 SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen); 267 267 DeleteObject(hPen); 268 268 … … 331 331 if(style&WS_DISABLED){ 332 332 hPen=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DHIGHLIGHT)); 333 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hPen);333 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen); 334 334 pos.x++; 335 335 pos.y++; … … 338 338 DrawLineInClient(WndNum,i2,i+pos.y+2,i2+(i*2)+1,i+pos.y+2); 339 339 } 340 SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hOldPen);340 SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen); 341 341 DeleteObject(hPen); 342 342 rgb=GetSysColor(COLOR_GRAYTEXT); … … 346 346 else rgb=GetSysColor(COLOR_BTNTEXT); 347 347 hPen=CreatePen(PS_SOLID,0,rgb); 348 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hPen);348 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen); 349 349 i2=pos.x+(size.cx/2)-1; 350 350 for(i=0;i<4;i++,i2--){ 351 351 DrawLineInClient(WndNum,i2,i+pos.y+2,i2+(i*2)+1,i+pos.y+2); 352 352 } 353 SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hOldPen);353 SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen); 354 354 DeleteObject(hPen); 355 355 … … 378 378 if(style&WS_DISABLED){ 379 379 hPen=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DHIGHLIGHT)); 380 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hPen);380 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen); 381 381 pos.x++; 382 382 pos.y++; … … 385 385 DrawLineInClient(WndNum,i2,i+pos.y+3,i2+((3-i)*2)+1,i+pos.y+3); 386 386 } 387 SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hOldPen);387 SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen); 388 388 DeleteObject(hPen); 389 389 rgb=GetSysColor(COLOR_GRAYTEXT); … … 393 393 else rgb=GetSysColor(COLOR_BTNTEXT); 394 394 hPen=CreatePen(PS_SOLID,0,rgb); 395 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hPen);395 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen); 396 396 i2=pos.x+(size.cx/2); 397 397 for(i=3;i>=0;i--,i2--){ 398 398 DrawLineInClient(WndNum,i2,i+pos.y+3,i2+((3-i)*2)+1,i+pos.y+3); 399 399 } 400 SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hOldPen);400 SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen); 401 401 DeleteObject(hPen); 402 402 … … 454 454 BitmapInfo.bmiHeader.biBitCount=24; 455 455 456 hBitmap=CreateDIBSection(MdiInfo[WndNum] .MdiRadInfo->hMemDC,&BitmapInfo,DIB_RGB_COLORS,(void **)&pByte,0,0);456 hBitmap=CreateDIBSection(MdiInfo[WndNum]->MdiRadInfo->hMemDC,&BitmapInfo,DIB_RGB_COLORS,(void **)&pByte,0,0); 457 457 i=BitmapInfo.bmiHeader.biWidth*3; 458 458 if(i%sizeof(LONG)!=0) i+=sizeof(LONG)-(i%sizeof(LONG)); … … 469 469 } 470 470 } 471 SetDIBitsToDevice(MdiInfo[WndNum] .MdiRadInfo->hMemDC,472 pos.x+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x,473 pos.y+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y,471 SetDIBitsToDevice(MdiInfo[WndNum]->MdiRadInfo->hMemDC, 472 pos.x+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x, 473 pos.y+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y, 474 474 BitmapInfo.bmiHeader.biWidth, BitmapInfo.bmiHeader.biHeight, 475 475 0,0, … … 505 505 if(style&WS_DISABLED){ 506 506 hPen=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DHIGHLIGHT)); 507 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hPen);507 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen); 508 508 pos.x++; 509 509 pos.y++; … … 512 512 DrawLineInClient(WndNum,i+pos.x+2,i2,i+pos.x+2,i2+(i*2)+1); 513 513 } 514 SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hOldPen);514 SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen); 515 515 DeleteObject(hPen); 516 516 rgb=GetSysColor(COLOR_GRAYTEXT); … … 520 520 else rgb=GetSysColor(COLOR_BTNTEXT); 521 521 hPen=CreatePen(PS_SOLID,0,rgb); 522 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hPen);522 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen); 523 523 i2=pos.y+(size.cy/2); 524 524 for(i=0;i<4;i++,i2--){ 525 525 DrawLineInClient(WndNum,i+pos.x+2,i2,i+pos.x+2,i2+(i*2)+1); 526 526 } 527 SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hOldPen);527 SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen); 528 528 DeleteObject(hPen); 529 529 … … 543 543 if(style&WS_DISABLED){ 544 544 hPen=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DHIGHLIGHT)); 545 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hPen);545 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen); 546 546 pos.x++; 547 547 pos.y++; … … 550 550 DrawLineInClient(WndNum,i+pos.x+3,i2,i+pos.x+3,i2+((3-i)*2)+1); 551 551 } 552 SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hOldPen);552 SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen); 553 553 DeleteObject(hPen); 554 554 rgb=GetSysColor(COLOR_GRAYTEXT); … … 558 558 else rgb=GetSysColor(COLOR_BTNTEXT); 559 559 hPen=CreatePen(PS_SOLID,0,rgb); 560 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hPen);560 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen); 561 561 i2=pos.y+(size.cy/2); 562 562 for(i=3;i>=0;i--,i2--){ 563 563 DrawLineInClient(WndNum,i+pos.x+3,i2,i+pos.x+3,i2+((3-i)*2)+1); 564 564 } 565 SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hOldPen);565 SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen); 566 566 DeleteObject(hPen); 567 567 } … … 584 584 if(style&WS_DISABLED){ 585 585 hPen=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DHIGHLIGHT)); 586 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hPen);586 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen); 587 587 pos.x++; 588 588 pos.y++; … … 591 591 DrawLineInClient(WndNum,i2,i+pos.y+2,i2+(i*2)+1,i+pos.y+2); 592 592 } 593 SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hOldPen);593 SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen); 594 594 DeleteObject(hPen); 595 595 rgb=GetSysColor(COLOR_GRAYTEXT); … … 599 599 else rgb=GetSysColor(COLOR_BTNTEXT); 600 600 hPen=CreatePen(PS_SOLID,0,rgb); 601 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hPen);601 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen); 602 602 i2=pos.x+(size.cx/2)-1; 603 603 for(i=0;i<4;i++,i2--){ 604 604 DrawLineInClient(WndNum,i2,i+pos.y+2,i2+(i*2)+1,i+pos.y+2); 605 605 } 606 SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hOldPen);606 SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen); 607 607 DeleteObject(hPen); 608 608 … … 623 623 if(style&WS_DISABLED){ 624 624 hPen=CreatePen(PS_SOLID,0,GetSysColor(COLOR_3DHIGHLIGHT)); 625 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hPen);625 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen); 626 626 pos.x++; 627 627 pos.y++; … … 630 630 DrawLineInClient(WndNum,i2,i+pos.y+3,i2+((3-i)*2)+1,i+pos.y+3); 631 631 } 632 SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hOldPen);632 SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen); 633 633 DeleteObject(hPen); 634 634 rgb=GetSysColor(COLOR_GRAYTEXT); … … 638 638 else rgb=GetSysColor(COLOR_BTNTEXT); 639 639 hPen=CreatePen(PS_SOLID,0,rgb); 640 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hPen);640 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hPen); 641 641 i2=pos.x+(size.cx/2); 642 642 for(i=3;i>=0;i--,i2--){ 643 643 DrawLineInClient(WndNum,i2,i+pos.y+3,i2+((3-i)*2)+1,i+pos.y+3); 644 644 } 645 SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hOldPen);645 SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldPen); 646 646 DeleteObject(hPen); 647 647 } … … 748 748 749 749 //Draw...InClient関数のため 750 MdiInfo[WndNum] .MdiRadInfo->ClientPos.x=0;751 MdiInfo[WndNum] .MdiRadInfo->ClientPos.y=0;750 MdiInfo[WndNum]->MdiRadInfo->ClientPos.x=0; 751 MdiInfo[WndNum]->MdiRadInfo->ClientPos.y=0; 752 752 753 753 if(pWindowInfo->GetStyle()&(WS_CAPTION&(~WS_BORDER))){ … … 940 940 941 941 //クライアント左上ポジションを設定 942 MdiInfo[WndNum] .MdiRadInfo->ClientPos.x=InsideRect.left;943 MdiInfo[WndNum] .MdiRadInfo->ClientPos.y=InsideRect.top;942 MdiInfo[WndNum]->MdiRadInfo->ClientPos.x=InsideRect.left; 943 MdiInfo[WndNum]->MdiRadInfo->ClientPos.y=InsideRect.top; 944 944 945 945 //ExStyleによる縁を描画 … … 954 954 955 955 //クライアント領域のサイズを設定 956 MdiInfo[WndNum] .MdiRadInfo->ClientSize=size;956 MdiInfo[WndNum]->MdiRadInfo->ClientSize=size; 957 957 958 958 … … 1043 1043 //キャプション テキスト 1044 1044 1045 rect.left=pos.x+1+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x;1046 rect.top=pos.y+1+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y;1047 rect.right=pos.x+size.cx-2+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x;1048 rect.bottom=pos.y+size.cy-2+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y;1045 rect.left=pos.x+1+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x; 1046 rect.top=pos.y+1+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y; 1047 rect.right=pos.x+size.cx-2+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x; 1048 rect.bottom=pos.y+size.cy-2+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y; 1049 1049 1050 1050 if(pChildInfo->GetStyle()&BS_MULTILINE) i4=0; … … 1116 1116 if(!(pChildInfo->GetStyle()&(BS_ICON|BS_BITMAP))){ 1117 1117 //キャプション テキスト 1118 rect.left=pos.x+1+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x;1119 rect.top=pos.y+1+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y;1120 rect.right=pos.x+size.cx-2+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x;1121 rect.bottom=pos.y+size.cy-2+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y;1118 rect.left=pos.x+1+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x; 1119 rect.top=pos.y+1+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y; 1120 rect.right=pos.x+size.cx-2+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x; 1121 rect.bottom=pos.y+size.cy-2+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y; 1122 1122 1123 1123 if(pChildInfo->GetStyle()&BS_MULTILINE) i4=0; … … 1236 1236 1237 1237 //キャプション テキスト 1238 rect.left=pos.x+1+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x;1239 rect.top=pos.y+1+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y;1240 rect.right=pos.x+size.cx-1+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x;1241 rect.bottom=pos.y+size.cy-1+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y;1238 rect.left=pos.x+1+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x; 1239 rect.top=pos.y+1+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y; 1240 rect.right=pos.x+size.cx-1+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x; 1241 rect.bottom=pos.y+size.cy-1+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y; 1242 1242 1243 1243 if(pChildInfo->GetStyle()&ES_MULTILINE) i4=0; … … 1268 1268 1269 1269 //枠を描画 1270 rect.left=pos.x+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x;1271 rect.top=pos.y+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y+(size2.cy/2);1272 rect.right=pos.x+size.cx+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x;1273 rect.bottom=pos.y+size.cy+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y;1270 rect.left=pos.x+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x; 1271 rect.top=pos.y+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y+(size2.cy/2); 1272 rect.right=pos.x+size.cx+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x; 1273 rect.bottom=pos.y+size.cy+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y; 1274 1274 DrawEdge(hdc,&rect,EDGE_ETCHED,BF_RECT); 1275 1275 … … 1295 1295 1296 1296 if(!((pChildInfo->GetStyle()&BS_ICON)||(pChildInfo->GetStyle()&BS_BITMAP))){ 1297 rect.left+=MdiInfo[WndNum] .MdiRadInfo->ClientPos.x;1298 rect.top+=MdiInfo[WndNum] .MdiRadInfo->ClientPos.y;1299 rect.right+=MdiInfo[WndNum] .MdiRadInfo->ClientPos.x;1300 rect.bottom+=MdiInfo[WndNum] .MdiRadInfo->ClientPos.y;1297 rect.left+=MdiInfo[WndNum]->MdiRadInfo->ClientPos.x; 1298 rect.top+=MdiInfo[WndNum]->MdiRadInfo->ClientPos.y; 1299 rect.right+=MdiInfo[WndNum]->MdiRadInfo->ClientPos.x; 1300 rect.bottom+=MdiInfo[WndNum]->MdiRadInfo->ClientPos.y; 1301 1301 rect.left+=2; 1302 1302 rect.right-=2; … … 1338 1338 DrawRectangleInClient(WndNum,pos.x,pos.y,pos.x+size.cx,pos.y+size.cy,RGB(255,255,255),0,0); 1339 1339 else if((pChildInfo->GetStyle()&0x0000001F)==SS_ETCHEDFRAME){ 1340 rect.left=pos.x+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x;1341 rect.top=pos.y+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y;1342 rect.right=pos.x+size.cx+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x;1343 rect.bottom=pos.y+size.cy+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y;1340 rect.left=pos.x+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x; 1341 rect.top=pos.y+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y; 1342 rect.right=pos.x+size.cx+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x; 1343 rect.bottom=pos.y+size.cy+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y; 1344 1344 DrawEdge(hdc,&rect,EDGE_ETCHED,BF_RECT); 1345 1345 } … … 1385 1385 1386 1386 DrawIcon(hdc, 1387 pos.x+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x,1388 pos.y+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y,1387 pos.x+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x, 1388 pos.y+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y, 1389 1389 (HICON)hImage); 1390 1390 DestroyIcon((HICON)hImage); … … 1394 1394 DrawRectangleInClient(WndNum,pos.x,pos.y,pos.x+size.cx,pos.y+size.cy,RGB(0,0,0),0,0); 1395 1395 hOldFont=(HFONT)SelectObject(hdc,hFont); 1396 rect.left=pos.x+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x;1397 rect.top=pos.y+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y;1398 rect.right=pos.x+size.cx+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x;1399 rect.bottom=pos.y+size.cy+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y;1396 rect.left=pos.x+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x; 1397 rect.top=pos.y+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y; 1398 rect.right=pos.x+size.cx+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x; 1399 rect.bottom=pos.y+size.cy+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y; 1400 1400 SetTextColor(hdc,GetSysColor(COLOR_WINDOWTEXT)); 1401 1401 DrawText(hdc,"icon...",-1,&rect,DT_SINGLELINE|DT_CENTER|DT_VCENTER); … … 1442 1442 SelectObject(memdc,hImage); 1443 1443 BitBlt(hdc, 1444 pos.x+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x,1445 pos.y+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y,1444 pos.x+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x, 1445 pos.y+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y, 1446 1446 size.cx, size.cy, 1447 1447 memdc, 0,0, … … 1454 1454 DrawRectangleInClient(WndNum,pos.x,pos.y,pos.x+size.cx,pos.y+size.cy,RGB(0,0,0),0,0); 1455 1455 hOldFont=(HFONT)SelectObject(hdc,hFont); 1456 rect.left=pos.x+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x;1457 rect.top=pos.y+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y;1458 rect.right=pos.x+size.cx+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x;1459 rect.bottom=pos.y+size.cy+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y;1456 rect.left=pos.x+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x; 1457 rect.top=pos.y+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y; 1458 rect.right=pos.x+size.cx+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x; 1459 rect.bottom=pos.y+size.cy+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y; 1460 1460 SetTextColor(hdc,GetSysColor(COLOR_WINDOWTEXT)); 1461 1461 DrawText(hdc,"bmp...",-1,&rect,DT_SINGLELINE|DT_CENTER|DT_VCENTER); … … 1606 1606 } 1607 1607 SetDIBitsToDevice(hdc, 1608 pos2.x+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x,1609 pos2.y+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y,1608 pos2.x+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x, 1609 pos2.y+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y, 1610 1610 pBitmapInfo->bmiHeader.biWidth, pBitmapInfo->bmiHeader.biHeight, 1611 1611 0,0, … … 1623 1623 if(!(pChildInfo->GetStyle()&(BS_ICON|BS_BITMAP))){ 1624 1624 //キャプション テキスト 1625 rect.left=pos.x+1+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x;1626 rect.top=pos.y+1+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y;1627 rect.right=pos.x+size.cx-2+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x;1628 rect.bottom=pos.y+size.cy-2+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y;1625 rect.left=pos.x+1+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x; 1626 rect.top=pos.y+1+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y; 1627 rect.right=pos.x+size.cx-2+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x; 1628 rect.bottom=pos.y+size.cy-2+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y; 1629 1629 1630 1630 if(pChildInfo->GetStyle()&BS_MULTILINE) i4=0; … … 1665 1665 1666 1666 //キャプション テキスト 1667 rect.left=pos.x+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x;1668 rect.top=pos.y+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y;1669 rect.right=pos.x+size.cx+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x;1670 rect.bottom=pos.y+size.cy+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y;1667 rect.left=pos.x+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x; 1668 rect.top=pos.y+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y; 1669 rect.right=pos.x+size.cx+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x; 1670 rect.bottom=pos.y+size.cy+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y; 1671 1671 1672 1672 //ビットを考慮してSS_LEFTを最後に検討する … … 1708 1708 size.cy-=16; 1709 1709 1710 rect.left=MdiInfo[WndNum] .MdiRadInfo->ClientPos.x+pos.x+(size.cx/2)-2;1711 rect.right=MdiInfo[WndNum] .MdiRadInfo->ClientPos.x+pos.x+(size.cx/2)+2;1712 rect.top=MdiInfo[WndNum] .MdiRadInfo->ClientPos.y+pos.y;1713 rect.bottom=MdiInfo[WndNum] .MdiRadInfo->ClientPos.y+pos.y+size.cy;1710 rect.left=MdiInfo[WndNum]->MdiRadInfo->ClientPos.x+pos.x+(size.cx/2)-2; 1711 rect.right=MdiInfo[WndNum]->MdiRadInfo->ClientPos.x+pos.x+(size.cx/2)+2; 1712 rect.top=MdiInfo[WndNum]->MdiRadInfo->ClientPos.y+pos.y; 1713 rect.bottom=MdiInfo[WndNum]->MdiRadInfo->ClientPos.y+pos.y+size.cy; 1714 1714 DrawEdge(hdc,&rect,EDGE_SUNKEN,BF_RECT); 1715 1715 … … 1724 1724 if(size.cy>21) size.cy=21; 1725 1725 1726 rect.left=MdiInfo[WndNum] .MdiRadInfo->ClientPos.x+pos.x;1727 rect.right=MdiInfo[WndNum] .MdiRadInfo->ClientPos.x+pos.x+size.cx;1728 rect.top=MdiInfo[WndNum] .MdiRadInfo->ClientPos.y+pos.y+(size.cy/2)-2;1729 rect.bottom=MdiInfo[WndNum] .MdiRadInfo->ClientPos.y+pos.y+(size.cy/2)+2;1726 rect.left=MdiInfo[WndNum]->MdiRadInfo->ClientPos.x+pos.x; 1727 rect.right=MdiInfo[WndNum]->MdiRadInfo->ClientPos.x+pos.x+size.cx; 1728 rect.top=MdiInfo[WndNum]->MdiRadInfo->ClientPos.y+pos.y+(size.cy/2)-2; 1729 rect.bottom=MdiInfo[WndNum]->MdiRadInfo->ClientPos.y+pos.y+(size.cy/2)+2; 1730 1730 DrawEdge(hdc,&rect,EDGE_SUNKEN,BF_RECT); 1731 1731 … … 1769 1769 POINT pos; 1770 1770 1771 SetBkMode(MdiInfo[WndNum] .MdiRadInfo->hMemDC,TRANSPARENT);1772 1773 hOldBrush=(HBRUSH)SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,GetStockObject(WHITE_BRUSH));1774 PatBlt(MdiInfo[WndNum] .MdiRadInfo->hMemDC,0,0,ScreenX*2,ScreenY*2,PATCOPY);1775 SelectObject(MdiInfo[WndNum] .MdiRadInfo->hMemDC,hOldBrush);1771 SetBkMode(MdiInfo[WndNum]->MdiRadInfo->hMemDC,TRANSPARENT); 1772 1773 hOldBrush=(HBRUSH)SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,GetStockObject(WHITE_BRUSH)); 1774 PatBlt(MdiInfo[WndNum]->MdiRadInfo->hMemDC,0,0,ScreenX*2,ScreenY*2,PATCOPY); 1775 SelectObject(MdiInfo[WndNum]->MdiRadInfo->hMemDC,hOldBrush); 1776 1776 1777 1777 pos.x=LEVER_THICK; 1778 1778 pos.y=LEVER_THICK; 1779 DesigningWindow(WndNum,MdiInfo[WndNum] .MdiRadInfo->hMemDC,&pos,pWindowInfo);1780 1781 InvalidateRect(MdiInfo[WndNum] .MdiRadInfo->hRad,NULL,0);1779 DesigningWindow(WndNum,MdiInfo[WndNum]->MdiRadInfo->hMemDC,&pos,pWindowInfo); 1780 1781 InvalidateRect(MdiInfo[WndNum]->MdiRadInfo->hRad,NULL,0); 1782 1782 } -
trunk/ab5.0/abdev/abdev/FileOperation.cpp
r626 r629 344 344 345 345 char szOldTitle[MAX_PATH]; 346 lstrcpy(szOldTitle,MdiInfo[WndNum] .title.c_str());347 348 if(MdiInfo[WndNum] .DocType==WNDTYPE_RAD||MdiInfo[WndNum].DocType==WNDTYPE_MENU){346 lstrcpy(szOldTitle,MdiInfo[WndNum]->title.c_str()); 347 348 if(MdiInfo[WndNum]->DocType==WNDTYPE_RAD||MdiInfo[WndNum]->DocType==WNDTYPE_MENU){ 349 349 //////////////////////////////////// 350 350 // RADツール及びメニューエディタ … … 359 359 } 360 360 } 361 else if(IS_DOCUMENT_TEXT(MdiInfo[WndNum] .DocType)){361 else if(IS_DOCUMENT_TEXT(MdiInfo[WndNum]->DocType)){ 362 362 ////////////////////////// 363 363 // テキストドキュメント … … 376 376 377 377 //ドキュメント セレクト コンボボックスから消去 378 i2=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[WndNum] .title.c_str());378 i2=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[WndNum]->title.c_str()); 379 379 SendMessage(hDocCombo,CB_DELETESTRING,i2,0); 380 380 381 381 //新しいパスをセット 382 MdiInfo[WndNum] .path = temporary;382 MdiInfo[WndNum]->path = temporary; 383 383 384 384 //ドキュメント セレクト コンボボックスに挿入 385 385 _splitpath(temporary,NULL,NULL,str,str2); 386 386 lstrcat(str,str2); 387 MdiInfo[WndNum] .title = str;388 SendMessage(hDocCombo,CB_ADDSTRING,0,(long)MdiInfo[WndNum] .title.c_str());389 i2=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[WndNum] .title.c_str());387 MdiInfo[WndNum]->title = str; 388 SendMessage(hDocCombo,CB_ADDSTRING,0,(long)MdiInfo[WndNum]->title.c_str()); 389 i2=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[WndNum]->title.c_str()); 390 390 SendMessage(hDocCombo,CB_SETCURSEL,i2,0); 391 391 392 392 //MDIウィンドウのタイトルを再設定 393 SetWindowText(hChild,MdiInfo[WndNum] .title.c_str());393 SetWindowText(hChild,MdiInfo[WndNum]->title.c_str()); 394 394 } 395 395 else{ 396 if(MdiInfo[WndNum] .path.empty()){396 if(MdiInfo[WndNum]->path.empty()){ 397 397 //"保存先のファイルを指定してください" 398 398 get_file_path: … … 403 403 extern LPSTR HtmlFileFilter; 404 404 extern LPSTR TextFileFilter; 405 if(MdiInfo[WndNum] .DocType==WNDTYPE_BASIC)405 if(MdiInfo[WndNum]->DocType==WNDTYPE_BASIC) 406 406 ff=DefFileFilter; 407 else if(MdiInfo[WndNum] .DocType==WNDTYPE_HTML)407 else if(MdiInfo[WndNum]->DocType==WNDTYPE_HTML) 408 408 ff=HtmlFileFilter; 409 else if(MdiInfo[WndNum] .DocType==WNDTYPE_TEXT)409 else if(MdiInfo[WndNum]->DocType==WNDTYPE_TEXT) 410 410 ff=TextFileFilter; 411 411 … … 414 414 return 1; 415 415 } 416 lstrcpy(temporary,MdiInfo[WndNum] .path.c_str());416 lstrcpy(temporary,MdiInfo[WndNum]->path.c_str()); 417 417 } 418 418 … … 430 430 //文字コードを復元 431 431 char *pBuf; 432 pBuf=nkf.RestoreBuffer(MdiInfo[WndNum] .pMdiTextEdit->buffer,MdiInfo[WndNum].pMdiTextEdit->iCharCode);432 pBuf=nkf.RestoreBuffer(MdiInfo[WndNum]->pMdiTextEdit->buffer,MdiInfo[WndNum]->pMdiTextEdit->iCharCode); 433 433 434 434 //改行コードを復元 435 if(MdiInfo[WndNum] .pMdiTextEdit->iLfCode==LFCODE_LF) nkf.ToLF(pBuf);436 else if(MdiInfo[WndNum] .pMdiTextEdit->iLfCode==LFCODE_CR) nkf.ToCR(pBuf);435 if(MdiInfo[WndNum]->pMdiTextEdit->iLfCode==LFCODE_LF) nkf.ToLF(pBuf); 436 else if(MdiInfo[WndNum]->pMdiTextEdit->iLfCode==LFCODE_CR) nkf.ToCR(pBuf); 437 437 438 438 … … 454 454 455 455 //変更フラグをオフにする 456 MdiInfo[WndNum] .pMdiTextEdit->UnModify();457 } 458 else if(MdiInfo[WndNum] .DocType==WNDTYPE_ICONEDIT){456 MdiInfo[WndNum]->pMdiTextEdit->UnModify(); 457 } 458 else if(MdiInfo[WndNum]->DocType==WNDTYPE_ICONEDIT){ 459 459 /////////////////// 460 460 // ICON … … 471 471 } 472 472 CloseHandle(fh); 473 MdiInfo[WndNum] .path = temporary;474 i2=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[WndNum] .title.c_str());473 MdiInfo[WndNum]->path = temporary; 474 i2=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[WndNum]->title.c_str()); 475 475 SendMessage(hDocCombo,CB_DELETESTRING,i2,0); 476 476 _splitpath(temporary,NULL,NULL,str,str2); 477 477 lstrcat(str,str2); 478 MdiInfo[WndNum] .title = str;479 SendMessage(hDocCombo,CB_ADDSTRING,0,(long)MdiInfo[WndNum] .title.c_str());480 i2=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[WndNum] .title.c_str());478 MdiInfo[WndNum]->title = str; 479 SendMessage(hDocCombo,CB_ADDSTRING,0,(long)MdiInfo[WndNum]->title.c_str()); 480 i2=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[WndNum]->title.c_str()); 481 481 SendMessage(hDocCombo,CB_SETCURSEL,i2,0); 482 SetWindowText(hChild,MdiInfo[WndNum] .title.c_str());482 SetWindowText(hChild,MdiInfo[WndNum]->title.c_str()); 483 483 } 484 484 else{ 485 if(MdiInfo[WndNum] .path.empty()){485 if(MdiInfo[WndNum]->path.empty()){ 486 486 //"保存先のファイルを指定してください" 487 487 if(!GetFilePathDialog(hOwner,temporary,IconFileFilter,STRING_FILESAVETITLE_DEFAULT,FALSE)) return 0; … … 489 489 return 1; 490 490 } 491 lstrcpy(temporary,MdiInfo[WndNum] .path.c_str());491 lstrcpy(temporary,MdiInfo[WndNum]->path.c_str()); 492 492 } 493 493 SaveIconFile(temporary,hChild); 494 494 495 MdiInfo[WndNum] .MdiIconEditInfo->bModify=0;495 MdiInfo[WndNum]->MdiIconEditInfo->bModify=0; 496 496 } 497 497 … … 502 502 color=pobj_MainTab->GetItemColor(szOldTitle); 503 503 pobj_MainTab->DeleteItem( szOldTitle, false ); 504 pobj_MainTab->InsertItem( MdiInfo[WndNum] .title.c_str(), false, color );504 pobj_MainTab->InsertItem( MdiInfo[WndNum]->title.c_str(), false, color ); 505 505 } 506 506 else{ 507 pobj_MainTab->RenameItem( szOldTitle, MdiInfo[WndNum] .title.c_str() );507 pobj_MainTab->RenameItem( szOldTitle, MdiInfo[WndNum]->title.c_str() ); 508 508 } 509 509 510 510 //「最近使ったファイル」を更新 511 pobj_nv->pobj_History->insert(MdiInfo[WndNum] .path.c_str());511 pobj_nv->pobj_History->insert(MdiInfo[WndNum]->path.c_str()); 512 512 513 513 return 1; -
trunk/ab5.0/abdev/abdev/IconEditor.cpp
r626 r629 34 34 BITMAPINFOHEADER *pBmpInfoHdr; 35 35 36 hCombo=GetDlgItem(MdiInfo[WndNum] .MdiIconEditInfo->hToolDlg,IDC_ICONTYPECOMBO);37 38 for(i=0;i<MdiInfo[WndNum] .MdiIconEditInfo->num;i++){39 pBmpInfoHdr=(BITMAPINFOHEADER *)MdiInfo[WndNum] .MdiIconEditInfo->pIconImage[i];36 hCombo=GetDlgItem(MdiInfo[WndNum]->MdiIconEditInfo->hToolDlg,IDC_ICONTYPECOMBO); 37 38 for(i=0;i<MdiInfo[WndNum]->MdiIconEditInfo->num;i++){ 39 pBmpInfoHdr=(BITMAPINFOHEADER *)MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[i]; 40 40 41 41 //例: "32*32 (xxxx色)" … … 147 147 } 148 148 149 MdiInfo[WndNum] .MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->num]=149 MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->num]= 150 150 CreateIconType(IconType, 151 &MdiInfo[WndNum] .MdiIconEditInfo->dwBytesInRes[MdiInfo[WndNum].MdiIconEditInfo->num]);151 &MdiInfo[WndNum]->MdiIconEditInfo->dwBytesInRes[MdiInfo[WndNum]->MdiIconEditInfo->num]); 152 152 153 153 //イメージ選択用のメモリを解放 154 if(MdiInfo[WndNum] .MdiIconEditInfo->SelectLevel==2)155 DeleteObject(MdiInfo[WndNum] .MdiIconEditInfo->hSelectingBmp);156 MdiInfo[WndNum] .MdiIconEditInfo->SelectLevel=0;154 if(MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel==2) 155 DeleteObject(MdiInfo[WndNum]->MdiIconEditInfo->hSelectingBmp); 156 MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel=0; 157 157 158 158 //アイコンタイプを追加 159 MdiInfo[WndNum] .MdiIconEditInfo->SelectIconNum=MdiInfo[WndNum].MdiIconEditInfo->num;160 MdiInfo[WndNum] .MdiIconEditInfo->num++;159 MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum=MdiInfo[WndNum]->MdiIconEditInfo->num; 160 MdiInfo[WndNum]->MdiIconEditInfo->num++; 161 161 162 162 //変更情報を初期化 163 i=MdiInfo[WndNum] .MdiIconEditInfo->SelectIconNum;164 MdiInfo[WndNum] .MdiIconEditInfo->undo[i].NowPos=0;165 memset(MdiInfo[WndNum] .MdiIconEditInfo->undo[i].lpData,0,sizeof(BYTE *)*MAX_ICONEDIT_UNDONUM);163 i=MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum; 164 MdiInfo[WndNum]->MdiIconEditInfo->undo[i].NowPos=0; 165 memset(MdiInfo[WndNum]->MdiIconEditInfo->undo[i].lpData,0,sizeof(BYTE *)*MAX_ICONEDIT_UNDONUM); 166 166 167 167 //アイコンタイプコンボボックスに追加 168 168 char temporary[32]; 169 169 HWND hCombo; 170 hCombo=GetDlgItem(MdiInfo[WndNum] .MdiIconEditInfo->hToolDlg,IDC_ICONTYPECOMBO);170 hCombo=GetDlgItem(MdiInfo[WndNum]->MdiIconEditInfo->hToolDlg,IDC_ICONTYPECOMBO); 171 171 172 172 //例: "32*32 (xxxx色)" … … 182 182 //再描画 183 183 HBRUSH hOldBrush; 184 hOldBrush=(HBRUSH)SelectObject(MdiInfo[WndNum] .MdiIconEditInfo->memdc,GetStockObject(WHITE_BRUSH));185 PatBlt(MdiInfo[WndNum] .MdiIconEditInfo->memdc,0,0,400,400,PATCOPY);186 SelectObject(MdiInfo[WndNum] .MdiIconEditInfo->memdc,hOldBrush);184 hOldBrush=(HBRUSH)SelectObject(MdiInfo[WndNum]->MdiIconEditInfo->memdc,GetStockObject(WHITE_BRUSH)); 185 PatBlt(MdiInfo[WndNum]->MdiIconEditInfo->memdc,0,0,400,400,PATCOPY); 186 SelectObject(MdiInfo[WndNum]->MdiIconEditInfo->memdc,hOldBrush); 187 187 DrawIconToMemBmp(WndNum,0); 188 InvalidateRect(MdiInfo[WndNum] .MdiIconEditInfo->hMain,NULL,1);189 InvalidateRect(MdiInfo[WndNum] .MdiIconEditInfo->hColorDlg,NULL,0);188 InvalidateRect(MdiInfo[WndNum]->MdiIconEditInfo->hMain,NULL,1); 189 InvalidateRect(MdiInfo[WndNum]->MdiIconEditInfo->hColorDlg,NULL,0); 190 190 } 191 191 void DeleteIconType(int WndNum){ … … 194 194 //変更情報を解放 195 195 for(i=0;i<MAX_ICONEDIT_UNDONUM;i++){ 196 if(MdiInfo[WndNum] .MdiIconEditInfo->undo[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum].lpData[i])197 HeapDefaultFree(MdiInfo[WndNum] .MdiIconEditInfo->undo[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum].lpData[i]);196 if(MdiInfo[WndNum]->MdiIconEditInfo->undo[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum].lpData[i]) 197 HeapDefaultFree(MdiInfo[WndNum]->MdiIconEditInfo->undo[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum].lpData[i]); 198 198 } 199 199 200 200 //メモリを解放 201 HeapDefaultFree(MdiInfo[WndNum] .MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]);201 HeapDefaultFree(MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]); 202 202 203 203 //イメージ選択用のメモリを解放 204 if(MdiInfo[WndNum] .MdiIconEditInfo->SelectLevel==2)205 DeleteObject(MdiInfo[WndNum] .MdiIconEditInfo->hSelectingBmp);206 MdiInfo[WndNum] .MdiIconEditInfo->SelectLevel=0;204 if(MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel==2) 205 DeleteObject(MdiInfo[WndNum]->MdiIconEditInfo->hSelectingBmp); 206 MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel=0; 207 207 208 208 //////////////////////// 209 209 // アイコンタイプを削除 210 for(i=MdiInfo[WndNum] .MdiIconEditInfo->SelectIconNum;i<MdiInfo[WndNum].MdiIconEditInfo->num-1;i++){211 MdiInfo[WndNum] .MdiIconEditInfo->pIconImage[i]=MdiInfo[WndNum].MdiIconEditInfo->pIconImage[i+1];212 MdiInfo[WndNum] .MdiIconEditInfo->dwBytesInRes[i]=MdiInfo[WndNum].MdiIconEditInfo->dwBytesInRes[i+1];213 MdiInfo[WndNum] .MdiIconEditInfo->undo[i]=MdiInfo[WndNum].MdiIconEditInfo->undo[i+1];214 } 215 MdiInfo[WndNum] .MdiIconEditInfo->num--;216 if(MdiInfo[WndNum] .MdiIconEditInfo->num==MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum)217 MdiInfo[WndNum] .MdiIconEditInfo->SelectIconNum=MdiInfo[WndNum].MdiIconEditInfo->num-1;210 for(i=MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum;i<MdiInfo[WndNum]->MdiIconEditInfo->num-1;i++){ 211 MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[i]=MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[i+1]; 212 MdiInfo[WndNum]->MdiIconEditInfo->dwBytesInRes[i]=MdiInfo[WndNum]->MdiIconEditInfo->dwBytesInRes[i+1]; 213 MdiInfo[WndNum]->MdiIconEditInfo->undo[i]=MdiInfo[WndNum]->MdiIconEditInfo->undo[i+1]; 214 } 215 MdiInfo[WndNum]->MdiIconEditInfo->num--; 216 if(MdiInfo[WndNum]->MdiIconEditInfo->num==MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum) 217 MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum=MdiInfo[WndNum]->MdiIconEditInfo->num-1; 218 218 219 219 //コンボボックスからアイコンタイプを削除 220 220 HWND hCombo; 221 hCombo=GetDlgItem(MdiInfo[WndNum] .MdiIconEditInfo->hToolDlg,IDC_ICONTYPECOMBO);221 hCombo=GetDlgItem(MdiInfo[WndNum]->MdiIconEditInfo->hToolDlg,IDC_ICONTYPECOMBO); 222 222 i=SendMessage(hCombo,CB_DELETESTRING, 223 223 SendMessage(hCombo,CB_GETCURSEL,0,0), 224 224 0); 225 SendMessage(hCombo,CB_SETCURSEL,MdiInfo[WndNum] .MdiIconEditInfo->SelectIconNum,0);225 SendMessage(hCombo,CB_SETCURSEL,MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum,0); 226 226 227 227 //再描画 228 228 HBRUSH hOldBrush; 229 hOldBrush=(HBRUSH)SelectObject(MdiInfo[WndNum] .MdiIconEditInfo->memdc,GetStockObject(WHITE_BRUSH));230 PatBlt(MdiInfo[WndNum] .MdiIconEditInfo->memdc,0,0,400,400,PATCOPY);231 SelectObject(MdiInfo[WndNum] .MdiIconEditInfo->memdc,hOldBrush);229 hOldBrush=(HBRUSH)SelectObject(MdiInfo[WndNum]->MdiIconEditInfo->memdc,GetStockObject(WHITE_BRUSH)); 230 PatBlt(MdiInfo[WndNum]->MdiIconEditInfo->memdc,0,0,400,400,PATCOPY); 231 SelectObject(MdiInfo[WndNum]->MdiIconEditInfo->memdc,hOldBrush); 232 232 DrawIconToMemBmp(WndNum,0); 233 InvalidateRect(MdiInfo[WndNum] .MdiIconEditInfo->hMain,NULL,1);234 InvalidateRect(MdiInfo[WndNum] .MdiIconEditInfo->hColorDlg,NULL,0);233 InvalidateRect(MdiInfo[WndNum]->MdiIconEditInfo->hMain,NULL,1); 234 InvalidateRect(MdiInfo[WndNum]->MdiIconEditInfo->hColorDlg,NULL,0); 235 235 } 236 236 void NewIconEditWindow(const char *filepath){ … … 252 252 while(hChild){ 253 253 i=GetWndNum(hChild); 254 if(MdiInfo[i] .DocType==WNDTYPE_ICONEDIT){255 if(lstrcmpi(MdiInfo[i] .path.c_str(),filepath)==0) break;254 if(MdiInfo[i]->DocType==WNDTYPE_ICONEDIT){ 255 if(lstrcmpi(MdiInfo[i]->path.c_str(),filepath)==0) break; 256 256 } 257 257 hChild=GetNextWindow(hChild,GW_HWNDNEXT); … … 344 344 345 345 mdic.lParam=0; 346 mdic.style |= WS_VISIBLE | WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_SYSMENU | WS_CAPTION | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX; 346 347 hChild=(HWND)SendMessage(hClient,WM_MDICREATE,0,(long)&mdic); //ウィンドウ作成 347 348 … … 369 370 370 371 //ウィンドウのID登録 371 MdiInfo.push_back( MDIINFO() );372 MdiInfo.push_back( new MDIINFO() ); 372 373 i = MdiInfo.size()-1; 373 MdiInfo[i] .hwnd=hChild;374 MdiInfo[i] .DocType=WNDTYPE_ICONEDIT;375 MdiInfo[i] .title = str;374 MdiInfo[i]->hwnd=hChild; 375 MdiInfo[i]->DocType=WNDTYPE_ICONEDIT; 376 MdiInfo[i]->title = str; 376 377 if(filepath) 377 378 { 378 MdiInfo[i] .path = filepath;379 MdiInfo[i]->path = filepath; 379 380 } 380 381 else 381 382 { 382 MdiInfo[i] .path = "";383 } 384 385 MdiInfo[i] .MdiIconEditInfo=(MDIICONEDITINFO *)HeapAlloc(hHeap,0,sizeof(MDIICONEDITINFO));386 MdiInfo[i] .MdiIconEditInfo->hMain=hMain;387 MdiInfo[i] .MdiIconEditInfo->hToolDlg=hToolDlg;388 MdiInfo[i] .MdiIconEditInfo->hButtonsDlg=hButtonsDlg;389 MdiInfo[i] .MdiIconEditInfo->hColorDlg=hColorDlg;383 MdiInfo[i]->path = ""; 384 } 385 386 MdiInfo[i]->MdiIconEditInfo=(MDIICONEDITINFO *)HeapAlloc(hHeap,0,sizeof(MDIICONEDITINFO)); 387 MdiInfo[i]->MdiIconEditInfo->hMain=hMain; 388 MdiInfo[i]->MdiIconEditInfo->hToolDlg=hToolDlg; 389 MdiInfo[i]->MdiIconEditInfo->hButtonsDlg=hButtonsDlg; 390 MdiInfo[i]->MdiIconEditInfo->hColorDlg=hColorDlg; 390 391 hdc=GetDC(hMain); 391 MdiInfo[i] .MdiIconEditInfo->memdc=CreateCompatibleDC(hdc);392 MdiInfo[i] .MdiIconEditInfo->hMemBmp=CreateCompatibleBitmap(hdc,600,400);393 SelectObject(MdiInfo[i] .MdiIconEditInfo->memdc,MdiInfo[i].MdiIconEditInfo->hMemBmp);392 MdiInfo[i]->MdiIconEditInfo->memdc=CreateCompatibleDC(hdc); 393 MdiInfo[i]->MdiIconEditInfo->hMemBmp=CreateCompatibleBitmap(hdc,600,400); 394 SelectObject(MdiInfo[i]->MdiIconEditInfo->memdc,MdiInfo[i]->MdiIconEditInfo->hMemBmp); 394 395 ReleaseDC(hMain,hdc); 395 396 396 MdiInfo[i] .MdiIconEditInfo->SelectLevel=0;397 398 MdiInfo[i] .MdiIconEditInfo->num=IconNum;399 MdiInfo[i] .MdiIconEditInfo->SelectIconNum=0;400 memcpy(MdiInfo[i] .MdiIconEditInfo->pIconImage,pImageBuffer,sizeof(DWORD)*IconNum);401 402 memcpy(MdiInfo[i] .MdiIconEditInfo->dwBytesInRes,dwBytesInRes,sizeof(DWORD)*IconNum);403 404 MdiInfo[i] .MdiIconEditInfo->NowTool=IDC_TOOL_PEN;405 MdiInfo[i] .MdiIconEditInfo->MainColor=RGB(0,0,0);397 MdiInfo[i]->MdiIconEditInfo->SelectLevel=0; 398 399 MdiInfo[i]->MdiIconEditInfo->num=IconNum; 400 MdiInfo[i]->MdiIconEditInfo->SelectIconNum=0; 401 memcpy(MdiInfo[i]->MdiIconEditInfo->pIconImage,pImageBuffer,sizeof(DWORD)*IconNum); 402 403 memcpy(MdiInfo[i]->MdiIconEditInfo->dwBytesInRes,dwBytesInRes,sizeof(DWORD)*IconNum); 404 405 MdiInfo[i]->MdiIconEditInfo->NowTool=IDC_TOOL_PEN; 406 MdiInfo[i]->MdiIconEditInfo->MainColor=RGB(0,0,0); 406 407 extern COLORREF TransparentClrRef; 407 MdiInfo[i] .MdiIconEditInfo->SubColor=TransparentClrRef;408 409 for(i2=0;i2<MdiInfo[i] .MdiIconEditInfo->num;i2++){410 MdiInfo[i] .MdiIconEditInfo->undo[i2].NowPos=0;411 memset(MdiInfo[i] .MdiIconEditInfo->undo[i2].lpData,0,sizeof(BYTE *)*MAX_ICONEDIT_UNDONUM);412 } 413 MdiInfo[i] .MdiIconEditInfo->bModify=0;408 MdiInfo[i]->MdiIconEditInfo->SubColor=TransparentClrRef; 409 410 for(i2=0;i2<MdiInfo[i]->MdiIconEditInfo->num;i2++){ 411 MdiInfo[i]->MdiIconEditInfo->undo[i2].NowPos=0; 412 memset(MdiInfo[i]->MdiIconEditInfo->undo[i2].lpData,0,sizeof(BYTE *)*MAX_ICONEDIT_UNDONUM); 413 } 414 MdiInfo[i]->MdiIconEditInfo->bModify=0; 414 415 415 416 … … 417 418 //メモリへ初期描画を行う 418 419 HBRUSH hOldBrush; 419 hOldBrush=(HBRUSH)SelectObject(MdiInfo[i] .MdiIconEditInfo->memdc,GetStockObject(WHITE_BRUSH));420 PatBlt(MdiInfo[i] .MdiIconEditInfo->memdc,0,0,600,400,PATCOPY);421 SelectObject(MdiInfo[i] .MdiIconEditInfo->memdc,hOldBrush);420 hOldBrush=(HBRUSH)SelectObject(MdiInfo[i]->MdiIconEditInfo->memdc,GetStockObject(WHITE_BRUSH)); 421 PatBlt(MdiInfo[i]->MdiIconEditInfo->memdc,0,0,600,400,PATCOPY); 422 SelectObject(MdiInfo[i]->MdiIconEditInfo->memdc,hOldBrush); 422 423 DrawIconToMemBmp(i,0); 423 424 … … 430 431 ResetIconType(i); 431 432 432 if(MdiInfo[i] .MdiIconEditInfo->num<=1)433 if(MdiInfo[i]->MdiIconEditInfo->num<=1) 433 434 EnableWindow(GetDlgItem(hToolDlg,IDC_DELETE_ICONTYPE),0); 434 435 … … 460 461 *((WORD *)(buffer+i2))=1; //idType 461 462 i2+=sizeof(WORD); 462 *((WORD *)(buffer+i2))=MdiInfo[WndNum] .MdiIconEditInfo->num; //idCount463 *((WORD *)(buffer+i2))=MdiInfo[WndNum]->MdiIconEditInfo->num; //idCount 463 464 i2+=sizeof(WORD); 464 465 … … 470 471 //イメージバッファの初期位置 471 472 IconDirEntry.dwImageOffset=sizeof(ICONDIR)+ 472 sizeof(ICONDIRENTRY)*MdiInfo[WndNum] .MdiIconEditInfo->num;473 474 for(i=0;i<MdiInfo[WndNum] .MdiIconEditInfo->num;i++){473 sizeof(ICONDIRENTRY)*MdiInfo[WndNum]->MdiIconEditInfo->num; 474 475 for(i=0;i<MdiInfo[WndNum]->MdiIconEditInfo->num;i++){ 475 476 BITMAPINFOHEADER *pBmpInfoHdr; 476 pBmpInfoHdr=(BITMAPINFOHEADER *)MdiInfo[WndNum] .MdiIconEditInfo->pIconImage[i];477 pBmpInfoHdr=(BITMAPINFOHEADER *)MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[i]; 477 478 478 479 IconDirEntry.bWidth=(BYTE)pBmpInfoHdr->biWidth; … … 505 506 //////////////////// 506 507 // イメージバッファ 507 for(i=0;i<MdiInfo[WndNum] .MdiIconEditInfo->num;i++){508 for(i=0;i<MdiInfo[WndNum]->MdiIconEditInfo->num;i++){ 508 509 memcpy(buffer+i2, 509 MdiInfo[WndNum] .MdiIconEditInfo->pIconImage[i],510 MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[i], 510 511 ImgBufSize[i]); 511 512 … … 538 539 if(i==-1) return 0; //ウィンドウが初期状態の場合 539 540 540 i=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[i] .title.c_str());541 i=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[i]->title.c_str()); 541 542 SendMessage(hDocCombo,CB_SETCURSEL,i,0); 542 543 SetStatusText(NULL); … … 546 547 WndNum=GetWndNum(hwnd); 547 548 if(WndNum==-1) break; 548 ResizeIconWindow(MdiInfo[WndNum] .MdiIconEditInfo->hMain,549 MdiInfo[WndNum] .MdiIconEditInfo->hToolDlg,550 MdiInfo[WndNum] .MdiIconEditInfo->hColorDlg,549 ResizeIconWindow(MdiInfo[WndNum]->MdiIconEditInfo->hMain, 550 MdiInfo[WndNum]->MdiIconEditInfo->hToolDlg, 551 MdiInfo[WndNum]->MdiIconEditInfo->hColorDlg, 551 552 LOWORD(lParam),HIWORD(lParam)); 552 553 break; -
trunk/ab5.0/abdev/abdev/IconEditor_Color.cpp
r625 r629 31 31 //透明色をクリックした場合 32 32 if(message==WM_LBUTTONDOWN) 33 MdiInfo[WndNum] .MdiIconEditInfo->MainColor=TransparentClrRef;33 MdiInfo[WndNum]->MdiIconEditInfo->MainColor=TransparentClrRef; 34 34 else 35 MdiInfo[WndNum] .MdiIconEditInfo->SubColor=TransparentClrRef;35 MdiInfo[WndNum]->MdiIconEditInfo->SubColor=TransparentClrRef; 36 36 InvalidateRect(hwnd,NULL,0); 37 37 return 1; … … 52 52 53 53 if(message==WM_LBUTTONDOWN) 54 MdiInfo[WndNum] .MdiIconEditInfo->MainColor=ColorRef;54 MdiInfo[WndNum]->MdiIconEditInfo->MainColor=ColorRef; 55 55 else 56 MdiInfo[WndNum] .MdiIconEditInfo->SubColor=ColorRef;56 MdiInfo[WndNum]->MdiIconEditInfo->SubColor=ColorRef; 57 57 58 58 InvalidateRect(hwnd,NULL,0); … … 78 78 79 79 //カラーテーブルを取得 80 pRgbq=(RGBQUAD *)(MdiInfo[WndNum] .MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]+sizeof(BITMAPINFOHEADER));80 pRgbq=(RGBQUAD *)(MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]+sizeof(BITMAPINFOHEADER)); 81 81 82 82 hdc=BeginPaint(hwnd,&ps); 83 83 hPen=CreatePen(PS_SOLID,0,RGB(0,0,0)); 84 84 hOldPen=(HPEN)SelectObject(hdc,hPen); 85 if(MdiInfo[WndNum] .MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biBitCount==4){85 if(MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biBitCount==4){ 86 86 //////// 87 87 // 16色 … … 154 154 155 155 //現在選択中のサブカラーを表示 156 hBrush=CreateSolidBrush(MdiInfo[WndNum] .MdiIconEditInfo->SubColor);156 hBrush=CreateSolidBrush(MdiInfo[WndNum]->MdiIconEditInfo->SubColor); 157 157 hOldBrush=(HBRUSH)SelectObject(hdc,hBrush); 158 158 Rectangle(hdc, … … 165 165 166 166 //現在選択中のメインカラーを表示 167 hBrush=CreateSolidBrush(MdiInfo[WndNum] .MdiIconEditInfo->MainColor);167 hBrush=CreateSolidBrush(MdiInfo[WndNum]->MdiIconEditInfo->MainColor); 168 168 hOldBrush=(HBRUSH)SelectObject(hdc,hBrush); 169 169 Rectangle(hdc, -
trunk/ab5.0/abdev/abdev/IconEditor_Main.cpp
r625 r629 15 15 if(pRect->left<0) pRect->left=0; 16 16 if(pRect->top<0) pRect->top=0; 17 if(pRect->left>=MdiInfo[WndNum] .MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biWidth)18 pRect->left=MdiInfo[WndNum] .MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biWidth-1;19 if(pRect->top>=MdiInfo[WndNum] .MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biHeight/2)20 pRect->top=MdiInfo[WndNum] .MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biHeight/2-1;17 if(pRect->left>=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biWidth) 18 pRect->left=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biWidth-1; 19 if(pRect->top>=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biHeight/2) 20 pRect->top=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biHeight/2-1; 21 21 22 22 if(pRect->right<0) pRect->right=0; 23 23 if(pRect->bottom<0) pRect->bottom=0; 24 if(pRect->right>=MdiInfo[WndNum] .MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biWidth)25 pRect->right=MdiInfo[WndNum] .MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biWidth-1;26 if(pRect->bottom>=MdiInfo[WndNum] .MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biHeight/2)27 pRect->bottom=MdiInfo[WndNum] .MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biHeight/2-1;24 if(pRect->right>=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biWidth) 25 pRect->right=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biWidth-1; 26 if(pRect->bottom>=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biHeight/2) 27 pRect->bottom=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biHeight/2-1; 28 28 } 29 29 void GetZoomedPos(POINT *pPos){ … … 35 35 36 36 if(x<0||y<0|| 37 x>=MdiInfo[WndNum] .MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biWidth||38 y>=MdiInfo[WndNum] .MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biHeight/2)37 x>=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biWidth|| 38 y>=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biHeight/2) 39 39 return; 40 40 … … 52 52 53 53 //カラーテーブルを取得 54 pRgbq=(RGBQUAD *)(MdiInfo[WndNum] .MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]+sizeof(BITMAPINFOHEADER));55 56 i2=(int)pow((double)2,(double)MdiInfo[WndNum] .MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biBitCount);54 pRgbq=(RGBQUAD *)(MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]+sizeof(BITMAPINFOHEADER)); 55 56 i2=(int)pow((double)2,(double)MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biBitCount); 57 57 for(i=0;i<i2;i++){ 58 58 if(ColorRef==RGB(pRgbq[i].rgbRed,pRgbq[i].rgbGreen,pRgbq[i].rgbBlue)) break; … … 74 74 //何も選択されていない場合は0を返す 75 75 sw=0; 76 if(MdiInfo[WndNum] .MdiIconEditInfo->SelectLevel==0) return 0;77 if(MdiInfo[WndNum] .MdiIconEditInfo->SelectLevel==1){76 if(MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel==0) return 0; 77 if(MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel==1){ 78 78 IconEdit_SelectImage(WndNum); 79 79 sw=1; 80 80 } 81 81 82 size.cx=MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.right-MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.left+1;83 size.cy=MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.bottom-MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.top+1;84 85 hDC=CreateCompatibleDC(MdiInfo[WndNum] .MdiIconEditInfo->memdc);82 size.cx=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.right-MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.left+1; 83 size.cy=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.bottom-MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.top+1; 84 85 hDC=CreateCompatibleDC(MdiInfo[WndNum]->MdiIconEditInfo->memdc); 86 86 hBmp=CreateCompatibleBitmap( 87 MdiInfo[WndNum] .MdiIconEditInfo->memdc,87 MdiInfo[WndNum]->MdiIconEditInfo->memdc, 88 88 size.cx, 89 89 size.cy); … … 91 91 92 92 BitBlt(hDC,0,0,size.cx,size.cy, 93 MdiInfo[WndNum] .MdiIconEditInfo->memdc,94 MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.left,95 MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.top,93 MdiInfo[WndNum]->MdiIconEditInfo->memdc, 94 MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.left, 95 MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.top, 96 96 SRCCOPY); 97 97 … … 99 99 100 100 if(sw){ 101 DeleteObject(MdiInfo[WndNum] .MdiIconEditInfo->hSelectingBmp);102 MdiInfo[WndNum] .MdiIconEditInfo->SelectLevel=1;101 DeleteObject(MdiInfo[WndNum]->MdiIconEditInfo->hSelectingBmp); 102 MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel=1; 103 103 } 104 104 … … 113 113 BITMAP Bitmap; 114 114 115 if(MdiInfo[WndNum] .MdiIconEditInfo->SelectLevel==2)115 if(MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel==2) 116 116 IconEdit_PasteImage(WndNum); 117 117 118 118 GetObject(hBmp,sizeof(Bitmap),&Bitmap); 119 119 120 hDC=CreateCompatibleDC(MdiInfo[WndNum] .MdiIconEditInfo->memdc);121 MdiInfo[WndNum] .MdiIconEditInfo->hSelectingBmp=122 CreateCompatibleBitmap(MdiInfo[WndNum] .MdiIconEditInfo->memdc,Bitmap.bmWidth,Bitmap.bmHeight);123 SelectObject(hDC,MdiInfo[WndNum] .MdiIconEditInfo->hSelectingBmp);124 hDC2=CreateCompatibleDC(MdiInfo[WndNum] .MdiIconEditInfo->memdc);120 hDC=CreateCompatibleDC(MdiInfo[WndNum]->MdiIconEditInfo->memdc); 121 MdiInfo[WndNum]->MdiIconEditInfo->hSelectingBmp= 122 CreateCompatibleBitmap(MdiInfo[WndNum]->MdiIconEditInfo->memdc,Bitmap.bmWidth,Bitmap.bmHeight); 123 SelectObject(hDC,MdiInfo[WndNum]->MdiIconEditInfo->hSelectingBmp); 124 hDC2=CreateCompatibleDC(MdiInfo[WndNum]->MdiIconEditInfo->memdc); 125 125 SelectObject(hDC2,hBmp); 126 126 … … 131 131 DeleteDC(hDC2); 132 132 133 MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.left=0;134 MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.top=0;135 MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.right=Bitmap.bmWidth-1;136 MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.bottom=Bitmap.bmHeight-1;137 138 InvalidateRect(MdiInfo[WndNum] .MdiIconEditInfo->hMain,NULL,0);139 140 MdiInfo[WndNum] .MdiIconEditInfo->SelectLevel=2;133 MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.left=0; 134 MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.top=0; 135 MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.right=Bitmap.bmWidth-1; 136 MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.bottom=Bitmap.bmHeight-1; 137 138 InvalidateRect(MdiInfo[WndNum]->MdiIconEditInfo->hMain,NULL,0); 139 140 MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel=2; 141 141 } 142 142 … … 145 145 HDC hDC; 146 146 147 size.cx=MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.right-MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.left+1;148 size.cy=MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.bottom-MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.top+1;149 150 hDC=CreateCompatibleDC(MdiInfo[WndNum] .MdiIconEditInfo->memdc);151 MdiInfo[WndNum] .MdiIconEditInfo->hSelectingBmp=152 CreateCompatibleBitmap(MdiInfo[WndNum] .MdiIconEditInfo->memdc,size.cx,size.cy);153 SelectObject(hDC,MdiInfo[WndNum] .MdiIconEditInfo->hSelectingBmp);147 size.cx=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.right-MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.left+1; 148 size.cy=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.bottom-MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.top+1; 149 150 hDC=CreateCompatibleDC(MdiInfo[WndNum]->MdiIconEditInfo->memdc); 151 MdiInfo[WndNum]->MdiIconEditInfo->hSelectingBmp= 152 CreateCompatibleBitmap(MdiInfo[WndNum]->MdiIconEditInfo->memdc,size.cx,size.cy); 153 SelectObject(hDC,MdiInfo[WndNum]->MdiIconEditInfo->hSelectingBmp); 154 154 BitBlt(hDC,0,0,size.cx,size.cy, 155 MdiInfo[WndNum] .MdiIconEditInfo->memdc,156 MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.left,157 MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.top,155 MdiInfo[WndNum]->MdiIconEditInfo->memdc, 156 MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.left, 157 MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.top, 158 158 SRCCOPY); 159 159 DeleteDC(hDC); 160 160 161 MdiInfo[WndNum] .MdiIconEditInfo->SelectLevel=2;161 MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel=2; 162 162 } 163 163 void IconEdit_PasteImage(int WndNum){ … … 179 179 IconEdit_NoticeChanging(WndNum); 180 180 181 GetObject(MdiInfo[WndNum] .MdiIconEditInfo->hSelectingBmp,sizeof(BITMAP),&Bitmap);181 GetObject(MdiInfo[WndNum]->MdiIconEditInfo->hSelectingBmp,sizeof(BITMAP),&Bitmap); 182 182 pSelectingBuffer=(COLORREF *)HeapAlloc(hHeap,0,Bitmap.bmWidth*Bitmap.bmHeight*sizeof(COLORREF)); 183 183 SelectingBitmapInfo.bmiHeader.biSize=sizeof(BITMAPINFOHEADER); … … 187 187 SelectingBitmapInfo.bmiHeader.biBitCount=32; 188 188 SelectingBitmapInfo.bmiHeader.biCompression=BI_RGB; 189 GetDIBits(MdiInfo[WndNum] .MdiIconEditInfo->memdc,190 MdiInfo[WndNum] .MdiIconEditInfo->hSelectingBmp,189 GetDIBits(MdiInfo[WndNum]->MdiIconEditInfo->memdc, 190 MdiInfo[WndNum]->MdiIconEditInfo->hSelectingBmp, 191 191 0,Bitmap.bmHeight, 192 192 pSelectingBuffer,&SelectingBitmapInfo,DIB_RGB_COLORS); 193 193 194 pBmpInfoHdr=(BITMAPINFOHEADER *)MdiInfo[WndNum] .MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum];194 pBmpInfoHdr=(BITMAPINFOHEADER *)MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]; 195 195 196 196 //カラーテーブルを取得 197 pRgbq=(RGBQUAD *)(MdiInfo[WndNum] .MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]+sizeof(BITMAPINFOHEADER));197 pRgbq=(RGBQUAD *)(MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]+sizeof(BITMAPINFOHEADER)); 198 198 199 199 //ビットバッファを取得 200 pBuffer=MdiInfo[WndNum] .MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]+200 pBuffer=MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]+ 201 201 sizeof(BITMAPINFOHEADER); 202 202 if(pBmpInfoHdr->biBitCount<=8) … … 206 206 pMaskBuf=pBuffer+pBmpInfoHdr->biBitCount*pBmpInfoHdr->biWidth*(pBmpInfoHdr->biHeight/2)/8; 207 207 208 for(y=MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.bottom;y>=MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.top;y--){209 for(x=MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.left;x<=MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.right;x++){208 for(y=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.bottom;y>=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.top;y--){ 209 for(x=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.left;x<=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.right;x++){ 210 210 if(x<0||y<0|| 211 x>=MdiInfo[WndNum] .MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biWidth||212 y>=MdiInfo[WndNum] .MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biHeight/2){211 x>=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biWidth|| 212 y>=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biHeight/2){ 213 213 //範囲外の場合 214 214 continue; 215 215 } 216 216 217 selecting_x=x-MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.left;218 selecting_y=y-MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.top;217 selecting_x=x-MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.left; 218 selecting_y=y-MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.top; 219 219 dwRgbq=pSelectingBuffer[(Bitmap.bmHeight-1-selecting_y)*Bitmap.bmWidth+selecting_x]; 220 220 … … 284 284 HeapDefaultFree(pSelectingBuffer); 285 285 286 DeleteObject(MdiInfo[WndNum] .MdiIconEditInfo->hSelectingBmp);287 MdiInfo[WndNum] .MdiIconEditInfo->SelectLevel=0;286 DeleteObject(MdiInfo[WndNum]->MdiIconEditInfo->hSelectingBmp); 287 MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel=0; 288 288 289 289 DrawIconToMemBmp(WndNum,0); 290 InvalidateRect(MdiInfo[WndNum] .MdiIconEditInfo->hMain,NULL,0);290 InvalidateRect(MdiInfo[WndNum]->MdiIconEditInfo->hMain,NULL,0); 291 291 } 292 292 … … 301 301 BITMAPINFOHEADER *pBmpInfoHdr; 302 302 303 pBmpInfoHdr=(BITMAPINFOHEADER *)MdiInfo[WndNum] .MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum];303 pBmpInfoHdr=(BITMAPINFOHEADER *)MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]; 304 304 305 305 if( !(pBmpInfoHdr->biBitCount == 4 || pBmpInfoHdr->biBitCount == 8 ) ){ … … 310 310 311 311 hPen=CreatePen(PS_SOLID,0,RGB(200,200,200)); 312 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum] .MdiIconEditInfo->memdc,hPen);312 hOldPen=(HPEN)SelectObject(MdiInfo[WndNum]->MdiIconEditInfo->memdc,hPen); 313 313 314 314 //カラーテーブルを取得 315 pRgbq=(RGBQUAD *)(MdiInfo[WndNum] .MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]+sizeof(BITMAPINFOHEADER));315 pRgbq=(RGBQUAD *)(MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]+sizeof(BITMAPINFOHEADER)); 316 316 317 317 //ビットバッファを取得 318 pBuffer=MdiInfo[WndNum] .MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]+318 pBuffer=MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]+ 319 319 sizeof(BITMAPINFOHEADER); 320 320 if(pBmpInfoHdr->biBitCount<=8) … … 344 344 if(i2){ 345 345 hBrush=CreateSolidBrush(TransparentClrRef); 346 hOldBrush=(HBRUSH)SelectObject(MdiInfo[WndNum] .MdiIconEditInfo->memdc,hBrush);346 hOldBrush=(HBRUSH)SelectObject(MdiInfo[WndNum]->MdiIconEditInfo->memdc,hBrush); 347 347 pos.x=x; 348 348 pos.y=y; 349 349 GetZoomedPos(&pos); 350 Rectangle(MdiInfo[WndNum] .MdiIconEditInfo->memdc,350 Rectangle(MdiInfo[WndNum]->MdiIconEditInfo->memdc, 351 351 pos.x, 352 352 pos.y, 353 353 pos.x+11, 354 354 pos.y+11); 355 SelectObject(MdiInfo[WndNum] .MdiIconEditInfo->memdc,hOldBrush);355 SelectObject(MdiInfo[WndNum]->MdiIconEditInfo->memdc,hOldBrush); 356 356 DeleteObject(hBrush); 357 357 358 SetPixel(MdiInfo[WndNum] .MdiIconEditInfo->memdc,x,y,TransparentClrRef);358 SetPixel(MdiInfo[WndNum]->MdiIconEditInfo->memdc,x,y,TransparentClrRef); 359 359 continue; 360 360 } … … 377 377 378 378 hBrush=CreateSolidBrush(ColorRef); 379 hOldBrush=(HBRUSH)SelectObject(MdiInfo[WndNum] .MdiIconEditInfo->memdc,hBrush);379 hOldBrush=(HBRUSH)SelectObject(MdiInfo[WndNum]->MdiIconEditInfo->memdc,hBrush); 380 380 pos.x=x; 381 381 pos.y=y; 382 382 GetZoomedPos(&pos); 383 Rectangle(MdiInfo[WndNum] .MdiIconEditInfo->memdc,383 Rectangle(MdiInfo[WndNum]->MdiIconEditInfo->memdc, 384 384 pos.x, 385 385 pos.y, 386 386 pos.x+11, 387 387 pos.y+11); 388 SelectObject(MdiInfo[WndNum] .MdiIconEditInfo->memdc,hOldBrush);388 SelectObject(MdiInfo[WndNum]->MdiIconEditInfo->memdc,hOldBrush); 389 389 DeleteObject(hBrush); 390 390 391 SetPixel(MdiInfo[WndNum] .MdiIconEditInfo->memdc,x,y,ColorRef);392 } 393 } 394 395 SelectObject(MdiInfo[WndNum] .MdiIconEditInfo->memdc,hOldPen);391 SetPixel(MdiInfo[WndNum]->MdiIconEditInfo->memdc,x,y,ColorRef); 392 } 393 } 394 395 SelectObject(MdiInfo[WndNum]->MdiIconEditInfo->memdc,hOldPen); 396 396 DeleteObject(hPen); 397 397 } … … 404 404 405 405 if(x<0||y<0) return; 406 if(x>=MdiInfo[WndNum] .MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biWidth||407 y>=MdiInfo[WndNum] .MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biHeight/2)406 if(x>=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biWidth|| 407 y>=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biHeight/2) 408 408 return; 409 409 410 pBmpInfoHdr=(BITMAPINFOHEADER *)MdiInfo[WndNum] .MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum];411 412 pBuffer=MdiInfo[WndNum] .MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]+410 pBmpInfoHdr=(BITMAPINFOHEADER *)MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]; 411 412 pBuffer=MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]+ 413 413 sizeof(BITMAPINFOHEADER); 414 414 pBuffer+=sizeof(DWORD)*(int)pow((double)2,(double)pBmpInfoHdr->biBitCount); … … 466 466 467 467 if(x<0||y<0) return 0; 468 if(x>=MdiInfo[WndNum] .MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biWidth||469 y>=MdiInfo[WndNum] .MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biHeight/2)468 if(x>=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biWidth|| 469 y>=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biHeight/2) 470 470 return 0; 471 471 472 pBmpInfoHdr=(BITMAPINFOHEADER *)MdiInfo[WndNum] .MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum];472 pBmpInfoHdr=(BITMAPINFOHEADER *)MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]; 473 473 474 474 //カラーテーブルを取得 475 pRgbq=(RGBQUAD *)(MdiInfo[WndNum] .MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]+sizeof(BITMAPINFOHEADER));475 pRgbq=(RGBQUAD *)(MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]+sizeof(BITMAPINFOHEADER)); 476 476 477 477 //通常バッファを取得 478 pBuffer=MdiInfo[WndNum] .MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]+478 pBuffer=MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]+ 479 479 sizeof(BITMAPINFOHEADER)+ 480 480 sizeof(DWORD)*(int)pow((double)2,(double)pBmpInfoHdr->biBitCount); … … 567 567 568 568 if(x<0||y<0) return; 569 if(x>=MdiInfo[WndNum] .MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biWidth||570 y>=MdiInfo[WndNum] .MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]->biHeight/2)569 if(x>=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biWidth|| 570 y>=MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]->biHeight/2) 571 571 return; 572 572 … … 676 676 pRect->right, 677 677 pRect->bottom, 678 GetColorCode(WndNum,MdiInfo[WndNum] .MdiIconEditInfo->SubColor),679 GetColorCode(WndNum,MdiInfo[WndNum] .MdiIconEditInfo->SubColor),1);678 GetColorCode(WndNum,MdiInfo[WndNum]->MdiIconEditInfo->SubColor), 679 GetColorCode(WndNum,MdiInfo[WndNum]->MdiIconEditInfo->SubColor),1); 680 680 681 681 DrawIconToMemBmp(WndNum,0); 682 InvalidateRect(MdiInfo[WndNum] .MdiIconEditInfo->hMain,NULL,0);682 InvalidateRect(MdiInfo[WndNum]->MdiIconEditInfo->hMain,NULL,0); 683 683 } 684 684 … … 697 697 //以前の選択フレームを消去 698 698 BITMAPINFOHEADER *pBmpInfoHdr; 699 pBmpInfoHdr=(BITMAPINFOHEADER *)MdiInfo[WndNum] .MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum];699 pBmpInfoHdr=(BITMAPINFOHEADER *)MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]; 700 700 pos.x=pBmpInfoHdr->biWidth; 701 701 pos.y=pBmpInfoHdr->biHeight/2; 702 702 GetZoomedPos(&pos); 703 BitBlt(hdc,0,0,pos.x,pos.y,MdiInfo[WndNum] .MdiIconEditInfo->memdc,0,0,SRCCOPY);703 BitBlt(hdc,0,0,pos.x,pos.y,MdiInfo[WndNum]->MdiIconEditInfo->memdc,0,0,SRCCOPY); 704 704 705 705 … … 735 735 RECT rect; 736 736 737 rect.left=MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.left*PIXEL_WIDTH+ZOOMED_XPOS;738 rect.top=MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.top*PIXEL_WIDTH;739 rect.right=(MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.right+1)*PIXEL_WIDTH+ZOOMED_XPOS+1;740 rect.bottom=(MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.bottom+1)*PIXEL_WIDTH+1;737 rect.left=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.left*PIXEL_WIDTH+ZOOMED_XPOS; 738 rect.top=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.top*PIXEL_WIDTH; 739 rect.right=(MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.right+1)*PIXEL_WIDTH+ZOOMED_XPOS+1; 740 rect.bottom=(MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.bottom+1)*PIXEL_WIDTH+1; 741 741 742 742 SetBkMode(hdc,TRANSPARENT); … … 810 810 COLORREF *pSelectingBuffer; 811 811 812 GetObject(MdiInfo[WndNum] .MdiIconEditInfo->hSelectingBmp,sizeof(BITMAP),&Bitmap);812 GetObject(MdiInfo[WndNum]->MdiIconEditInfo->hSelectingBmp,sizeof(BITMAP),&Bitmap); 813 813 pSelectingBuffer=(COLORREF *)HeapAlloc(hHeap,0,Bitmap.bmWidth*Bitmap.bmHeight*sizeof(COLORREF)); 814 814 SelectingBitmapInfo.bmiHeader.biSize=sizeof(BITMAPINFOHEADER); … … 818 818 SelectingBitmapInfo.bmiHeader.biBitCount=32; 819 819 SelectingBitmapInfo.bmiHeader.biCompression=BI_RGB; 820 GetDIBits(MdiInfo[WndNum] .MdiIconEditInfo->memdc,821 MdiInfo[WndNum] .MdiIconEditInfo->hSelectingBmp,820 GetDIBits(MdiInfo[WndNum]->MdiIconEditInfo->memdc, 821 MdiInfo[WndNum]->MdiIconEditInfo->hSelectingBmp, 822 822 0,Bitmap.bmHeight, 823 823 pSelectingBuffer,&SelectingBitmapInfo,DIB_RGB_COLORS); … … 855 855 RECT rect; 856 856 857 pos.x=MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.left;858 pos.y=MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.top;857 pos.x=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.left; 858 pos.y=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.top; 859 859 GetZoomedPos(&pos); 860 860 rect.left=pos.x; 861 861 rect.top=pos.y; 862 pos.x=MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.right+1;863 pos.y=MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.bottom+1;862 pos.x=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.right+1; 863 pos.y=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.bottom+1; 864 864 GetZoomedPos(&pos); 865 865 rect.right=pos.x; … … 878 878 POINT pos; 879 879 880 size.cx=MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.right-MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.left;881 size.cy=MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.bottom-MdiInfo[WndNum].MdiIconEditInfo->DraggingRect.top;882 hDC2=CreateCompatibleDC(MdiInfo[WndNum] .MdiIconEditInfo->memdc);883 SelectObject(hDC2,MdiInfo[WndNum] .MdiIconEditInfo->hSelectingBmp);880 size.cx=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.right-MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.left; 881 size.cy=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.bottom-MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.top; 882 hDC2=CreateCompatibleDC(MdiInfo[WndNum]->MdiIconEditInfo->memdc); 883 SelectObject(hDC2,MdiInfo[WndNum]->MdiIconEditInfo->hSelectingBmp); 884 884 BitBlt(hdc, 885 MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.left,886 MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.top,885 MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.left, 886 MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.top, 887 887 size.cx,size.cy, 888 888 hDC2,0,0,SRCCOPY); … … 890 890 891 891 //拡大選択イメージを表示 892 pos.x=MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.left;893 pos.y=MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.top;892 pos.x=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.left; 893 pos.y=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.top; 894 894 DrawZoomedBitmap(hdc,WndNum,&pos); 895 895 } … … 1140 1140 if(message==WM_LBUTTONDOWN){ 1141 1141 dwDrag=1; 1142 MainClrRef=MdiInfo[WndNum] .MdiIconEditInfo->MainColor;1143 SubClrRef=MdiInfo[WndNum] .MdiIconEditInfo->SubColor;1142 MainClrRef=MdiInfo[WndNum]->MdiIconEditInfo->MainColor; 1143 SubClrRef=MdiInfo[WndNum]->MdiIconEditInfo->SubColor; 1144 1144 } 1145 1145 else{ 1146 1146 dwDrag=2; 1147 MainClrRef=MdiInfo[WndNum] .MdiIconEditInfo->SubColor;1148 SubClrRef=MdiInfo[WndNum] .MdiIconEditInfo->MainColor;1149 } 1150 1151 if(MdiInfo[WndNum] .MdiIconEditInfo->NowTool==IDC_TOOL_SELECT){1147 MainClrRef=MdiInfo[WndNum]->MdiIconEditInfo->SubColor; 1148 SubClrRef=MdiInfo[WndNum]->MdiIconEditInfo->MainColor; 1149 } 1150 1151 if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_SELECT){ 1152 1152 if(dwDrag==2){ 1153 1153 dwDrag=0; … … 1156 1156 } 1157 1157 1158 if(MdiInfo[WndNum] .MdiIconEditInfo->SelectLevel){1158 if(MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel){ 1159 1159 NowDragging=IconEdit_GetStateOfDraggingFrame(WndNum,LOWORD(lParam),HIWORD(lParam)); 1160 1160 if(NowDragging==0){ 1161 if(MdiInfo[WndNum] .MdiIconEditInfo->SelectLevel==1){1162 MdiInfo[WndNum] .MdiIconEditInfo->SelectLevel=0;1161 if(MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel==1){ 1162 MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel=0; 1163 1163 InvalidateRect(hwnd,NULL,0); 1164 1164 } 1165 else if(MdiInfo[WndNum] .MdiIconEditInfo->SelectLevel==2)1165 else if(MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel==2) 1166 1166 IconEdit_PasteImage(WndNum); 1167 1167 … … 1169 1169 } 1170 1170 else if(NowDragging==FRAME_INSIDE){ 1171 if(MdiInfo[WndNum] .MdiIconEditInfo->SelectLevel==1){1171 if(MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel==1){ 1172 1172 IconEdit_SelectImage(WndNum); 1173 IconEdit_EraseRect(WndNum,&MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect);1173 IconEdit_EraseRect(WndNum,&MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect); 1174 1174 } 1175 1175 1176 OldRect=MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect;1176 OldRect=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect; 1177 1177 } 1178 1178 } … … 1185 1185 InvalidateRect(hwnd,NULL,0); 1186 1186 } 1187 else if(MdiInfo[WndNum] .MdiIconEditInfo->NowTool==IDC_TOOL_PEN){1187 else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_PEN){ 1188 1188 //変更情報 1189 1189 IconEdit_NoticeChanging(WndNum); … … 1201 1201 SetCursor(LoadCursor(hResInst,MAKEINTRESOURCE(IDC_CURSOR_PEN))); 1202 1202 } 1203 else if(MdiInfo[WndNum] .MdiIconEditInfo->NowTool==IDC_TOOL_FILL){1203 else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_FILL){ 1204 1204 //変更情報 1205 1205 IconEdit_NoticeChanging(WndNum); … … 1216 1216 SetCursor(LoadCursor(hResInst,MAKEINTRESOURCE(IDC_CURSOR_FILL))); 1217 1217 } 1218 else if(MdiInfo[WndNum] .MdiIconEditInfo->NowTool==IDC_TOOL_LINE||1219 MdiInfo[WndNum] .MdiIconEditInfo->NowTool==IDC_TOOL_RECTANGLE||1220 MdiInfo[WndNum] .MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT||1221 MdiInfo[WndNum] .MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT2||1222 MdiInfo[WndNum] .MdiIconEditInfo->NowTool==IDC_TOOL_ELLIPSE){1218 else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_LINE|| 1219 MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_RECTANGLE|| 1220 MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT|| 1221 MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT2|| 1222 MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_ELLIPSE){ 1223 1223 hdc=GetDC(hwnd); 1224 1224 TempLine(hdc,WndNum,pos.x,pos.y,pos.x,pos.y,MainClrRef); … … 1242 1242 1243 1243 if(dwDrag==1){ 1244 MainClrRef=MdiInfo[WndNum] .MdiIconEditInfo->MainColor;1245 SubClrRef=MdiInfo[WndNum] .MdiIconEditInfo->SubColor;1244 MainClrRef=MdiInfo[WndNum]->MdiIconEditInfo->MainColor; 1245 SubClrRef=MdiInfo[WndNum]->MdiIconEditInfo->SubColor; 1246 1246 } 1247 1247 else{ 1248 MainClrRef=MdiInfo[WndNum] .MdiIconEditInfo->SubColor;1249 SubClrRef=MdiInfo[WndNum] .MdiIconEditInfo->MainColor;1248 MainClrRef=MdiInfo[WndNum]->MdiIconEditInfo->SubColor; 1249 SubClrRef=MdiInfo[WndNum]->MdiIconEditInfo->MainColor; 1250 1250 } 1251 1251 … … 1254 1254 1255 1255 bRedrawMemBmp=0; 1256 if(MdiInfo[WndNum] .MdiIconEditInfo->NowTool==IDC_TOOL_SELECT){1256 if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_SELECT){ 1257 1257 if(NowDragging==SELECTING_FRAME){ 1258 1258 if(LastPos.x==pos.x&&LastPos.y==pos.y){ … … 1265 1265 rect.bottom=pos.y; 1266 1266 1267 RectNaturalFormat(&rect,&MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect);1268 LimitRectFormat(WndNum,&MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect);1269 MdiInfo[WndNum] .MdiIconEditInfo->SelectLevel=1;1267 RectNaturalFormat(&rect,&MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect); 1268 LimitRectFormat(WndNum,&MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect); 1269 MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel=1; 1270 1270 InvalidateRect(hwnd,NULL,0); 1271 1271 } … … 1273 1273 InvalidateRect(hwnd,NULL,0); 1274 1274 } 1275 else if(MdiInfo[WndNum] .MdiIconEditInfo->NowTool==IDC_TOOL_LINE){1275 else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_LINE){ 1276 1276 //変更情報 1277 1277 IconEdit_NoticeChanging(WndNum); … … 1281 1281 bRedrawMemBmp=1; 1282 1282 } 1283 else if(MdiInfo[WndNum] .MdiIconEditInfo->NowTool==IDC_TOOL_RECTANGLE){1283 else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_RECTANGLE){ 1284 1284 //変更情報 1285 1285 IconEdit_NoticeChanging(WndNum); … … 1289 1289 bRedrawMemBmp=1; 1290 1290 } 1291 else if(MdiInfo[WndNum] .MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT){1291 else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT){ 1292 1292 //変更情報 1293 1293 IconEdit_NoticeChanging(WndNum); … … 1299 1299 bRedrawMemBmp=1; 1300 1300 } 1301 else if(MdiInfo[WndNum] .MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT2){1301 else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT2){ 1302 1302 //変更情報 1303 1303 IconEdit_NoticeChanging(WndNum); … … 1309 1309 bRedrawMemBmp=1; 1310 1310 } 1311 else if(MdiInfo[WndNum] .MdiIconEditInfo->NowTool==IDC_TOOL_ELLIPSE){1311 else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_ELLIPSE){ 1312 1312 //変更情報 1313 1313 IconEdit_NoticeChanging(WndNum); … … 1337 1337 1338 1338 if(dwDrag==1){ 1339 MainClrRef=MdiInfo[WndNum] .MdiIconEditInfo->MainColor;1340 SubClrRef=MdiInfo[WndNum] .MdiIconEditInfo->SubColor;1339 MainClrRef=MdiInfo[WndNum]->MdiIconEditInfo->MainColor; 1340 SubClrRef=MdiInfo[WndNum]->MdiIconEditInfo->SubColor; 1341 1341 } 1342 1342 else{ 1343 MainClrRef=MdiInfo[WndNum] .MdiIconEditInfo->SubColor;1344 SubClrRef=MdiInfo[WndNum] .MdiIconEditInfo->MainColor;1343 MainClrRef=MdiInfo[WndNum]->MdiIconEditInfo->SubColor; 1344 SubClrRef=MdiInfo[WndNum]->MdiIconEditInfo->MainColor; 1345 1345 } 1346 1346 1347 1347 if(dwDrag){ 1348 if(MdiInfo[WndNum] .MdiIconEditInfo->NowTool==IDC_TOOL_SELECT){1348 if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_SELECT){ 1349 1349 if(NowDragging==SELECTING_FRAME){ 1350 1350 //範囲選択中 … … 1361 1361 dx=pos.x-LastPos.x; 1362 1362 dy=pos.y-LastPos.y; 1363 MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.left+=dx;1364 MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.right+=dx;1365 MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.top+=dy;1366 MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.bottom+=dy;1363 MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.left+=dx; 1364 MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.right+=dx; 1365 MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.top+=dy; 1366 MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.bottom+=dy; 1367 1367 LastPos=pos; 1368 1368 … … 1376 1376 1377 1377 hRgn=CreateRectRgnIndirect(&OldRect); 1378 hRgn2=CreateRectRgnIndirect(&MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect);1378 hRgn2=CreateRectRgnIndirect(&MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect); 1379 1379 CombineRgn(hRgn,hRgn,hRgn2,RGN_XOR); 1380 1380 DeleteObject(hRgn2); … … 1394 1394 DeleteObject(hRgn2); 1395 1395 1396 p2.x=MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.left;1397 p2.y=MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.top;1396 p2.x=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.left; 1397 p2.y=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.top; 1398 1398 GetZoomedPos(&p2); 1399 1399 rect.left=p2.x; 1400 1400 rect.top=p2.y; 1401 p2.x=MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.right;1402 p2.y=MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect.bottom;1401 p2.x=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.right; 1402 p2.y=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect.bottom; 1403 1403 GetZoomedPos(&p2); 1404 1404 rect.right=p2.x+1; … … 1415 1415 ReleaseDC(hwnd,hdc); 1416 1416 1417 OldRect=MdiInfo[WndNum] .MdiIconEditInfo->DraggingRect;1417 OldRect=MdiInfo[WndNum]->MdiIconEditInfo->DraggingRect; 1418 1418 } 1419 1419 } 1420 else if(MdiInfo[WndNum] .MdiIconEditInfo->NowTool==IDC_TOOL_PEN){1420 else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_PEN){ 1421 1421 if(abs(pos.x-LastPos.x)>1||abs(pos.y-LastPos.y)>1){ 1422 1422 IconEdit_DrawLine(WndNum,LastPos.x,LastPos.y,pos.x,pos.y,GetColorCode(WndNum,MainClrRef)); … … 1442 1442 LastPos=pos; 1443 1443 } 1444 else if(MdiInfo[WndNum] .MdiIconEditInfo->NowTool==IDC_TOOL_LINE){1444 else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_LINE){ 1445 1445 InvalidateRect(hwnd,NULL,0); 1446 1446 UpdateWindow(hwnd); … … 1450 1450 ReleaseDC(hwnd,hdc); 1451 1451 } 1452 else if(MdiInfo[WndNum] .MdiIconEditInfo->NowTool==IDC_TOOL_RECTANGLE){1452 else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_RECTANGLE){ 1453 1453 InvalidateRect(hwnd,NULL,0); 1454 1454 UpdateWindow(hwnd); … … 1458 1458 ReleaseDC(hwnd,hdc); 1459 1459 } 1460 else if(MdiInfo[WndNum] .MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT){1460 else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT){ 1461 1461 InvalidateRect(hwnd,NULL,0); 1462 1462 UpdateWindow(hwnd); … … 1468 1468 ReleaseDC(hwnd,hdc); 1469 1469 } 1470 else if(MdiInfo[WndNum] .MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT2){1470 else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT2){ 1471 1471 InvalidateRect(hwnd,NULL,0); 1472 1472 UpdateWindow(hwnd); … … 1478 1478 ReleaseDC(hwnd,hdc); 1479 1479 } 1480 else if(MdiInfo[WndNum] .MdiIconEditInfo->NowTool==IDC_TOOL_ELLIPSE){1480 else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_ELLIPSE){ 1481 1481 InvalidateRect(hwnd,NULL,0); 1482 1482 UpdateWindow(hwnd); … … 1489 1489 else{ 1490 1490 //ドラッグ中でないとき 1491 if(MdiInfo[WndNum] .MdiIconEditInfo->NowTool==IDC_TOOL_SELECT){1492 if(MdiInfo[WndNum] .MdiIconEditInfo->SelectLevel)1491 if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_SELECT){ 1492 if(MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel) 1493 1493 SetCursorByState(IconEdit_GetStateOfDraggingFrame(WndNum,LOWORD(lParam),HIWORD(lParam))); 1494 1494 else 1495 1495 SetCursor(LoadCursor(NULL,IDC_CROSS)); 1496 1496 } 1497 else if(MdiInfo[WndNum] .MdiIconEditInfo->NowTool==IDC_TOOL_PEN)1497 else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_PEN) 1498 1498 SetCursor(LoadCursor(hResInst,MAKEINTRESOURCE(IDC_CURSOR_PEN))); 1499 else if(MdiInfo[WndNum] .MdiIconEditInfo->NowTool==IDC_TOOL_FILL)1499 else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_FILL) 1500 1500 SetCursor(LoadCursor(hResInst,MAKEINTRESOURCE(IDC_CURSOR_FILL))); 1501 else if(MdiInfo[WndNum] .MdiIconEditInfo->NowTool==IDC_TOOL_LINE||1502 MdiInfo[WndNum] .MdiIconEditInfo->NowTool==IDC_TOOL_RECTANGLE||1503 MdiInfo[WndNum] .MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT||1504 MdiInfo[WndNum] .MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT2||1505 MdiInfo[WndNum] .MdiIconEditInfo->NowTool==IDC_TOOL_ELLIPSE){1501 else if(MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_LINE|| 1502 MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_RECTANGLE|| 1503 MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT|| 1504 MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_FILLRECT2|| 1505 MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_ELLIPSE){ 1506 1506 SetCursor(LoadCursor(NULL,IDC_CROSS)); 1507 1507 } … … 1512 1512 case VK_ESCAPE: 1513 1513 WndNum=GetWndNum(GetParent(hwnd)); 1514 if(MdiInfo[WndNum] .MdiIconEditInfo->SelectLevel==2){1515 DeleteObject(MdiInfo[WndNum] .MdiIconEditInfo->hSelectingBmp);1516 MdiInfo[WndNum] .MdiIconEditInfo->SelectLevel=0;1514 if(MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel==2){ 1515 DeleteObject(MdiInfo[WndNum]->MdiIconEditInfo->hSelectingBmp); 1516 MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel=0; 1517 1517 } 1518 1518 InvalidateRect(hwnd,NULL,0); … … 1526 1526 WndNum=GetWndNum(GetParent(hwnd)); 1527 1527 BITMAPINFOHEADER *pBmpInfoHdr; 1528 pBmpInfoHdr=(BITMAPINFOHEADER *)MdiInfo[WndNum] .MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum];1528 pBmpInfoHdr=(BITMAPINFOHEADER *)MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]; 1529 1529 1530 1530 hdc=BeginPaint(hwnd,&ps); … … 1537 1537 size.cx, 1538 1538 size.cy, 1539 MdiInfo[WndNum] .MdiIconEditInfo->memdc,0,0,SRCCOPY);1539 MdiInfo[WndNum]->MdiIconEditInfo->memdc,0,0,SRCCOPY); 1540 1540 1541 1541 HBRUSH hOldBrush; … … 1550 1550 PATCOPY); 1551 1551 1552 if(MdiInfo[WndNum] .MdiIconEditInfo->SelectLevel==1)1552 if(MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel==1) 1553 1553 IconEdit_DrawSelectingRect(hdc,WndNum); 1554 if(MdiInfo[WndNum] .MdiIconEditInfo->SelectLevel==2){1554 if(MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel==2){ 1555 1555 DrawSelectingImage(hdc,WndNum); 1556 1556 if(dwDrag==0) IconEdit_DrawSelectingRect(hdc,WndNum); -
trunk/ab5.0/abdev/abdev/IconEditor_Tool.cpp
r625 r629 80 80 WndNum=GetWndNum(GetParent(GetParent(hwnd))); 81 81 if(LOWORD(wParam)!=IDC_TOOL_SELECT&& 82 MdiInfo[WndNum] .MdiIconEditInfo->NowTool==IDC_TOOL_SELECT){83 MdiInfo[WndNum] .MdiIconEditInfo->NowTool=LOWORD(wParam);84 if(MdiInfo[WndNum] .MdiIconEditInfo->SelectLevel){85 if(MdiInfo[WndNum] .MdiIconEditInfo->SelectLevel==2)86 DeleteObject(MdiInfo[WndNum] .MdiIconEditInfo->hSelectingBmp);87 MdiInfo[WndNum] .MdiIconEditInfo->SelectLevel=0;82 MdiInfo[WndNum]->MdiIconEditInfo->NowTool==IDC_TOOL_SELECT){ 83 MdiInfo[WndNum]->MdiIconEditInfo->NowTool=LOWORD(wParam); 84 if(MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel){ 85 if(MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel==2) 86 DeleteObject(MdiInfo[WndNum]->MdiIconEditInfo->hSelectingBmp); 87 MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel=0; 88 88 } 89 InvalidateRect(MdiInfo[WndNum] .MdiIconEditInfo->hMain,NULL,0);89 InvalidateRect(MdiInfo[WndNum]->MdiIconEditInfo->hMain,NULL,0); 90 90 } 91 else MdiInfo[WndNum] .MdiIconEditInfo->NowTool=LOWORD(wParam);91 else MdiInfo[WndNum]->MdiIconEditInfo->NowTool=LOWORD(wParam); 92 92 return 1; 93 93 } … … 116 116 117 117 memset(bExist,0,sizeof(BOOL)*4); 118 for(i=0;i<MdiInfo[WndNum] .MdiIconEditInfo->num;i++){119 if(MdiInfo[WndNum] .MdiIconEditInfo->pBmpHdr[i]->biWidth==16&&120 MdiInfo[WndNum] .MdiIconEditInfo->pBmpHdr[i]->biBitCount==4){118 for(i=0;i<MdiInfo[WndNum]->MdiIconEditInfo->num;i++){ 119 if(MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[i]->biWidth==16&& 120 MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[i]->biBitCount==4){ 121 121 bExist[0]=1; 122 122 } 123 if(MdiInfo[WndNum] .MdiIconEditInfo->pBmpHdr[i]->biWidth==16&&124 MdiInfo[WndNum] .MdiIconEditInfo->pBmpHdr[i]->biBitCount==8){123 if(MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[i]->biWidth==16&& 124 MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[i]->biBitCount==8){ 125 125 bExist[1]=1; 126 126 } 127 if(MdiInfo[WndNum] .MdiIconEditInfo->pBmpHdr[i]->biWidth==32&&128 MdiInfo[WndNum] .MdiIconEditInfo->pBmpHdr[i]->biBitCount==4){127 if(MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[i]->biWidth==32&& 128 MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[i]->biBitCount==4){ 129 129 bExist[2]=1; 130 130 } 131 if(MdiInfo[WndNum] .MdiIconEditInfo->pBmpHdr[i]->biWidth==32&&132 MdiInfo[WndNum] .MdiIconEditInfo->pBmpHdr[i]->biBitCount==8){131 if(MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[i]->biWidth==32&& 132 MdiInfo[WndNum]->MdiIconEditInfo->pBmpHdr[i]->biBitCount==8){ 133 133 bExist[3]=1; 134 134 } … … 196 196 DeleteIconType(WndNum); 197 197 198 if(MdiInfo[WndNum] .MdiIconEditInfo->num<=1)198 if(MdiInfo[WndNum]->MdiIconEditInfo->num<=1) 199 199 EnableWindow(GetDlgItem(hwnd,IDC_DELETE_ICONTYPE),0); 200 200 return 1; … … 204 204 205 205 //イメージ選択用のメモリを解放 206 if(MdiInfo[WndNum] .MdiIconEditInfo->SelectLevel==2)207 DeleteObject(MdiInfo[WndNum] .MdiIconEditInfo->hSelectingBmp);208 MdiInfo[WndNum] .MdiIconEditInfo->SelectLevel=0;209 210 MdiInfo[WndNum] .MdiIconEditInfo->SelectIconNum=206 if(MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel==2) 207 DeleteObject(MdiInfo[WndNum]->MdiIconEditInfo->hSelectingBmp); 208 MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel=0; 209 210 MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum= 211 211 SendDlgItemMessage(hwnd,IDC_ICONTYPECOMBO,CB_GETCURSEL,0,0); 212 212 213 213 HBRUSH hOldBrush; 214 hOldBrush=(HBRUSH)SelectObject(MdiInfo[WndNum] .MdiIconEditInfo->memdc,GetStockObject(WHITE_BRUSH));215 PatBlt(MdiInfo[WndNum] .MdiIconEditInfo->memdc,0,0,400,400,PATCOPY);216 SelectObject(MdiInfo[WndNum] .MdiIconEditInfo->memdc,hOldBrush);214 hOldBrush=(HBRUSH)SelectObject(MdiInfo[WndNum]->MdiIconEditInfo->memdc,GetStockObject(WHITE_BRUSH)); 215 PatBlt(MdiInfo[WndNum]->MdiIconEditInfo->memdc,0,0,400,400,PATCOPY); 216 SelectObject(MdiInfo[WndNum]->MdiIconEditInfo->memdc,hOldBrush); 217 217 DrawIconToMemBmp(WndNum,0); 218 218 219 InvalidateRect(MdiInfo[WndNum] .MdiIconEditInfo->hMain,NULL,1);220 InvalidateRect(MdiInfo[WndNum] .MdiIconEditInfo->hColorDlg,NULL,0);219 InvalidateRect(MdiInfo[WndNum]->MdiIconEditInfo->hMain,NULL,1); 220 InvalidateRect(MdiInfo[WndNum]->MdiIconEditInfo->hColorDlg,NULL,0); 221 221 } 222 222 return 1; -
trunk/ab5.0/abdev/abdev/IconEditor_UndoRedo.cpp
r625 r629 8 8 ICONEDIT_UNDOSTATE *pUndoState; 9 9 10 pUndoState=&MdiInfo[WndNum] .MdiIconEditInfo->undo[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum];10 pUndoState=&MdiInfo[WndNum]->MdiIconEditInfo->undo[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]; 11 11 12 12 i=pUndoState->NowPos-1; … … 18 18 pUndoState->NowPos=i; 19 19 20 pByte=MdiInfo[WndNum] .MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum];21 MdiInfo[WndNum] .MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]=20 pByte=MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]; 21 MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]= 22 22 pUndoState->lpData[i]; 23 23 pUndoState->lpData[i]=pByte; 24 24 25 25 //選択フレームを消去 26 if(MdiInfo[WndNum] .MdiIconEditInfo->SelectLevel==2){27 DeleteObject(MdiInfo[WndNum] .MdiIconEditInfo->hSelectingBmp);28 MdiInfo[WndNum] .MdiIconEditInfo->SelectLevel=0;26 if(MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel==2){ 27 DeleteObject(MdiInfo[WndNum]->MdiIconEditInfo->hSelectingBmp); 28 MdiInfo[WndNum]->MdiIconEditInfo->SelectLevel=0; 29 29 } 30 30 31 31 //再描画 32 32 DrawIconToMemBmp(WndNum,0); 33 InvalidateRect(MdiInfo[WndNum] .MdiIconEditInfo->hMain,NULL,0);33 InvalidateRect(MdiInfo[WndNum]->MdiIconEditInfo->hMain,NULL,0); 34 34 35 MdiInfo[WndNum] .MdiIconEditInfo->bModify=1;35 MdiInfo[WndNum]->MdiIconEditInfo->bModify=1; 36 36 37 37 //メニューを有効化 … … 42 42 ICONEDIT_UNDOSTATE *pUndoState; 43 43 44 pUndoState=&MdiInfo[WndNum] .MdiIconEditInfo->undo[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum];44 pUndoState=&MdiInfo[WndNum]->MdiIconEditInfo->undo[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]; 45 45 46 46 if(!pUndoState->lpData[pUndoState->NowPos]){ … … 49 49 } 50 50 51 pByte=MdiInfo[WndNum] .MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum];52 MdiInfo[WndNum] .MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]=51 pByte=MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]; 52 MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]= 53 53 pUndoState->lpData[pUndoState->NowPos]; 54 54 pUndoState->lpData[pUndoState->NowPos]=pByte; 55 55 56 56 DrawIconToMemBmp(WndNum,0); 57 InvalidateRect(MdiInfo[WndNum] .MdiIconEditInfo->hMain,NULL,0);57 InvalidateRect(MdiInfo[WndNum]->MdiIconEditInfo->hMain,NULL,0); 58 58 59 59 pUndoState->NowPos++; 60 60 if(pUndoState->NowPos==MAX_ICONEDIT_UNDONUM) pUndoState->NowPos=0; 61 61 62 MdiInfo[WndNum] .MdiIconEditInfo->bModify=1;62 MdiInfo[WndNum]->MdiIconEditInfo->bModify=1; 63 63 64 64 ResetState_UndoMenu(); … … 69 69 ICONEDIT_UNDOSTATE *pUndoState; 70 70 71 pUndoState=&MdiInfo[WndNum] .MdiIconEditInfo->undo[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum];71 pUndoState=&MdiInfo[WndNum]->MdiIconEditInfo->undo[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]; 72 72 73 73 //Redoされた場合の不要なデータを削除する … … 80 80 81 81 pUndoState->lpData[pUndoState->NowPos]=(BYTE *) 82 HeapAlloc(hHeap,0,MdiInfo[WndNum] .MdiIconEditInfo->dwBytesInRes[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]);82 HeapAlloc(hHeap,0,MdiInfo[WndNum]->MdiIconEditInfo->dwBytesInRes[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]); 83 83 84 84 memcpy(pUndoState->lpData[pUndoState->NowPos], 85 MdiInfo[WndNum] .MdiIconEditInfo->pIconImage[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum],86 MdiInfo[WndNum] .MdiIconEditInfo->dwBytesInRes[MdiInfo[WndNum].MdiIconEditInfo->SelectIconNum]);85 MdiInfo[WndNum]->MdiIconEditInfo->pIconImage[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum], 86 MdiInfo[WndNum]->MdiIconEditInfo->dwBytesInRes[MdiInfo[WndNum]->MdiIconEditInfo->SelectIconNum]); 87 87 88 88 pUndoState->NowPos++; … … 94 94 } 95 95 96 MdiInfo[WndNum] .MdiIconEditInfo->bModify=1;96 MdiInfo[WndNum]->MdiIconEditInfo->bModify=1; 97 97 98 98 ResetState_UndoMenu(); -
trunk/ab5.0/abdev/abdev/MenuProc.cpp
r626 r629 121 121 // ウィンドウ プロパティを更新 122 122 for(i=0;i<MdiInfo.size();i++){ 123 if(MdiInfo[i] .hwnd&&MdiInfo[i].DocType==WNDTYPE_RAD){124 if(MdiInfo[i] .MdiRadInfo->SelectingItem[0]==SELECT_WINDOW)125 ChangePropertyWindow(i,GetWndInfoNum(MdiInfo[i] .path));123 if(MdiInfo[i]->hwnd&&MdiInfo[i]->DocType==WNDTYPE_RAD){ 124 if(MdiInfo[i]->MdiRadInfo->SelectingItem[0]==SELECT_WINDOW) 125 ChangePropertyWindow(i,GetWndInfoNum(MdiInfo[i]->path)); 126 126 } 127 127 } … … 135 135 //ウィンドウが開かれている場合は閉じる 136 136 for(i=0;i<MdiInfo.size();i++){ 137 if(MdiInfo[i] .hwnd&&lstrcmpi(projectInfo.pMenuInfo[MenuInfoNum].IdName,MdiInfo[i].path.c_str())==0){138 SendMessage(MdiInfo[i] .hwnd,WM_CLOSE,0,0);137 if(MdiInfo[i]->hwnd&&lstrcmpi(projectInfo.pMenuInfo[MenuInfoNum].IdName,MdiInfo[i]->path.c_str())==0){ 138 SendMessage(MdiInfo[i]->hwnd,WM_CLOSE,0,0); 139 139 break; 140 140 } … … 165 165 // ウィンドウ プロパティを更新 166 166 for(i=0;i<MdiInfo.size();i++){ 167 if(MdiInfo[i] .hwnd&&MdiInfo[i].DocType==WNDTYPE_RAD){168 if(MdiInfo[i] .MdiRadInfo->SelectingItem[0]==SELECT_WINDOW)169 ChangePropertyWindow(i,GetWndInfoNum(MdiInfo[i] .path.c_str()));167 if(MdiInfo[i]->hwnd&&MdiInfo[i]->DocType==WNDTYPE_RAD){ 168 if(MdiInfo[i]->MdiRadInfo->SelectingItem[0]==SELECT_WINDOW) 169 ChangePropertyWindow(i,GetWndInfoNum(MdiInfo[i]->path.c_str())); 170 170 } 171 171 } … … 199 199 while(hChild){ 200 200 i=GetWndNum(hChild); 201 if(MdiInfo[i] .DocType==WNDTYPE_MENU){202 if(lstrcmpi(MdiInfo[i] .path.c_str(),pMenuInfo->IdName)==0) break;201 if(MdiInfo[i]->DocType==WNDTYPE_MENU){ 202 if(lstrcmpi(MdiInfo[i]->path.c_str(),pMenuInfo->IdName)==0) break; 203 203 } 204 204 hChild=GetNextWindow(hChild,GW_HWNDNEXT); … … 228 228 229 229 mdic.lParam=0; 230 mdic.style |= WS_VISIBLE | WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_SYSMENU | WS_CAPTION | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX; 230 231 hChild=(HWND)SendMessage(hClient,WM_MDICREATE,0,(long)&mdic); //ウィンドウ作成 231 232 … … 248 249 249 250 //ウィンドウのID登録 250 MdiInfo.push_back( MDIINFO() );251 MdiInfo.push_back( new MDIINFO() ); 251 252 i = MdiInfo.size()-1; 252 MdiInfo[i] .hwnd=hChild;253 MdiInfo[i] .DocType=WNDTYPE_MENU;254 MdiInfo[i] .title = pMenuInfo->IdName;255 MdiInfo[i] .path = pMenuInfo->IdName;253 MdiInfo[i]->hwnd=hChild; 254 MdiInfo[i]->DocType=WNDTYPE_MENU; 255 MdiInfo[i]->title = pMenuInfo->IdName; 256 MdiInfo[i]->path = pMenuInfo->IdName; 256 257 257 258 … … 259 260 //MENU ウィンドウ情報 260 261 261 MdiInfo[i] .MdiMenuInfo=(MDIMENUINFO *)GlobalAlloc(GPTR,sizeof(MDIMENUINFO));262 263 MdiInfo[i] .MdiMenuInfo->hList=hListWnd;264 265 MdiInfo[i] .MdiMenuInfo->hMenuEdit=hMenuEdit;266 MdiInfo[i] .MdiMenuInfo->hEdit_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_PROJECT_MENUEDIT),hMenuEdit,(DLGPROC)MenuEditDlg);262 MdiInfo[i]->MdiMenuInfo=(MDIMENUINFO *)GlobalAlloc(GPTR,sizeof(MDIMENUINFO)); 263 264 MdiInfo[i]->MdiMenuInfo->hList=hListWnd; 265 266 MdiInfo[i]->MdiMenuInfo->hMenuEdit=hMenuEdit; 267 MdiInfo[i]->MdiMenuInfo->hEdit_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_PROJECT_MENUEDIT),hMenuEdit,(DLGPROC)MenuEditDlg); 267 268 268 269 SCROLLINFO ScrollInfo; … … 270 271 ScrollInfo.fMask=SIF_POS; 271 272 ScrollInfo.nPos=0; 272 SetScrollInfo(MdiInfo[i] .MdiMenuInfo->hMenuEdit,SB_VERT,&ScrollInfo,1);273 SetScrollInfo(MdiInfo[i]->MdiMenuInfo->hMenuEdit,SB_VERT,&ScrollInfo,1); 273 274 274 275 SendMessage(hListWnd,LB_RESETCONTENT,0,0); … … 282 283 //ウィンドウ位置を初期化 283 284 GetClientRect(hChild,&rect); 284 MoveWindow(MdiInfo[i] .MdiMenuInfo->hMenuEdit,0,0,172,rect.bottom,1);285 MoveWindow(MdiInfo[i] .MdiMenuInfo->hList,172,0,rect.right-172,rect.bottom,1);285 MoveWindow(MdiInfo[i]->MdiMenuInfo->hMenuEdit,0,0,172,rect.bottom,1); 286 MoveWindow(MdiInfo[i]->MdiMenuInfo->hList,172,0,rect.right-172,rect.bottom,1); 286 287 287 288 //Docコンボボックスに追加 … … 334 335 SetPosCenter(hwnd); 335 336 i=GetWndNum(GetWindow(hClient,GW_CHILD)); 336 GetDlgItemText(MdiInfo[i] .MdiMenuInfo->hEdit_Dlg,IDC_IDNAME,temporary,MAX_PATH);337 GetDlgItemText(MdiInfo[i]->MdiMenuInfo->hEdit_Dlg,IDC_IDNAME,temporary,MAX_PATH); 337 338 SetDlgItemText(hwnd,IDC_IDNAME,temporary); 338 GetDlgItemText(MdiInfo[i] .MdiMenuInfo->hEdit_Dlg,IDC_CAPTION,temporary,MAX_PATH);339 GetDlgItemText(MdiInfo[i]->MdiMenuInfo->hEdit_Dlg,IDC_CAPTION,temporary,MAX_PATH); 339 340 SetDlgItemText(hwnd,IDC_CAPTION,temporary); 340 341 … … 396 397 WndNum=GetWndNum(GetParent(GetParent(hwnd))); 397 398 if(WndNum==-1) return 1; 398 MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum] .path);399 400 i4=SendMessage(MdiInfo[WndNum] .MdiMenuInfo->hList,LB_GETCURSEL,0,0);399 MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum]->path); 400 401 i4=SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_GETCURSEL,0,0); 401 402 if(i4==LB_ERR) return 1; 402 403 i2=0; … … 410 411 if(!pMenuInfo->pMenuInfo){ 411 412 //ID 412 SetDlgItemText(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_IDNAME,pMenuInfo->IdName);413 SetDlgItemText(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_IDNAME,pMenuInfo->IdName); 413 414 } 414 415 415 416 //キャプション 416 SetDlgItemText(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_CAPTION,pMenuInfo->caption);417 SetDlgItemText(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_CAPTION,pMenuInfo->caption); 417 418 418 419 //リストへキャプションを反映 419 SendMessage(MdiInfo[WndNum] .MdiMenuInfo->hList,LB_DELETESTRING,i4,0);420 SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_DELETESTRING,i4,0); 420 421 memset(temporary,' ',i3*4); 421 422 lstrcpy(temporary+i3*4,pMenuInfo->caption); 422 SendMessage(MdiInfo[WndNum] .MdiMenuInfo->hList,LB_INSERTSTRING,i4,(long)temporary);423 424 SendMessage(MdiInfo[WndNum] .MdiMenuInfo->hList,LB_SETCURSEL,i4,0);423 SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_INSERTSTRING,i4,(long)temporary); 424 425 SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_SETCURSEL,i4,0); 425 426 projectInfo.ModifyOfMaterial=1; 426 427 return 1; … … 428 429 WndNum=GetWndNum(GetParent(GetParent(hwnd))); 429 430 if(WndNum==-1) return 1; 430 MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum] .path);431 432 i4=SendMessage(MdiInfo[WndNum] .MdiMenuInfo->hList,LB_GETCURSEL,0,0);431 MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum]->path); 432 433 i4=SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_GETCURSEL,0,0); 433 434 if(i4==LB_ERR) return 1; 434 435 i2=0; … … 446 447 447 448 for(i2=0;i2<i;i2++) 448 SendMessage(MdiInfo[WndNum] .MdiMenuInfo->hList,LB_DELETESTRING,i4+1,0);449 SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_DELETESTRING,i4+1,0); 449 450 450 451 HeapDefaultFree(pMenuInfo->pMenuInfo); … … 468 469 pMenuInfo->type=MFT_STRING; 469 470 } 470 SendMessage(MdiInfo[WndNum] .hwnd,WM_COMMAND,MAKELONG(0,LBN_SELCHANGE),(long)MdiInfo[WndNum].MdiMenuInfo->hList);471 SendMessage(MdiInfo[WndNum]->hwnd,WM_COMMAND,MAKELONG(0,LBN_SELCHANGE),(long)MdiInfo[WndNum]->MdiMenuInfo->hList); 471 472 projectInfo.ModifyOfMaterial=1; 472 473 return 1; … … 474 475 WndNum=GetWndNum(GetParent(GetParent(hwnd))); 475 476 if(WndNum==-1) return 1; 476 MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum] .path);477 478 i4=SendMessage(MdiInfo[WndNum] .MdiMenuInfo->hList,LB_GETCURSEL,0,0);477 MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum]->path); 478 479 i4=SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_GETCURSEL,0,0); 479 480 if(i4==LB_ERR) return 1; 480 481 i2=0; … … 490 491 pMenuInfo->type=MFT_SEPARATOR; 491 492 492 SendMessage(MdiInfo[WndNum] .MdiMenuInfo->hList,LB_DELETESTRING,i4,0);493 SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_DELETESTRING,i4,0); 493 494 memset(temporary,' ',i3*4); 494 495 lstrcpy(temporary+i3*4,"-"); 495 SendMessage(MdiInfo[WndNum] .MdiMenuInfo->hList,LB_INSERTSTRING,i4,(long)temporary);496 SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_INSERTSTRING,i4,(long)temporary); 496 497 } 497 498 else{ … … 504 505 pMenuInfo->type=MFT_STRING; 505 506 506 SendMessage(MdiInfo[WndNum] .MdiMenuInfo->hList,LB_DELETESTRING,i4,0);507 SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_DELETESTRING,i4,0); 507 508 memset(temporary,' ',i3*4); 508 509 lstrcpy(temporary+i3*4,pMenuInfo->caption); 509 SendMessage(MdiInfo[WndNum] .MdiMenuInfo->hList,LB_INSERTSTRING,i4,(long)temporary);510 } 511 SendMessage(MdiInfo[WndNum] .MdiMenuInfo->hList,LB_SETCURSEL,i4,0);512 SendMessage(MdiInfo[WndNum] .hwnd,WM_COMMAND,MAKELONG(0,LBN_SELCHANGE),(long)MdiInfo[WndNum].MdiMenuInfo->hList);510 SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_INSERTSTRING,i4,(long)temporary); 511 } 512 SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_SETCURSEL,i4,0); 513 SendMessage(MdiInfo[WndNum]->hwnd,WM_COMMAND,MAKELONG(0,LBN_SELCHANGE),(long)MdiInfo[WndNum]->MdiMenuInfo->hList); 513 514 return 1; 514 515 case IDC_CHECKED: 515 516 WndNum=GetWndNum(GetParent(GetParent(hwnd))); 516 517 if(WndNum==-1) return 1; 517 MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum] .path);518 519 i4=SendMessage(MdiInfo[WndNum] .MdiMenuInfo->hList,LB_GETCURSEL,0,0);518 MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum]->path); 519 520 i4=SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_GETCURSEL,0,0); 520 521 if(i4==LB_ERR) return 1; 521 522 i2=0; … … 534 535 WndNum=GetWndNum(GetParent(GetParent(hwnd))); 535 536 if(WndNum==-1) return 1; 536 MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum] .path);537 538 i4=SendMessage(MdiInfo[WndNum] .MdiMenuInfo->hList,LB_GETCURSEL,0,0);537 MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum]->path); 538 539 i4=SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_GETCURSEL,0,0); 539 540 if(i4==LB_ERR) return 1; 540 541 i2=0; … … 553 554 WndNum=GetWndNum(GetParent(GetParent(hwnd))); 554 555 if(WndNum==-1) return 1; 555 MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum] .path);556 MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum]->path); 556 557 557 558 if(projectInfo.pMenuInfo[MenuInfoNum].NumberOfMenu==0){ … … 573 574 projectInfo.pMenuInfo[MenuInfoNum].NumberOfMenu++; 574 575 575 SendMessage(MdiInfo[WndNum] .MdiMenuInfo->hList,LB_INSERTSTRING,0,(long)pMenuInfo->caption);576 SendMessage(MdiInfo[WndNum] .MdiMenuInfo->hList,LB_SETCURSEL,0,0);577 SendMessage(GetParent(MdiInfo[WndNum] .MdiMenuInfo->hMenuEdit),WM_COMMAND,MAKELONG(0,LBN_SELCHANGE),(long)MdiInfo[WndNum].MdiMenuInfo->hList);576 SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_INSERTSTRING,0,(long)pMenuInfo->caption); 577 SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_SETCURSEL,0,0); 578 SendMessage(GetParent(MdiInfo[WndNum]->MdiMenuInfo->hMenuEdit),WM_COMMAND,MAKELONG(0,LBN_SELCHANGE),(long)MdiInfo[WndNum]->MdiMenuInfo->hList); 578 579 } 579 580 else{ 580 i4=SendMessage(MdiInfo[WndNum] .MdiMenuInfo->hList,LB_GETCURSEL,0,0);581 i4=SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_GETCURSEL,0,0); 581 582 if(i4==LB_ERR){ 582 583 //"新しいメニュー アイテムの挿入位置を選択して下さい" … … 622 623 pMenuInfo->NumberOfMenu++; 623 624 624 SendMessage(MdiInfo[WndNum] .MdiMenuInfo->hList,LB_INSERTSTRING,i4,(long)temporary);625 SendMessage(MdiInfo[WndNum] .MdiMenuInfo->hList,LB_SETCURSEL,i4,0);626 SendMessage(GetParent(MdiInfo[WndNum] .MdiMenuInfo->hMenuEdit),WM_COMMAND,MAKELONG(0,LBN_SELCHANGE),(long)MdiInfo[WndNum].MdiMenuInfo->hList);625 SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_INSERTSTRING,i4,(long)temporary); 626 SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_SETCURSEL,i4,0); 627 SendMessage(GetParent(MdiInfo[WndNum]->MdiMenuInfo->hMenuEdit),WM_COMMAND,MAKELONG(0,LBN_SELCHANGE),(long)MdiInfo[WndNum]->MdiMenuInfo->hList); 627 628 } 628 629 projectInfo.ModifyOfMaterial=1; … … 631 632 WndNum=GetWndNum(GetParent(GetParent(hwnd))); 632 633 if(WndNum==-1) return 1; 633 MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum] .path);634 635 i4=SendMessage(MdiInfo[WndNum] .MdiMenuInfo->hList,LB_GETCURSEL,0,0);634 MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum]->path); 635 636 i4=SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_GETCURSEL,0,0); 636 637 if(i4==LB_ERR){ 637 638 //"削除するメニュー アイテムを選択して下さい" … … 664 665 665 666 for(i=0;i<i3;i++) 666 SendMessage(MdiInfo[WndNum] .MdiMenuInfo->hList,LB_DELETESTRING,i4,0);667 668 i=SendMessage(MdiInfo[WndNum] .MdiMenuInfo->hList,LB_GETCOUNT,0,0)-1;667 SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_DELETESTRING,i4,0); 668 669 i=SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_GETCOUNT,0,0)-1; 669 670 if(i){ 670 671 if(i<i4) i4=i; 671 SendMessage(MdiInfo[WndNum] .MdiMenuInfo->hList,LB_SETCURSEL,i4,0);672 SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_SETCURSEL,i4,0); 672 673 } 673 674 … … 677 678 WndNum=GetWndNum(GetParent(GetParent(hwnd))); 678 679 if(WndNum==-1) return 1; 679 MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum] .path);680 681 i4=SendMessage(MdiInfo[WndNum] .MdiMenuInfo->hList,LB_GETCURSEL,0,0);680 MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum]->path); 681 682 i4=SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_GETCURSEL,0,0); 682 683 if(i4==LB_ERR){ 683 684 //"移動するメニュー アイテムを選択して下さい" … … 695 696 memcpy(&pMenuInfo->pMenuInfo[i2+1],&tempMenuInfo,sizeof(MENU_INFO)); 696 697 697 SendMessage(MdiInfo[WndNum] .MdiMenuInfo->hList,LB_RESETCONTENT,0,0);698 SetMenuDataList(MdiInfo[WndNum] .MdiMenuInfo->hList,&projectInfo.pMenuInfo[MenuInfoNum],0);698 SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_RESETCONTENT,0,0); 699 SetMenuDataList(MdiInfo[WndNum]->MdiMenuInfo->hList,&projectInfo.pMenuInfo[MenuInfoNum],0); 699 700 if(!pMenuInfo->pMenuInfo[i2].pMenuInfo) 700 SendMessage(MdiInfo[WndNum] .MdiMenuInfo->hList,LB_SETCURSEL,i4-1,0);701 SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_SETCURSEL,i4-1,0); 701 702 702 703 projectInfo.ModifyOfMaterial=1; … … 705 706 WndNum=GetWndNum(GetParent(GetParent(hwnd))); 706 707 if(WndNum==-1) return 1; 707 MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum] .path);708 709 i4=SendMessage(MdiInfo[WndNum] .MdiMenuInfo->hList,LB_GETCURSEL,0,0);708 MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum]->path); 709 710 i4=SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_GETCURSEL,0,0); 710 711 if(i4==LB_ERR){ 711 712 //"移動するメニュー アイテムを選択して下さい" … … 722 723 memcpy(&pMenuInfo->pMenuInfo[i2+1],&tempMenuInfo,sizeof(MENU_INFO)); 723 724 724 SendMessage(MdiInfo[WndNum] .MdiMenuInfo->hList,LB_RESETCONTENT,0,0);725 SetMenuDataList(MdiInfo[WndNum] .MdiMenuInfo->hList,&projectInfo.pMenuInfo[MenuInfoNum],0);725 SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_RESETCONTENT,0,0); 726 SetMenuDataList(MdiInfo[WndNum]->MdiMenuInfo->hList,&projectInfo.pMenuInfo[MenuInfoNum],0); 726 727 if(!pMenuInfo->pMenuInfo[i2].pMenuInfo) 727 SendMessage(MdiInfo[WndNum] .MdiMenuInfo->hList,LB_SETCURSEL,i4+1,0);728 SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_SETCURSEL,i4+1,0); 728 729 729 730 projectInfo.ModifyOfMaterial=1; … … 770 771 ScrollInfo.fMask=SIF_PAGE|SIF_RANGE|SIF_POS; 771 772 GetScrollInfo(hwnd,SB_VERT,&ScrollInfo); 772 GetClientRect(MdiInfo[i] .MdiMenuInfo->hEdit_Dlg,&rect);773 GetClientRect(MdiInfo[i]->MdiMenuInfo->hEdit_Dlg,&rect); 773 774 ScrollInfo.nMin=0; 774 775 ScrollInfo.nMax=rect.bottom; … … 796 797 WndNum=GetWndNum(hwnd); 797 798 if(WndNum==-1) return 0; 798 MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum] .path);799 if((HWND)lParam==MdiInfo[WndNum] .MdiMenuInfo->hList&&HIWORD(wParam)==LBN_SELCHANGE){800 i=SendMessage(MdiInfo[WndNum] .MdiMenuInfo->hList,LB_GETCURSEL,0,0);799 MenuInfoNum=GetMenuInfoNum(MdiInfo[WndNum]->path); 800 if((HWND)lParam==MdiInfo[WndNum]->MdiMenuInfo->hList&&HIWORD(wParam)==LBN_SELCHANGE){ 801 i=SendMessage(MdiInfo[WndNum]->MdiMenuInfo->hList,LB_GETCURSEL,0,0); 801 802 i2=0; 802 803 i3=0; … … 805 806 806 807 if(pMenuInfo->pMenuInfo){ 807 SetDlgItemText(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_CAPTION,pMenuInfo->caption);808 SetDlgItemText(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_IDNAME,"");809 EnableWindow(GetDlgItem(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_IDSTATIC),0);810 EnableWindow(GetDlgItem(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_RENAME),1);811 EnableWindow(GetDlgItem(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_POPUP),1);812 EnableWindow(GetDlgItem(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_SEPARATOR),0);813 EnableWindow(GetDlgItem(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_CHECKED),1);814 EnableWindow(GetDlgItem(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_DISABLED),1);815 SendDlgItemMessage(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_POPUP,BM_SETCHECK,BST_CHECKED,0);816 SendDlgItemMessage(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_SEPARATOR,BM_SETCHECK,BST_UNCHECKED,0);808 SetDlgItemText(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_CAPTION,pMenuInfo->caption); 809 SetDlgItemText(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_IDNAME,""); 810 EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_IDSTATIC),0); 811 EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_RENAME),1); 812 EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_POPUP),1); 813 EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_SEPARATOR),0); 814 EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_CHECKED),1); 815 EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_DISABLED),1); 816 SendDlgItemMessage(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_POPUP,BM_SETCHECK,BST_CHECKED,0); 817 SendDlgItemMessage(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_SEPARATOR,BM_SETCHECK,BST_UNCHECKED,0); 817 818 } 818 819 else if(pMenuInfo->type==MFT_STRING){ 819 SetDlgItemText(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_CAPTION,pMenuInfo->caption);820 SetDlgItemText(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_IDNAME,pMenuInfo->IdName);821 EnableWindow(GetDlgItem(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_IDSTATIC),1);822 EnableWindow(GetDlgItem(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_CAPTIONSTATIC),1);823 EnableWindow(GetDlgItem(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_RENAME),1);824 EnableWindow(GetDlgItem(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_POPUP),1);825 EnableWindow(GetDlgItem(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_SEPARATOR),1);826 EnableWindow(GetDlgItem(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_CHECKED),1);827 EnableWindow(GetDlgItem(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_DISABLED),1);828 SendDlgItemMessage(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_POPUP,BM_SETCHECK,BST_UNCHECKED,0);829 SendDlgItemMessage(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_SEPARATOR,BM_SETCHECK,BST_UNCHECKED,0);820 SetDlgItemText(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_CAPTION,pMenuInfo->caption); 821 SetDlgItemText(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_IDNAME,pMenuInfo->IdName); 822 EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_IDSTATIC),1); 823 EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_CAPTIONSTATIC),1); 824 EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_RENAME),1); 825 EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_POPUP),1); 826 EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_SEPARATOR),1); 827 EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_CHECKED),1); 828 EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_DISABLED),1); 829 SendDlgItemMessage(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_POPUP,BM_SETCHECK,BST_UNCHECKED,0); 830 SendDlgItemMessage(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_SEPARATOR,BM_SETCHECK,BST_UNCHECKED,0); 830 831 } 831 832 else if(pMenuInfo->type==MFT_SEPARATOR){ 832 SetDlgItemText(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_CAPTION,"");833 SetDlgItemText(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_IDNAME,"");834 EnableWindow(GetDlgItem(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_IDSTATIC),0);835 EnableWindow(GetDlgItem(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_CAPTIONSTATIC),0);836 EnableWindow(GetDlgItem(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_RENAME),0);837 EnableWindow(GetDlgItem(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_POPUP),0);838 EnableWindow(GetDlgItem(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_SEPARATOR),1);839 EnableWindow(GetDlgItem(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_CHECKED),0);840 EnableWindow(GetDlgItem(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_DISABLED),0);841 SendDlgItemMessage(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_POPUP,BM_SETCHECK,BST_UNCHECKED,0);842 SendDlgItemMessage(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_SEPARATOR,BM_SETCHECK,BST_CHECKED,0);833 SetDlgItemText(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_CAPTION,""); 834 SetDlgItemText(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_IDNAME,""); 835 EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_IDSTATIC),0); 836 EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_CAPTIONSTATIC),0); 837 EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_RENAME),0); 838 EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_POPUP),0); 839 EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_SEPARATOR),1); 840 EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_CHECKED),0); 841 EnableWindow(GetDlgItem(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_DISABLED),0); 842 SendDlgItemMessage(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_POPUP,BM_SETCHECK,BST_UNCHECKED,0); 843 SendDlgItemMessage(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_SEPARATOR,BM_SETCHECK,BST_CHECKED,0); 843 844 } 844 845 845 846 if(pMenuInfo->state&MFS_CHECKED) i2=BST_CHECKED; 846 847 else i2=BST_UNCHECKED; 847 SendDlgItemMessage(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_CHECKED,BM_SETCHECK,i2,0);848 SendDlgItemMessage(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_CHECKED,BM_SETCHECK,i2,0); 848 849 if(pMenuInfo->state&MFS_DISABLED) i2=BST_CHECKED; 849 850 else i2=BST_UNCHECKED; 850 SendDlgItemMessage(MdiInfo[WndNum] .MdiMenuInfo->hEdit_Dlg,IDC_DISABLED,BM_SETCHECK,i2,0);851 SendDlgItemMessage(MdiInfo[WndNum]->MdiMenuInfo->hEdit_Dlg,IDC_DISABLED,BM_SETCHECK,i2,0); 851 852 } 852 853 return 0; … … 856 857 if(i==-1) return 0; //ウィンドウが初期状態の場合 857 858 858 i=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[i] .title.c_str());859 i=SendMessage(hDocCombo,CB_FINDSTRINGEXACT,0,(long)MdiInfo[i]->title.c_str()); 859 860 SendMessage(hDocCombo,CB_SETCURSEL,i,0); 860 861 SetStatusText(NULL); … … 864 865 WndNum=GetWndNum(hwnd); 865 866 if(WndNum==-1) break; 866 MoveWindow(MdiInfo[WndNum] .MdiMenuInfo->hMenuEdit,0,0,172,HIWORD(lParam),1);867 MoveWindow(MdiInfo[WndNum] .MdiMenuInfo->hList,172,0,LOWORD(lParam)-172,HIWORD(lParam),1);867 MoveWindow(MdiInfo[WndNum]->MdiMenuInfo->hMenuEdit,0,0,172,HIWORD(lParam),1); 868 MoveWindow(MdiInfo[WndNum]->MdiMenuInfo->hList,172,0,LOWORD(lParam)-172,HIWORD(lParam),1); 868 869 break; 869 870 case WM_CLOSE: -
trunk/ab5.0/abdev/abdev/MessageCallOperation.cpp
r625 r629 41 41 CallBackNameLen=pWindowInfo->GetCallbackName().size(); 42 42 43 buffer = ReadBuffer( projectInfo.GetWorkDir().GetPath() + pWindowInfo->GetSourceFileName () );43 buffer = ReadBuffer( projectInfo.GetWorkDir().GetPath() + pWindowInfo->GetSourceFileNameForOldVer( projectInfo.GetWorkDir().GetPath() ) ); 44 44 45 45 *num=0; … … 50 50 //メッセージ 51 51 *ppItemEventInfo=(ITEMEVENTINFO *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,sizeof(ITEMEVENTINFO)); 52 for(i=0,i4=0;;i++){ 53 if(buffer[i]=='\0') break;54 55 //注釈(複数行)56 if(buffer[i]=='/'&&buffer[i+1]=='*'){57 i+=2; 58 while(!(buffer[i]=='*'&&buffer[i+1]=='/')){59 if(buffer[i]=='\0'){60 i--;61 break;62 }63 i++;64 }65 continue;66 }67 68 if((buffer[i]=='\r'&&buffer[i+1]=='\n'&&buffer[i+2]!='\0')||i==0){69 if(buffer[i]=='\r'&&buffer[i+1]=='\n') i2=i+2;70 else i2=i; 71 while(buffer[i2]>='0'&&buffer[i2]<='9') i2++;72 while(buffer[i2]==' '||buffer[i2]=='\t') i2++;73 if(memicmp(buffer+i2,"Sub",3)==0&&(buffer[i2+3]==' '||buffer[i2+3]=='\t')){74 i2+=4;52 53 if( buffer ) 54 { 55 for(i=0,i4=0;;i++){ 56 if(buffer[i]=='\0') break; 57 58 //注釈(複数行) 59 if(buffer[i]=='/'&&buffer[i+1]=='*'){ 60 i+=2; 61 while(!(buffer[i]=='*'&&buffer[i+1]=='/')){ 62 if(buffer[i]=='\0'){ 63 i--; 64 break; 65 } 66 i++; 67 } 68 continue; 69 } 70 71 if((buffer[i]=='\r'&&buffer[i+1]=='\n'&&buffer[i+2]!='\0')||i==0){ 72 if(buffer[i]=='\r'&&buffer[i+1]=='\n') i2=i+2; 73 else i2=i; 74 while(buffer[i2]>='0'&&buffer[i2]<='9') i2++; 75 75 while(buffer[i2]==' '||buffer[i2]=='\t') i2++; 76 strncpy(temporary,buffer+i2,NameLen); 77 temporary[NameLen]=0; 78 if( pWindowInfo->GetName() == temporary && buffer[i2+NameLen] == '_' ){ 79 for(i2+=NameLen+1,i3=0;;i2++,i3++){ 80 if(!IsVariableChar(buffer[i2])){ 81 temporary[i3]=0; 82 break; 83 } 84 temporary[i3]=buffer[i2]; 85 } 86 i6=GetItemMessageInfo(WndInfoNum,temporary,temp2); 87 if(i6){ 88 //アイテムメッセージ(WM_COMMAND、WM_NOTIFY) 89 for(i5=0;;i5++){ 90 if((*ppItemEventInfo)[i5].IdName==0){ 91 *ppItemEventInfo=(ITEMEVENTINFO *)HeapReAlloc(hHeap,HEAP_ZERO_MEMORY,*ppItemEventInfo,(i4+2)*sizeof(ITEMEVENTINFO)); 92 (*ppItemEventInfo)[i4].IdName=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1); 93 lstrcpy((*ppItemEventInfo)[i4].IdName,temporary); 94 (*ppItemEventInfo)[i4].pEventNames=(char **)HeapAlloc(hHeap,0,1); 95 (*ppItemEventInfo)[i4].ClassID=i6; 96 i4++; 76 if(memicmp(buffer+i2,"Sub",3)==0&&(buffer[i2+3]==' '||buffer[i2+3]=='\t')){ 77 i2+=4; 78 while(buffer[i2]==' '||buffer[i2]=='\t') i2++; 79 strncpy(temporary,buffer+i2,NameLen); 80 temporary[NameLen]=0; 81 if( pWindowInfo->GetName() == temporary && buffer[i2+NameLen] == '_' ){ 82 for(i2+=NameLen+1,i3=0;;i2++,i3++){ 83 if(!IsVariableChar(buffer[i2])){ 84 temporary[i3]=0; 97 85 break; 98 86 } 99 if(lstrcmp((*ppItemEventInfo)[i5].IdName,temporary)==0) break;87 temporary[i3]=buffer[i2]; 100 88 } 101 (*ppItemEventInfo)[i5].pEventNames=(char **)HeapReAlloc(hHeap,0,(*ppItemEventInfo)[i5].pEventNames,((*ppItemEventInfo)[i5].EventNum+1)*sizeof(char *)); 102 (*ppItemEventInfo)[i5].pEventNames[(*ppItemEventInfo)[i5].EventNum]=(char *)HeapAlloc(hHeap,0,lstrlen(temp2)+1); 103 lstrcpy((*ppItemEventInfo)[i5].pEventNames[(*ppItemEventInfo)[i5].EventNum],temp2); 104 (*ppItemEventInfo)[i5].EventNum++; 89 i6=GetItemMessageInfo(WndInfoNum,temporary,temp2); 90 if(i6){ 91 //アイテムメッセージ(WM_COMMAND、WM_NOTIFY) 92 for(i5=0;;i5++){ 93 if((*ppItemEventInfo)[i5].IdName==0){ 94 *ppItemEventInfo=(ITEMEVENTINFO *)HeapReAlloc(hHeap,HEAP_ZERO_MEMORY,*ppItemEventInfo,(i4+2)*sizeof(ITEMEVENTINFO)); 95 (*ppItemEventInfo)[i4].IdName=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1); 96 lstrcpy((*ppItemEventInfo)[i4].IdName,temporary); 97 (*ppItemEventInfo)[i4].pEventNames=(char **)HeapAlloc(hHeap,0,1); 98 (*ppItemEventInfo)[i4].ClassID=i6; 99 i4++; 100 break; 101 } 102 if(lstrcmp((*ppItemEventInfo)[i5].IdName,temporary)==0) break; 103 } 104 (*ppItemEventInfo)[i5].pEventNames=(char **)HeapReAlloc(hHeap,0,(*ppItemEventInfo)[i5].pEventNames,((*ppItemEventInfo)[i5].EventNum+1)*sizeof(char *)); 105 (*ppItemEventInfo)[i5].pEventNames[(*ppItemEventInfo)[i5].EventNum]=(char *)HeapAlloc(hHeap,0,lstrlen(temp2)+1); 106 lstrcpy((*ppItemEventInfo)[i5].pEventNames[(*ppItemEventInfo)[i5].EventNum],temp2); 107 (*ppItemEventInfo)[i5].EventNum++; 108 } 109 else if(temporary[0]){ 110 //一般メッセージ 111 ppNames=(char **)HeapReAlloc(hHeap,0,ppNames,(*num+1)*sizeof(char *)); 112 ppNames[*num]=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1); 113 lstrcpy(ppNames[*num],temporary); 114 (*num)++; 115 } 105 116 } 106 else if(temporary[0]){ 107 //一般メッセージ 108 ppNames=(char **)HeapReAlloc(hHeap,0,ppNames,(*num+1)*sizeof(char *)); 109 ppNames[*num]=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1); 110 lstrcpy(ppNames[*num],temporary); 111 (*num)++; 117 } 118 if(memicmp(buffer+i2,"Function",8)==0&&(buffer[i2+8]==' '||buffer[i2+8]=='\t')){ 119 //[WndName]_WindowProcのみFunction定義 120 i2+=9; 121 while(buffer[i2]==' '||buffer[i2]=='\t') i2++; 122 if(memicmp(buffer+i2,pWindowInfo->GetCallbackName().c_str(),CallBackNameLen)==0&& 123 (buffer[i2+CallBackNameLen]==' '||buffer[i2+CallBackNameLen]=='\t'||buffer[i2+CallBackNameLen]=='(')){ 124 *pbAlways=1; 112 125 } 113 126 } 114 127 } 115 if(memicmp(buffer+i2,"Function",8)==0&&(buffer[i2+8]==' '||buffer[i2+8]=='\t')){ 116 //[WndName]_WindowProcのみFunction定義 117 i2+=9; 118 while(buffer[i2]==' '||buffer[i2]=='\t') i2++; 119 if(memicmp(buffer+i2,pWindowInfo->GetCallbackName().c_str(),CallBackNameLen)==0&& 120 (buffer[i2+CallBackNameLen]==' '||buffer[i2+CallBackNameLen]=='\t'||buffer[i2+CallBackNameLen]=='(')){ 121 *pbAlways=1; 122 } 123 } 124 } 125 } 126 HeapDefaultFree(buffer); 128 } 129 HeapDefaultFree(buffer); 130 } 127 131 128 132 return ppNames; … … 136 140 ActiveBasic::PM::WindowInfo *pWindowInfo = projectInfo.windowInfos[WndInfoNum]; 137 141 138 hChild=OpenFileWithExtension( projectInfo.GetWorkDir().GetPath() + pWindowInfo->GetSourceFileName () );142 hChild=OpenFileWithExtension( projectInfo.GetWorkDir().GetPath() + pWindowInfo->GetSourceFileNameForOldVer( projectInfo.GetWorkDir().GetPath() ) ); 139 143 if(!hChild) return; 140 144 WndNum=GetWndNum(hChild); 141 145 142 pBuf=MdiInfo[WndNum] .pMdiTextEdit->buffer;146 pBuf=MdiInfo[WndNum]->pMdiTextEdit->buffer; 143 147 144 148 for(i=0;;i++){ … … 195 199 TextEdit_SetSel(WndNum,i+2,i+i2); 196 200 } 197 SetFocus(MdiInfo[WndNum] .pMdiTextEdit->hEdit);201 SetFocus(MdiInfo[WndNum]->pMdiTextEdit->hEdit); 198 202 } 199 203 void InsertEventToList(HWND hList,int ItemNum,char *EventName,char *MessageName,char *OutLine){ … … 221 225 222 226 MaxCount=ListView_GetItemCount(hList); 223 if(MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){227 if(MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){ 224 228 if(dwEventType==EVENTTYPE_DEFAULT){ 225 229 for(i=0;i<MaxCount;i++){ … … 296 300 sprintf(EventName,"%s_%s_%s", 297 301 pWindowInfo->GetName().c_str(), 298 pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->GetName().c_str(),302 pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->GetName().c_str(), 299 303 temporary); 300 304 break; … … 303 307 if(i==MaxCount) return 0; 304 308 305 if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_LISTVIEW){309 if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_LISTVIEW){ 306 310 //ListView 307 311 if(i==0) lstrcpy(Parameter,"ByRef nmListView As NMLISTVIEW"); … … 327 331 else if(i==20) lstrcpy(Parameter,"ByRef nmLVDispInfo As NMLVDISPINFO"); 328 332 } 329 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_PROGRESSBAR){333 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_PROGRESSBAR){ 330 334 //ProgressBar 331 335 lstrcpy(Parameter,"ByRef nmHdr As NMHDR"); 332 336 } 333 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_TRACKBAR){337 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_TRACKBAR){ 334 338 //TrackBar 335 339 lstrcpy(Parameter,"ByRef nmHdr As NMHDR"); 336 340 } 337 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_TREEVIEW){341 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_TREEVIEW){ 338 342 //TreeView 339 343 if(0<=i&&i<=7) lstrcpy(Parameter,"ByRef nmHdr As NMHDR"); 340 344 else lstrcpy(Parameter,"ByRef nmTreeView As NMTREEVIEW"); 341 345 } 342 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_UPDOWN){346 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_UPDOWN){ 343 347 //UpDown 344 348 if(i==0) lstrcpy(Parameter,"ByRef nmHdr As NMHDR"); … … 400 404 401 405 WndNum=GetWndNum(GetWindow(hClient,GW_CHILD)); 402 ActiveBasic::PM::WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[WndNum] .path);406 ActiveBasic::PM::WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[WndNum]->path); 403 407 i=0; 404 if(MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){408 if(MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){ 405 409 EnableWindow(GetDlgItem(hDlg,IDC_DEFAULT),1); 406 410 EnableWindow(GetDlgItem(hDlg,IDC_MENU),1); … … 458 462 EnableWindow(GetDlgItem(hDlg,IDC_MMSYS),0); 459 463 SendDlgItemMessage(hDlg,IDC_DEFAULT,BM_SETCHECK,BST_CHECKED,0); 460 if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_BUTTON){464 if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_BUTTON){ 461 465 //Button 462 466 InsertEventToList(hList,i++,"Click","BN_CLICKED","ボタンがクリックされた時"); 463 467 InsertEventToList(hList,i++,"DblClick","BN_DBLCLK","ボタンがダブル クリックされた時"); 464 468 } 465 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_CHECKBOX){469 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_CHECKBOX){ 466 470 //CheckBox 467 471 InsertEventToList(hList,i++,"Click","BN_CLICKED","チェック ボックスがクリックされた時"); 468 472 InsertEventToList(hList,i++,"DblClick","BN_DBLCLK","チェック ボックスがダブル クリックされた時"); 469 473 } 470 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_COMBOBOX){474 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_COMBOBOX){ 471 475 //ComboBox 472 476 InsertEventToList(hList,i++,"CloseUp","CBN_CLOSEUP","リスト ボックスが非表示になる時"); … … 482 486 InsertEventToList(hList,i++,"SetFocus","CBN_SETFOCUS","入力フォーカスを取得した時"); 483 487 } 484 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_EDIT){488 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_EDIT){ 485 489 //Edit 486 490 InsertEventToList(hList,i++,"Change","EN_CHANGE","エディット ボックスの内容が変更された時(後処理)"); … … 493 497 InsertEventToList(hList,i++,"VScroll","EN_VSCROLL","垂直スクロールを行った時"); 494 498 } 495 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_IMAGEBOX){499 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_IMAGEBOX){ 496 500 //ImageBox 497 501 InsertEventToList(hList,i++,"Click","STN_CLICKED","イメージ ボックスがクリックされた時"); 498 502 InsertEventToList(hList,i++,"DblClick","STN_DBLCLK","イメージ ボックスがダブル クリックされた時"); 499 503 } 500 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_LISTBOX){504 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_LISTBOX){ 501 505 //ListBox 502 506 InsertEventToList(hList,i++,"SelChange","LBN_SELCHANGE","リスト内の選択が変更された時"); … … 507 511 InsertEventToList(hList,i++,"SetFocus","LBN_SETFOCUS","入力フォーカスを取得した時"); 508 512 } 509 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_LISTVIEW){513 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_LISTVIEW){ 510 514 //ListView 511 515 i=SetDefaultNotifyMessagesInList(hList,CT_LISTVIEW); 512 516 } 513 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_PROGRESSBAR){517 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_PROGRESSBAR){ 514 518 //ProgressBar 515 519 InsertEventToList(hList,i++,"OutOfMemory","NM_OUTOFMEMORY","メモリ不足でコントロールの動作が完了できない時"); 516 520 } 517 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_RADIOBUTTON){521 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_RADIOBUTTON){ 518 522 //RadioButton 519 523 InsertEventToList(hList,i++,"Click","BN_CLICKED","ラジオ ボタンがクリックされた時"); 520 524 InsertEventToList(hList,i++,"DblClick","BN_DBLCLK","ラジオ ボタンがダブル クリックされた時"); 521 525 } 522 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_STATIC){526 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_STATIC){ 523 527 //Static 524 528 InsertEventToList(hList,i++,"Click","STN_CLICKED","スタティック テキストがクリックされた時"); 525 529 InsertEventToList(hList,i++,"DblClick","STN_DBLCLK","スタティック テキストがダブル クリックされた時"); 526 530 } 527 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_TRACKBAR){531 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_TRACKBAR){ 528 532 //TrackBar 529 533 InsertEventToList(hList,i++,"OutOfMemory","NM_OUTOFMEMORY","メモリ不足でコントロールの動作が完了できない時"); … … 531 535 InsertEventToList(hList,i++,"CustomDraw","NM_CUSTOMDRAW ","カスタム描画操作の通知"); 532 536 } 533 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_TREEVIEW){537 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_TREEVIEW){ 534 538 //TreeView 535 539 i=SetDefaultNotifyMessagesInList(hList,CT_TREEVIEW); 536 540 } 537 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_UPDOWN){541 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_UPDOWN){ 538 542 //UpDown 539 543 InsertEventToList(hList,i++,"OutOfMemory","NM_OUTOFMEMORY","メモリ不足でコントロールの動作が完了できない時"); … … 595 599 hList=GetDlgItem(hwnd,IDC_EVENTLIST); 596 600 WndNum=GetWndNum(GetWindow(hClient,GW_CHILD)); 597 WndInfoNum=GetWndInfoNum(MdiInfo[WndNum] .path);601 WndInfoNum=GetWndInfoNum(MdiInfo[WndNum]->path); 598 602 599 603 ListView_DeleteAllItems(hList); … … 644 648 { 645 649 WndNum=GetWndNum(GetWindow(hClient,GW_CHILD)); 646 ActiveBasic::PM::WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[WndNum] .path);650 ActiveBasic::PM::WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[WndNum]->path); 647 651 NowMenuNum=GetMenuInfoNum(pWindowInfo->GetMenuIdName().c_str()); 648 652 } … … 671 675 hList=GetDlgItem(hwnd,IDC_EVENTLIST); 672 676 WndNum=GetWndNum(GetWindow(hClient,GW_CHILD)); 673 WndInfoNum=GetWndInfoNum(MdiInfo[WndNum] .path);677 WndInfoNum=GetWndInfoNum(MdiInfo[WndNum]->path); 674 678 if(GetEventProcedureNameFromListView(hList,WndNum,WndInfoNum,temporary,temp2,dwEventType)){ 675 679 SelectProcedureOfMessageCall(WndInfoNum,temporary,temp2); … … 689 693 hList=GetDlgItem(hwnd,IDC_EVENTLIST); 690 694 WndNum=GetWndNum(GetWindow(hClient,GW_CHILD)); 691 WndInfoNum=GetWndInfoNum(MdiInfo[WndNum] .path);695 WndInfoNum=GetWndInfoNum(MdiInfo[WndNum]->path); 692 696 if(GetEventProcedureNameFromListView(hList,WndNum,WndInfoNum,temporary,temp2,dwEventType)){ 693 697 sprintf(temporary+lstrlen(temporary),"(%s)",temp2); -
trunk/ab5.0/abdev/abdev/ParameterHint.cpp
r625 r629 39 39 40 40 for(i=0;i<MdiInfo.size();i++){ 41 if(MdiInfo[i] .hwnd){42 if(lstrcmpi(MdiInfo[i] .path.c_str(),temporary)==0) break;41 if(MdiInfo[i]->hwnd){ 42 if(lstrcmpi(MdiInfo[i]->path.c_str(),temporary)==0) break; 43 43 } 44 44 } … … 49 49 else{ 50 50 //エディタから読み込む 51 pBuf=(char *)HeapAlloc(hHeap,0,lstrlen(MdiInfo[i] .pMdiTextEdit->buffer)+1);52 lstrcpy(pBuf,MdiInfo[i] .pMdiTextEdit->buffer);51 pBuf=(char *)HeapAlloc(hHeap,0,lstrlen(MdiInfo[i]->pMdiTextEdit->buffer)+1); 52 lstrcpy(pBuf,MdiInfo[i]->pMdiTextEdit->buffer); 53 53 } 54 54 } … … 59 59 WndNum=GetWndNum(GetWindow(hClient,GW_CHILD)); 60 60 61 pBuf=(char *)HeapAlloc(hHeap,0,lstrlen(MdiInfo[WndNum] .pMdiTextEdit->buffer)+1);62 lstrcpy(pBuf,MdiInfo[WndNum] .pMdiTextEdit->buffer);61 pBuf=(char *)HeapAlloc(hHeap,0,lstrlen(MdiInfo[WndNum]->pMdiTextEdit->buffer)+1); 62 lstrcpy(pBuf,MdiInfo[WndNum]->pMdiTextEdit->buffer); 63 63 } 64 64 … … 685 685 char temp2[8192]; 686 686 687 pBuf=MdiInfo[WndNum] .pMdiTextEdit->buffer;687 pBuf=MdiInfo[WndNum]->pMdiTextEdit->buffer; 688 688 689 689 //キャレットが示すバッファインデックスを取得 690 690 iPos=GetBufferIndexFromCaretPos( 691 691 pBuf, 692 MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos.x,693 MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos.y);692 MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.x, 693 MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.y); 694 694 695 695 static int Before_StartCaretY; 696 696 BOOL Before_StartCaretSwitch=0; 697 if(MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos.y!=Before_StartCaretY){698 Before_StartCaretY=MdiInfo[WndNum] .pMdiTextEdit->StartCaretPos.y;697 if(MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.y!=Before_StartCaretY){ 698 Before_StartCaretY=MdiInfo[WndNum]->pMdiTextEdit->StartCaretPos.y; 699 699 Before_StartCaretSwitch=1; 700 700 } … … 966 966 else{ 967 967 if(MethodCheckInfo.hWnd){ 968 UpdateWindow(MdiInfo[WndNum] .pMdiTextEdit->hEdit); //ちらつき防止968 UpdateWindow(MdiInfo[WndNum]->pMdiTextEdit->hEdit); //ちらつき防止 969 969 970 970 DestroyWindow(MethodCheckInfo.hWnd); … … 1254 1254 ReleaseDC(MethodCheckInfo.hWnd,hdc); 1255 1255 1256 GetWindowRect(MdiInfo[i] .hwnd,&rect);1256 GetWindowRect(MdiInfo[i]->hwnd,&rect); 1257 1257 GetCaretPos(&pos); 1258 ClientToScreen(MdiInfo[i] .pMdiTextEdit->hEdit,&pos);1258 ClientToScreen(MdiInfo[i]->pMdiTextEdit->hEdit,&pos); 1259 1259 rect.left=pos.x-20; 1260 1260 rect.top=pos.y-pobj_nv->lf.lfHeight; -
trunk/ab5.0/abdev/abdev/Print.cpp
r626 r629 93 93 94 94 char *buffer; 95 buffer=MdiInfo[WndNum] .pMdiTextEdit->buffer;95 buffer=MdiInfo[WndNum]->pMdiTextEdit->buffer; 96 96 int i=0,i2=0,iPage=0; 97 97 for(i=0,i2=0;;i++,i2++){ … … 547 547 memset(&di,0,sizeof(DOCINFO)); 548 548 di.cbSize=sizeof(DOCINFO); 549 di.lpszDocName=MdiInfo[WndNum] .title.c_str();549 di.lpszDocName=MdiInfo[WndNum]->title.c_str(); 550 550 if(StartDoc(pd.hDC,&di)==0){ 551 551 MessageBox(hOwner,"印刷できません。プリンターの状況を確認してください。",APPLICATION_NAME,MB_OK | MB_ICONEXCLAMATION); -
trunk/ab5.0/abdev/abdev/ProjectControl.cpp
r625 r629 146 146 //ResetScrollbarが再描画時に呼び出されるので、再描画する 147 147 WndNum=GetWndNum(hChild); 148 InvalidateRect(MdiInfo[WndNum] .pMdiTextEdit->hEdit,NULL,0);149 UpdateWindow(MdiInfo[WndNum] .pMdiTextEdit->hEdit);148 InvalidateRect(MdiInfo[WndNum]->pMdiTextEdit->hEdit,NULL,0); 149 UpdateWindow(MdiInfo[WndNum]->pMdiTextEdit->hEdit); 150 150 TextEdit_SelectOneLine(WndNum,pobj_ClassTreeView->pProcInfo[i].code_pos,TRUE); 151 151 … … 506 506 SetWindowLongPtr(hwnd,GWL_EXSTYLE,WS_EX_STATICEDGE); 507 507 SetParent(hwnd,hOwner); 508 ResizeOwnerWnd();508 ActiveBasic::IDE::Program::mainFrame.Resized(); 509 509 510 510 ShowWindow(hProjectView_ToolWindow,SW_HIDE); … … 517 517 SetParent(hwnd,hProjectView_ToolWindow); 518 518 519 ResizeOwnerWnd();519 ActiveBasic::IDE::Program::mainFrame.Resized(); 520 520 ResizeProjectView_ToolWindow(); 521 521 … … 1287 1287 1288 1288 //ResetScrollbarが再描画時に呼び出されるので、再描画する 1289 InvalidateRect(MdiInfo[WndNum] .pMdiTextEdit->hEdit,NULL,0);1290 UpdateWindow(MdiInfo[WndNum] .pMdiTextEdit->hEdit);1289 InvalidateRect(MdiInfo[WndNum]->pMdiTextEdit->hEdit,NULL,0); 1290 UpdateWindow(MdiInfo[WndNum]->pMdiTextEdit->hEdit); 1291 1291 1292 1292 if(temp2[i2]=='\0') goto EndToSetWorkFile; … … 1316 1316 si.fMask=SIF_POS; 1317 1317 si.nPos=pos.x; 1318 SetScrollInfo(MdiInfo[WndNum] .pMdiTextEdit->hEdit,SB_HORZ,&si,1);1318 SetScrollInfo(MdiInfo[WndNum]->pMdiTextEdit->hEdit,SB_HORZ,&si,1); 1319 1319 si.nPos=pos.y; 1320 SetScrollInfo(MdiInfo[WndNum] .pMdiTextEdit->hEdit,SB_VERT,&si,1);1320 SetScrollInfo(MdiInfo[WndNum]->pMdiTextEdit->hEdit,SB_VERT,&si,1); 1321 1321 1322 1322 if(temp2[i2]=='\0') goto EndToSetWorkFile; … … 1591 1591 WndNum=GetWndNum(hChild); 1592 1592 sw=0; 1593 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum] .DocType)){1594 if( MdiInfo[WndNum] .pMdiTextEdit->IsModified() ){1593 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum]->DocType)){ 1594 if( MdiInfo[WndNum]->pMdiTextEdit->IsModified() ){ 1595 1595 for(i=0;i<projectInfo.pobj_DBFileInfo->iNum;i++){ 1596 1596 projectInfo.pobj_DBFileInfo->ppobj_FileInfo[i]->GetFullPath(temporary); 1597 if(lstrcmpi(MdiInfo[WndNum] .path.c_str(),temporary)==0) sw=1;1598 } 1599 } 1600 } 1601 else if(MdiInfo[WndNum] .DocType==WNDTYPE_ICONEDIT){1602 if(MdiInfo[WndNum] .MdiIconEditInfo->bModify){1597 if(lstrcmpi(MdiInfo[WndNum]->path.c_str(),temporary)==0) sw=1; 1598 } 1599 } 1600 } 1601 else if(MdiInfo[WndNum]->DocType==WNDTYPE_ICONEDIT){ 1602 if(MdiInfo[WndNum]->MdiIconEditInfo->bModify){ 1603 1603 BOOST_FOREACH( const ActiveBasic::Common::ResourceItem &resourceItem, projectInfo.resourceManager.iconResources ) 1604 1604 { 1605 1605 lstrcpy(temporary,resourceItem.filepath.c_str()); 1606 1606 lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() ); 1607 if(lstrcmpi(MdiInfo[WndNum] .path.c_str(),temporary)==0) sw=1;1607 if(lstrcmpi(MdiInfo[WndNum]->path.c_str(),temporary)==0) sw=1; 1608 1608 } 1609 1609 } … … 1648 1648 while(hChild){ 1649 1649 WndNum=GetWndNum(hChild); 1650 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum] .DocType)){1650 if(IS_DOCUMENT_TEXT(MdiInfo[WndNum]->DocType)){ 1651 1651 for(i=0;i<projectInfo.pobj_DBFileInfo->iNum;i++){ 1652 1652 projectInfo.pobj_DBFileInfo->ppobj_FileInfo[i]->GetFullPath(temporary); 1653 if(lstrcmpi(MdiInfo[WndNum] .path.c_str(),temporary)==0){1653 if(lstrcmpi(MdiInfo[WndNum]->path.c_str(),temporary)==0){ 1654 1654 TextEdit_GetSel(WndNum,&CharRange); 1655 1655 … … 1658 1658 si.cbSize=sizeof(SCROLLINFO); 1659 1659 si.fMask=SIF_POS; 1660 GetScrollInfo(MdiInfo[WndNum] .pMdiTextEdit->hEdit,SB_HORZ,&si);1660 GetScrollInfo(MdiInfo[WndNum]->pMdiTextEdit->hEdit,SB_HORZ,&si); 1661 1661 pos.x=si.nPos; 1662 GetScrollInfo(MdiInfo[WndNum] .pMdiTextEdit->hEdit,SB_VERT,&si);1662 GetScrollInfo(MdiInfo[WndNum]->pMdiTextEdit->hEdit,SB_VERT,&si); 1663 1663 pos.y=si.nPos; 1664 1664 … … 1674 1674 } 1675 1675 } 1676 else if(MdiInfo[WndNum] .DocType==WNDTYPE_RAD){1676 else if(MdiInfo[WndNum]->DocType==WNDTYPE_RAD){ 1677 1677 BOOST_FOREACH( ActiveBasic::PM::WindowInfo *pWindowInfo, projectInfo.windowInfos ) 1678 1678 { 1679 if(lstrcmpi(MdiInfo[WndNum] .path.c_str(),pWindowInfo->GetName().c_str())==0){1680 sprintf(buffer+i2,"rad,%s\r\n",MdiInfo[WndNum] .path.c_str());1679 if(lstrcmpi(MdiInfo[WndNum]->path.c_str(),pWindowInfo->GetName().c_str())==0){ 1680 sprintf(buffer+i2,"rad,%s\r\n",MdiInfo[WndNum]->path.c_str()); 1681 1681 i2+=lstrlen(buffer+i2); 1682 1682 break; … … 1684 1684 } 1685 1685 } 1686 else if(MdiInfo[WndNum] .DocType==WNDTYPE_MENU){1686 else if(MdiInfo[WndNum]->DocType==WNDTYPE_MENU){ 1687 1687 for(i=0;i<projectInfo.NumberOfMenu;i++){ 1688 if(lstrcmpi(MdiInfo[WndNum] .path.c_str(),projectInfo.pMenuInfo[i].IdName)==0){1689 sprintf(buffer+i2,"menu,%s\r\n",MdiInfo[WndNum] .path.c_str());1688 if(lstrcmpi(MdiInfo[WndNum]->path.c_str(),projectInfo.pMenuInfo[i].IdName)==0){ 1689 sprintf(buffer+i2,"menu,%s\r\n",MdiInfo[WndNum]->path.c_str()); 1690 1690 i2+=lstrlen(buffer+i2); 1691 1691 break; … … 1693 1693 } 1694 1694 } 1695 else if(MdiInfo[WndNum] .DocType==WNDTYPE_ICONEDIT){1695 else if(MdiInfo[WndNum]->DocType==WNDTYPE_ICONEDIT){ 1696 1696 BOOST_FOREACH( const ActiveBasic::Common::ResourceItem &resourceItem, projectInfo.resourceManager.iconResources ) 1697 1697 { 1698 1698 lstrcpy(temporary,resourceItem.filepath.c_str()); 1699 1699 lstrcpy( temporary, projectInfo.GetWorkDir().GetFullPath( temporary ).c_str() ); 1700 if(lstrcmpi(MdiInfo[WndNum] .path.c_str(),temporary)==0){1700 if(lstrcmpi(MdiInfo[WndNum]->path.c_str(),temporary)==0){ 1701 1701 sprintf(buffer+i2,"icon,%s\r\n",resourceItem.filepath.c_str()); 1702 1702 i2+=lstrlen(buffer+i2); -
trunk/ab5.0/abdev/abdev/RadProc.cpp
r626 r629 17 17 while(hChild){ 18 18 i=GetWndNum(hChild); 19 if(MdiInfo[i] .DocType==WNDTYPE_RAD){20 if(lstrcmpi(MdiInfo[i] .path.c_str(),windowInfo.GetName().c_str())==0) break;19 if(MdiInfo[i]->DocType==WNDTYPE_RAD){ 20 if(lstrcmpi(MdiInfo[i]->path.c_str(),windowInfo.GetName().c_str())==0) break; 21 21 } 22 22 hChild=GetNextWindow(hChild,GW_HWNDNEXT); … … 46 46 47 47 mdic.lParam=0; 48 mdic.style |= WS_VISIBLE | WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_SYSMENU | WS_CAPTION | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX; 48 49 hChild=(HWND)SendMessage(hClient,WM_MDICREATE,0,(long)&mdic); //ウィンドウ作成 49 50 … … 80 81 //ウィンドウのID登録 81 82 HDC hdc; 82 MdiInfo.push_back( MDIINFO() );83 MdiInfo.push_back( new MDIINFO() ); 83 84 i = MdiInfo.size()-1; 84 85 85 MdiInfo[i] .hwnd=hChild;86 MdiInfo[i] .DocType=WNDTYPE_RAD;87 MdiInfo[i] .title = windowInfo.GetName();88 MdiInfo[i] .path = windowInfo.GetName();86 MdiInfo[i]->hwnd=hChild; 87 MdiInfo[i]->DocType=WNDTYPE_RAD; 88 MdiInfo[i]->title = windowInfo.GetName(); 89 MdiInfo[i]->path = windowInfo.GetName(); 89 90 90 91 … … 93 94 //////////////////////////// 94 95 95 MdiInfo[i] .MdiRadInfo=(MDIRADINFO *)GlobalAlloc(GPTR,sizeof(MDIRADINFO));96 97 MdiInfo[i] .MdiRadInfo->hTools=hTools;98 MdiInfo[i] .MdiRadInfo->hProperty=hProperty;99 MdiInfo[i] .MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_WINDOW),hProperty,(DLGPROC)RadProperty_WindowProc);96 MdiInfo[i]->MdiRadInfo=(MDIRADINFO *)GlobalAlloc(GPTR,sizeof(MDIRADINFO)); 97 98 MdiInfo[i]->MdiRadInfo->hTools=hTools; 99 MdiInfo[i]->MdiRadInfo->hProperty=hProperty; 100 MdiInfo[i]->MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_WINDOW),hProperty,(DLGPROC)RadProperty_WindowProc); 100 101 101 102 SCROLLINFO ScrollInfo; … … 103 104 ScrollInfo.fMask=SIF_POS; 104 105 ScrollInfo.nPos=0; 105 SetScrollInfo(MdiInfo[i] .MdiRadInfo->hProperty,SB_VERT,&ScrollInfo,1);106 107 MdiInfo[i] .MdiRadInfo->hRad=hRad;108 109 MdiInfo[i] .MdiRadInfo->hSupport=hSupport;106 SetScrollInfo(MdiInfo[i]->MdiRadInfo->hProperty,SB_VERT,&ScrollInfo,1); 107 108 MdiInfo[i]->MdiRadInfo->hRad=hRad; 109 110 MdiInfo[i]->MdiRadInfo->hSupport=hSupport; 110 111 111 112 hdc=GetDC(hRad); 112 MdiInfo[i] .MdiRadInfo->hBitmap=CreateCompatibleBitmap(hdc,ScreenX*2,ScreenY*2);113 MdiInfo[i] .MdiRadInfo->hMemDC=CreateCompatibleDC(hdc);114 MdiInfo[i] .MdiRadInfo->hOldBitmap=115 (HBITMAP)SelectObject(MdiInfo[i] .MdiRadInfo->hMemDC,MdiInfo[i].MdiRadInfo->hBitmap);113 MdiInfo[i]->MdiRadInfo->hBitmap=CreateCompatibleBitmap(hdc,ScreenX*2,ScreenY*2); 114 MdiInfo[i]->MdiRadInfo->hMemDC=CreateCompatibleDC(hdc); 115 MdiInfo[i]->MdiRadInfo->hOldBitmap= 116 (HBITMAP)SelectObject(MdiInfo[i]->MdiRadInfo->hMemDC,MdiInfo[i]->MdiRadInfo->hBitmap); 116 117 ReleaseDC(hRad,hdc); 117 118 118 for(i2=0;i2<MAX_RAD_SELITEM;i2++) MdiInfo[i] .MdiRadInfo->SelectingItem[i2]=-1;119 MdiInfo[i] .MdiRadInfo->ButtonSelect=IDC_TOOL_MOUSE;119 for(i2=0;i2<MAX_RAD_SELITEM;i2++) MdiInfo[i]->MdiRadInfo->SelectingItem[i2]=-1; 120 MdiInfo[i]->MdiRadInfo->ButtonSelect=IDC_TOOL_MOUSE; 120 121 121 122 //変更情報を初期化 122 MdiInfo[i] .MdiRadInfo->undo.NowPos=0;123 memset(MdiInfo[i] .MdiRadInfo->undo.Command,0,sizeof(int)*MAX_UNDONUM);123 MdiInfo[i]->MdiRadInfo->undo.NowPos=0; 124 memset(MdiInfo[i]->MdiRadInfo->undo.Command,0,sizeof(int)*MAX_UNDONUM); 124 125 125 126 DrawRadWindow(i,&windowInfo); … … 286 287 ////////////////////////////// 287 288 //プロパティウィンドウを設定 288 DestroyWindow(MdiInfo[WndNum] .MdiRadInfo->hProp_Dlg);289 MdiInfo[WndNum] .MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_WINDOW),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_WindowProc);289 DestroyWindow(MdiInfo[WndNum]->MdiRadInfo->hProp_Dlg); 290 MdiInfo[WndNum]->MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_WINDOW),MdiInfo[WndNum]->MdiRadInfo->hProperty,(DLGPROC)RadProperty_WindowProc); 290 291 291 292 SCROLLINFO ScrollInfo; … … 293 294 ScrollInfo.fMask=SIF_POS; 294 295 ScrollInfo.nPos=0; 295 SetScrollInfo(MdiInfo[WndNum] .MdiRadInfo->hProperty,SB_VERT,&ScrollInfo,1);296 SetScrollInfo(MdiInfo[WndNum]->MdiRadInfo->hProperty,SB_VERT,&ScrollInfo,1); 296 297 297 298 RECT rect; 298 GetClientRect(MdiInfo[WndNum] .MdiRadInfo->hProperty,&rect);299 SendMessage(MdiInfo[WndNum] .MdiRadInfo->hProperty,WM_SIZE,0,MAKELONG(rect.right,rect.bottom));299 GetClientRect(MdiInfo[WndNum]->MdiRadInfo->hProperty,&rect); 300 SendMessage(MdiInfo[WndNum]->MdiRadInfo->hProperty,WM_SIZE,0,MAKELONG(rect.right,rect.bottom)); 300 301 } 301 302 … … 344 345 { 345 346 const ActiveBasic::PM::ChildWindowInfo *pChildInfo = pWindowInfo->childWindowInfos[i]; 346 if(i==MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]) continue;347 if(i==MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]) continue; 347 348 if(pChildInfo->Control != 348 pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control) continue;349 pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control) continue; 349 350 350 351 if(NewRect->left<OldRect->left){ 351 352 if(pChildInfo->pos.x 352 353 > 353 NewRect->left - MdiInfo[WndNum] .MdiRadInfo->ClientPos.x354 NewRect->left - MdiInfo[WndNum]->MdiRadInfo->ClientPos.x 354 355 && 355 356 pChildInfo->pos.x-10 356 357 < 357 NewRect->left - MdiInfo[WndNum] .MdiRadInfo->ClientPos.x){358 NewRect->left - MdiInfo[WndNum]->MdiRadInfo->ClientPos.x){ 358 359 359 360 //左側をストップする 360 361 x=NewRect->right-NewRect->left; 361 NewRect->left=pChildInfo->pos.x + MdiInfo[WndNum] .MdiRadInfo->ClientPos.x;362 NewRect->left=pChildInfo->pos.x + MdiInfo[WndNum]->MdiRadInfo->ClientPos.x; 362 363 NewRect->right=NewRect->left+x; 363 364 … … 376 377 if(pChildInfo->pos.y 377 378 > 378 NewRect->top - MdiInfo[WndNum] .MdiRadInfo->ClientPos.y379 NewRect->top - MdiInfo[WndNum]->MdiRadInfo->ClientPos.y 379 380 && 380 381 pChildInfo->pos.y-10 381 382 < 382 NewRect->top - MdiInfo[WndNum] .MdiRadInfo->ClientPos.y){383 NewRect->top - MdiInfo[WndNum]->MdiRadInfo->ClientPos.y){ 383 384 384 385 //左側をストップする 385 386 y=NewRect->bottom-NewRect->top; 386 NewRect->top=pChildInfo->pos.y + MdiInfo[WndNum] .MdiRadInfo->ClientPos.y;387 NewRect->top=pChildInfo->pos.y + MdiInfo[WndNum]->MdiRadInfo->ClientPos.y; 387 388 NewRect->bottom=NewRect->top+y; 388 389 … … 409 410 if(swLineStop&&sw==0){ 410 411 BitBlt(hdc,0,0,ScreenX*2,ScreenY*2, 411 MdiInfo[WndNum] .MdiRadInfo->hMemDC,0,0,SRCCOPY);412 MdiInfo[WndNum]->MdiRadInfo->hMemDC,0,0,SRCCOPY); 412 413 swLineStop=0; 413 414 } … … 415 416 BitBlt(hdc,rect.left-LEVER_THICK, rect.top-LEVER_THICK, 416 417 rect.right-rect.left+LEVER_THICK*2, rect.bottom-rect.top+LEVER_THICK*2, 417 MdiInfo[WndNum] .MdiRadInfo->hMemDC,x-LEVER_THICK,y-LEVER_THICK,SRCCOPY);418 MdiInfo[WndNum]->MdiRadInfo->hMemDC,x-LEVER_THICK,y-LEVER_THICK,SRCCOPY); 418 419 } 419 420 … … 440 441 ActiveBasic::PM::WindowInfo *pWindowInfo = projectInfo.windowInfos[WndInfoNum]; 441 442 442 if(MdiInfo[WndNum] .MdiRadInfo->SelectingItem[num]==SELECT_WINDOW){443 if(MdiInfo[WndNum]->MdiRadInfo->SelectingItem[num]==SELECT_WINDOW){ 443 444 //ウィンドウ軸を選択 444 445 rect->left=0; … … 449 450 else{ 450 451 //子ウィンドウを選択 451 rect->left=MdiInfo[WndNum] .MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]]->pos.x-LEVER_THICK;452 rect->top=MdiInfo[WndNum] .MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]]->pos.y-LEVER_THICK;453 rect->right=MdiInfo[WndNum] .MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]]->pos.x+pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]]->size.cx+LEVER_THICK;454 rect->bottom=MdiInfo[WndNum] .MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]]->pos.y+pWindowInfo->childWindowInfos[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]]->size.cy+LEVER_THICK;452 rect->left=MdiInfo[WndNum]->MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[num]]->pos.x-LEVER_THICK; 453 rect->top=MdiInfo[WndNum]->MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[num]]->pos.y-LEVER_THICK; 454 rect->right=MdiInfo[WndNum]->MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[num]]->pos.x+pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[num]]->size.cx+LEVER_THICK; 455 rect->bottom=MdiInfo[WndNum]->MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[num]]->pos.y+pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[num]]->size.cy+LEVER_THICK; 455 456 } 456 457 } … … 472 473 473 474 i=0; 474 while(MdiInfo[WndNum] .MdiRadInfo->SelectingItem[i]!=-1||i==0){475 while(MdiInfo[WndNum]->MdiRadInfo->SelectingItem[i]!=-1||i==0){ 475 476 GetSelectingRect(WndNum,WndInfoNum,i,&tempRect); 476 477 RectNaturalFormat(&tempRect,&rect); … … 535 536 ActiveBasic::PM::WindowInfo *pWindowInfo = projectInfo.windowInfos[WndInfoNum]; 536 537 537 DestroyWindow(MdiInfo[WndNum] .MdiRadInfo->hProp_Dlg);538 if(MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){539 MdiInfo[WndNum] .MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_WINDOW),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_WindowProc);538 DestroyWindow(MdiInfo[WndNum]->MdiRadInfo->hProp_Dlg); 539 if(MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){ 540 MdiInfo[WndNum]->MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_WINDOW),MdiInfo[WndNum]->MdiRadInfo->hProperty,(DLGPROC)RadProperty_WindowProc); 540 541 541 542 ScrollInfo.cbSize=sizeof(SCROLLINFO); 542 543 ScrollInfo.fMask=SIF_POS; 543 544 ScrollInfo.nPos=0; 544 SetScrollInfo(MdiInfo[WndNum] .MdiRadInfo->hProperty,SB_VERT,&ScrollInfo,1);545 546 GetClientRect(MdiInfo[WndNum] .MdiRadInfo->hProperty,&rect);547 SendMessage(MdiInfo[WndNum] .MdiRadInfo->hProperty,WM_SIZE,0,MAKELONG(rect.right,rect.bottom));545 SetScrollInfo(MdiInfo[WndNum]->MdiRadInfo->hProperty,SB_VERT,&ScrollInfo,1); 546 547 GetClientRect(MdiInfo[WndNum]->MdiRadInfo->hProperty,&rect); 548 SendMessage(MdiInfo[WndNum]->MdiRadInfo->hProperty,WM_SIZE,0,MAKELONG(rect.right,rect.bottom)); 548 549 } 549 550 else{ 550 if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_BUTTON)551 MdiInfo[WndNum] .MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_BUTTON),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ButtonProc);552 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_CHECKBOX)553 MdiInfo[WndNum] .MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_CHECKBOX),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_CheckBoxProc);554 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_COMBOBOX)555 MdiInfo[WndNum] .MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_COMBOBOX),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ComboBoxProc);556 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_EDIT)557 MdiInfo[WndNum] .MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_EDIT),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_EditProc);558 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_GROUPBOX)559 MdiInfo[WndNum] .MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_GROUPBOX),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_GroupBoxProc);560 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_HSCROLLBAR)561 MdiInfo[WndNum] .MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_SCROLLBAR),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ScrollBarProc);562 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_IMAGEBOX)563 MdiInfo[WndNum] .MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_IMAGEBOX),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ImageBoxProc);564 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_LISTBOX)565 MdiInfo[WndNum] .MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_LISTBOX),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ListBoxProc);566 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_LISTVIEW)567 MdiInfo[WndNum] .MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_LISTVIEW),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ListViewProc);568 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_PROGRESSBAR)569 MdiInfo[WndNum] .MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_PROGRESSBAR),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ProgressBarProc);570 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_RADIOBUTTON)571 MdiInfo[WndNum] .MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_RADIOBUTTON),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_RadioButtonProc);572 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_STATIC)573 MdiInfo[WndNum] .MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_STATIC),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_StaticProc);574 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_TRACKBAR)575 MdiInfo[WndNum] .MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_TRACKBAR),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_TrackBarProc);576 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_TREEVIEW)577 MdiInfo[WndNum] .MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_TREEVIEW),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_TreeViewProc);578 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_UPDOWN)579 MdiInfo[WndNum] .MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_UPDOWN),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_UpDownProc);580 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_VSCROLLBAR)581 MdiInfo[WndNum] .MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_SCROLLBAR),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ScrollBarProc);551 if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_BUTTON) 552 MdiInfo[WndNum]->MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_BUTTON),MdiInfo[WndNum]->MdiRadInfo->hProperty,(DLGPROC)RadProperty_ButtonProc); 553 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_CHECKBOX) 554 MdiInfo[WndNum]->MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_CHECKBOX),MdiInfo[WndNum]->MdiRadInfo->hProperty,(DLGPROC)RadProperty_CheckBoxProc); 555 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_COMBOBOX) 556 MdiInfo[WndNum]->MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_COMBOBOX),MdiInfo[WndNum]->MdiRadInfo->hProperty,(DLGPROC)RadProperty_ComboBoxProc); 557 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_EDIT) 558 MdiInfo[WndNum]->MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_EDIT),MdiInfo[WndNum]->MdiRadInfo->hProperty,(DLGPROC)RadProperty_EditProc); 559 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_GROUPBOX) 560 MdiInfo[WndNum]->MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_GROUPBOX),MdiInfo[WndNum]->MdiRadInfo->hProperty,(DLGPROC)RadProperty_GroupBoxProc); 561 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_HSCROLLBAR) 562 MdiInfo[WndNum]->MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_SCROLLBAR),MdiInfo[WndNum]->MdiRadInfo->hProperty,(DLGPROC)RadProperty_ScrollBarProc); 563 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_IMAGEBOX) 564 MdiInfo[WndNum]->MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_IMAGEBOX),MdiInfo[WndNum]->MdiRadInfo->hProperty,(DLGPROC)RadProperty_ImageBoxProc); 565 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_LISTBOX) 566 MdiInfo[WndNum]->MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_LISTBOX),MdiInfo[WndNum]->MdiRadInfo->hProperty,(DLGPROC)RadProperty_ListBoxProc); 567 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_LISTVIEW) 568 MdiInfo[WndNum]->MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_LISTVIEW),MdiInfo[WndNum]->MdiRadInfo->hProperty,(DLGPROC)RadProperty_ListViewProc); 569 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_PROGRESSBAR) 570 MdiInfo[WndNum]->MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_PROGRESSBAR),MdiInfo[WndNum]->MdiRadInfo->hProperty,(DLGPROC)RadProperty_ProgressBarProc); 571 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_RADIOBUTTON) 572 MdiInfo[WndNum]->MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_RADIOBUTTON),MdiInfo[WndNum]->MdiRadInfo->hProperty,(DLGPROC)RadProperty_RadioButtonProc); 573 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_STATIC) 574 MdiInfo[WndNum]->MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_STATIC),MdiInfo[WndNum]->MdiRadInfo->hProperty,(DLGPROC)RadProperty_StaticProc); 575 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_TRACKBAR) 576 MdiInfo[WndNum]->MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_TRACKBAR),MdiInfo[WndNum]->MdiRadInfo->hProperty,(DLGPROC)RadProperty_TrackBarProc); 577 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_TREEVIEW) 578 MdiInfo[WndNum]->MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_TREEVIEW),MdiInfo[WndNum]->MdiRadInfo->hProperty,(DLGPROC)RadProperty_TreeViewProc); 579 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_UPDOWN) 580 MdiInfo[WndNum]->MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_UPDOWN),MdiInfo[WndNum]->MdiRadInfo->hProperty,(DLGPROC)RadProperty_UpDownProc); 581 else if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_VSCROLLBAR) 582 MdiInfo[WndNum]->MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_SCROLLBAR),MdiInfo[WndNum]->MdiRadInfo->hProperty,(DLGPROC)RadProperty_ScrollBarProc); 582 583 583 584 ScrollInfo.cbSize=sizeof(SCROLLINFO); 584 585 ScrollInfo.fMask=SIF_POS; 585 586 ScrollInfo.nPos=0; 586 SetScrollInfo(MdiInfo[WndNum] .MdiRadInfo->hProperty,SB_VERT,&ScrollInfo,1);587 588 GetClientRect(MdiInfo[WndNum] .MdiRadInfo->hProperty,&rect);589 SendMessage(MdiInfo[WndNum] .MdiRadInfo->hProperty,WM_SIZE,0,MAKELONG(rect.right,rect.bottom));587 SetScrollInfo(MdiInfo[WndNum]->MdiRadInfo->hProperty,SB_VERT,&ScrollInfo,1); 588 589 GetClientRect(MdiInfo[WndNum]->MdiRadInfo->hProperty,&rect); 590 SendMessage(MdiInfo[WndNum]->MdiRadInfo->hProperty,WM_SIZE,0,MAKELONG(rect.right,rect.bottom)); 590 591 } 591 592 } … … 599 600 (pWindowInfo->childWindowInfos[i]->GetStyle()&0x000F)!=CBS_SIMPLE){ 600 601 //コンボ ボックスの場合は表示部分をターゲットに選択する(高さ20pixel) 601 if(x>=MdiInfo[WndNum] .MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[i]->pos.x&&602 x<=MdiInfo[WndNum] .MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[i]->pos.x+pWindowInfo->childWindowInfos[i]->size.cx&&603 y>=MdiInfo[WndNum] .MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[i]->pos.y&&604 y<=MdiInfo[WndNum] .MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[i]->pos.y+20){602 if(x>=MdiInfo[WndNum]->MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[i]->pos.x&& 603 x<=MdiInfo[WndNum]->MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[i]->pos.x+pWindowInfo->childWindowInfos[i]->size.cx&& 604 y>=MdiInfo[WndNum]->MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[i]->pos.y&& 605 y<=MdiInfo[WndNum]->MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[i]->pos.y+20){ 605 606 break; 606 607 } … … 609 610 //グループ ボックスの場合は中央をあける 610 611 if(( 611 x>=MdiInfo[WndNum] .MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[i]->pos.x&&612 x<=MdiInfo[WndNum] .MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[i]->pos.x+pWindowInfo->childWindowInfos[i]->size.cx&&613 y>=MdiInfo[WndNum] .MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[i]->pos.y&&614 y<=MdiInfo[WndNum] .MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[i]->pos.y+pWindowInfo->childWindowInfos[i]->size.cy612 x>=MdiInfo[WndNum]->MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[i]->pos.x&& 613 x<=MdiInfo[WndNum]->MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[i]->pos.x+pWindowInfo->childWindowInfos[i]->size.cx&& 614 y>=MdiInfo[WndNum]->MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[i]->pos.y&& 615 y<=MdiInfo[WndNum]->MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[i]->pos.y+pWindowInfo->childWindowInfos[i]->size.cy 615 616 )&& 616 617 (!( 617 x>=MdiInfo[WndNum] .MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[i]->pos.x+LEVER_THICK*2&&618 x<=MdiInfo[WndNum] .MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[i]->pos.x+pWindowInfo->childWindowInfos[i]->size.cx-LEVER_THICK*2&&619 y>=MdiInfo[WndNum] .MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[i]->pos.y+LEVER_THICK*3&&620 y<=MdiInfo[WndNum] .MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[i]->pos.y+pWindowInfo->childWindowInfos[i]->size.cy-LEVER_THICK*2618 x>=MdiInfo[WndNum]->MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[i]->pos.x+LEVER_THICK*2&& 619 x<=MdiInfo[WndNum]->MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[i]->pos.x+pWindowInfo->childWindowInfos[i]->size.cx-LEVER_THICK*2&& 620 y>=MdiInfo[WndNum]->MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[i]->pos.y+LEVER_THICK*3&& 621 y<=MdiInfo[WndNum]->MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[i]->pos.y+pWindowInfo->childWindowInfos[i]->size.cy-LEVER_THICK*2 621 622 )) 622 623 ){ … … 624 625 } 625 626 } 626 else if(x>=MdiInfo[WndNum] .MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[i]->pos.x&&627 x<=MdiInfo[WndNum] .MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[i]->pos.x+pWindowInfo->childWindowInfos[i]->size.cx&&628 y>=MdiInfo[WndNum] .MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[i]->pos.y&&629 y<=MdiInfo[WndNum] .MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[i]->pos.y+pWindowInfo->childWindowInfos[i]->size.cy){627 else if(x>=MdiInfo[WndNum]->MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[i]->pos.x&& 628 x<=MdiInfo[WndNum]->MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[i]->pos.x+pWindowInfo->childWindowInfos[i]->size.cx&& 629 y>=MdiInfo[WndNum]->MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[i]->pos.y&& 630 y<=MdiInfo[WndNum]->MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[i]->pos.y+pWindowInfo->childWindowInfos[i]->size.cy){ 630 631 break; 631 632 } … … 637 638 int i; 638 639 639 for(i=1;i<MAX_RAD_SELITEM;i++) MdiInfo[WndNum] .MdiRadInfo->SelectingItem[i]=-1;640 for(i=1;i<MAX_RAD_SELITEM;i++) MdiInfo[WndNum]->MdiRadInfo->SelectingItem[i]=-1; 640 641 i=GetItemNumOnMouse(WndNum,WndInfoNum,x,y); 641 642 642 643 if(i==-1){ 643 if(MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]!=SELECT_WINDOW){644 MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]=SELECT_WINDOW;644 if(MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]!=SELECT_WINDOW){ 645 MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]=SELECT_WINDOW; 645 646 ChangePropertyWindow(WndNum,WndInfoNum); 646 647 } 647 648 } 648 649 else{ 649 MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]=i;650 MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]=i; 650 651 ChangePropertyWindow(WndNum,WndInfoNum); 651 652 } … … 662 663 ActiveBasic::PM::WindowInfo *pWindowInfo = projectInfo.windowInfos[WndInfoNum]; 663 664 664 for(i=1;i<MAX_RAD_SELITEM;i++) MdiInfo[WndNum] .MdiRadInfo->SelectingItem[i]=-1;665 for(i=1;i<MAX_RAD_SELITEM;i++) MdiInfo[WndNum]->MdiRadInfo->SelectingItem[i]=-1; 665 666 RectNaturalFormat(pRect,&rect); 666 if(MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]==SELECT_WINDOW) sw=0;667 if(MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]==SELECT_WINDOW) sw=0; 667 668 else sw=1; 668 669 for(i=pWindowInfo->childWindowInfos.size()-1,i2=0;i>=0;i--){ 669 if(rect.left <= pWindowInfo->childWindowInfos[i]->pos.x+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x&&670 rect.top <= pWindowInfo->childWindowInfos[i]->pos.y+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y&&671 rect.right >= pWindowInfo->childWindowInfos[i]->pos.x+pWindowInfo->childWindowInfos[i]->size.cx+MdiInfo[WndNum] .MdiRadInfo->ClientPos.x&&672 rect.bottom >= pWindowInfo->childWindowInfos[i]->pos.y+pWindowInfo->childWindowInfos[i]->size.cy+MdiInfo[WndNum] .MdiRadInfo->ClientPos.y){673 MdiInfo[WndNum] .MdiRadInfo->SelectingItem[i2]=i;670 if(rect.left <= pWindowInfo->childWindowInfos[i]->pos.x+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x&& 671 rect.top <= pWindowInfo->childWindowInfos[i]->pos.y+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y&& 672 rect.right >= pWindowInfo->childWindowInfos[i]->pos.x+pWindowInfo->childWindowInfos[i]->size.cx+MdiInfo[WndNum]->MdiRadInfo->ClientPos.x&& 673 rect.bottom >= pWindowInfo->childWindowInfos[i]->pos.y+pWindowInfo->childWindowInfos[i]->size.cy+MdiInfo[WndNum]->MdiRadInfo->ClientPos.y){ 674 MdiInfo[WndNum]->MdiRadInfo->SelectingItem[i2]=i; 674 675 i2++; 675 676 } 676 677 } 677 if(MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]!=SELECT_WINDOW||678 (MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]==SELECT_WINDOW&&sw)){678 if(MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]!=SELECT_WINDOW|| 679 (MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]==SELECT_WINDOW&&sw)){ 679 680 ChangePropertyWindow(WndNum,WndInfoNum); 680 681 } … … 686 687 ActiveBasic::PM::WindowInfo *pWindowInfo = projectInfo.windowInfos[WndInfoNum]; 687 688 688 if(MdiInfo[WndNum] .MdiRadInfo->SelectingItem[1]!=-1){689 if(MdiInfo[WndNum]->MdiRadInfo->SelectingItem[1]!=-1){ 689 690 i=0; 690 while(MdiInfo[WndNum] .MdiRadInfo->SelectingItem[i]!=-1||i==0){691 while(MdiInfo[WndNum]->MdiRadInfo->SelectingItem[i]!=-1||i==0){ 691 692 GetSelectingRect(WndNum,WndInfoNum,i,&rect); 692 693 693 694 if(x>=rect.left+LEVER_THICK&&x<=rect.right-LEVER_THICK&& 694 695 y>=rect.top+LEVER_THICK&&y<=rect.bottom-LEVER_THICK){ 695 if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[i]]->Control==CT_GROUPBOX){696 if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[i]]->Control==CT_GROUPBOX){ 696 697 //グループボックスの場合は中央をあける 697 698 if(!(x>=rect.left+LEVER_THICK*2&&x<=rect.right-LEVER_THICK*2&& … … 708 709 GetSelectingRect(WndNum,WndInfoNum,0,&rect); 709 710 710 if(MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]!=SELECT_WINDOW){711 if(MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]!=SELECT_WINDOW){ 711 712 if(x>=rect.left+LEVER_THICK&&x<=rect.right-LEVER_THICK&& 712 713 y>=rect.top+LEVER_THICK&&y<=rect.bottom-LEVER_THICK){ 713 if(pWindowInfo->childWindowInfos[MdiInfo[WndNum] .MdiRadInfo->SelectingItem[0]]->Control==CT_GROUPBOX){714 if(pWindowInfo->childWindowInfos[MdiInfo[WndNum]->MdiRadInfo->SelectingItem[0]]->Control==CT_GROUPBOX){ 714 715 //グループ ボックスの場合は中央をあける 715 716 if(!(x>=rect.left+LEVER_THICK*3&&x<=rect.right-LEVER_THICK*3&& … … 744 745 SIZE NeedSize; 745 746 746 ActiveBasic::PM::WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[WndNum] .path);747 ActiveBasic::PM::WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[WndNum]->path); 747 748 748 749 //必要な幅、高さを共に100ピクセル余裕を持たせる … … 754 755 755 756 //垂直スクロールバーの設定 756 GetScrollInfo(MdiInfo[WndNum] .MdiRadInfo->hRad,SB_VERT,&ScrollInfo);757 GetScrollInfo(MdiInfo[WndNum]->MdiRadInfo->hRad,SB_VERT,&ScrollInfo); 757 758 ScrollInfo.nMin=0; 758 759 if(height>NeedSize.cy) ScrollInfo.nMax=0; … … 761 762 ScrollInfo.nPage=height; 762 763 } 763 SetScrollInfo(MdiInfo[WndNum] .MdiRadInfo->hRad,SB_VERT,&ScrollInfo,1);764 SetScrollInfo(MdiInfo[WndNum]->MdiRadInfo->hRad,SB_VERT,&ScrollInfo,1); 764 765 765 766 //水平スクロールバーの設定 766 GetScrollInfo(MdiInfo[WndNum] .MdiRadInfo->hRad,SB_VERT,&ScrollInfo);767 GetScrollInfo(MdiInfo[WndNum]->MdiRadInfo->hRad,SB_VERT,&ScrollInfo); 767 768 ScrollInfo.nMin=0; 768 769 if(weight>NeedSize.cx) ScrollInfo.nMax=0; … … 771 772 ScrollInfo.nPage=weight; 772 773 } 773 SetScrollInfo(MdiInfo[WndNum] .MdiRadInfo->hRad,SB_HORZ,&ScrollInfo,1);774 SetScrollInfo(MdiInfo[WndNum]->MdiRadInfo->hRad,SB_HORZ,&ScrollInfo,1); 774 775 } 775 776 LRESULT CALLBACK RadWindow(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){ … … 797 798 798 799 i=GetWndNum(GetParent(hwnd)); 799 i2 = GetWndInfoNum(MdiInfo[i] .path);800 ActiveBasic::PM::WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i] .path);801 802 if(MdiInfo[i] .MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){800 i2 = GetWndInfoNum(MdiInfo[i]->path); 801 ActiveBasic::PM::WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i]->path); 802 803 if(MdiInfo[i]->MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){ 803 804 if(((wParam&MK_CONTROL)||(wParam&MK_SHIFT))&& 804 MdiInfo[i] .MdiRadInfo->SelectingItem[0]!=SELECT_WINDOW){805 MdiInfo[i]->MdiRadInfo->SelectingItem[0]!=SELECT_WINDOW){ 805 806 806 807 //Shiftキー、Ctrlキーによる複数選択 807 808 for(i3=0;;i3++){ 808 if(MdiInfo[i] .MdiRadInfo->SelectingItem[i3]==-1){809 MdiInfo[i] .MdiRadInfo->SelectingItem[i3]=GetItemNumOnMouse(i,i2,mouse.x,mouse.y);809 if(MdiInfo[i]->MdiRadInfo->SelectingItem[i3]==-1){ 810 MdiInfo[i]->MdiRadInfo->SelectingItem[i3]=GetItemNumOnMouse(i,i2,mouse.x,mouse.y); 810 811 InvalidateRect(hwnd,NULL,0); 811 812 … … 826 827 //アイテム選択中。サイズ、位置変更開始 827 828 828 if(MdiInfo[i] .MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){829 if(MdiInfo[i]->MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){ 829 830 RadInfo.DraggingRect[0].left=LEVER_THICK; 830 831 RadInfo.DraggingRect[0].top=LEVER_THICK; … … 835 836 else{ 836 837 i3=0; 837 while(MdiInfo[i] .MdiRadInfo->SelectingItem[i3]!=-1){838 RadInfo.DraggingRect[i3].left=MdiInfo[i] .MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[i3]]->pos.x;839 RadInfo.DraggingRect[i3].top=MdiInfo[i] .MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[i3]]->pos.y;840 RadInfo.DraggingRect[i3].right=MdiInfo[i] .MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[i3]]->pos.x+pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[i3]]->size.cx;841 RadInfo.DraggingRect[i3].bottom=MdiInfo[i] .MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[i3]]->pos.y+pWindowInfo->childWindowInfos[MdiInfo[i].MdiRadInfo->SelectingItem[i3]]->size.cy;838 while(MdiInfo[i]->MdiRadInfo->SelectingItem[i3]!=-1){ 839 RadInfo.DraggingRect[i3].left=MdiInfo[i]->MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[MdiInfo[i]->MdiRadInfo->SelectingItem[i3]]->pos.x; 840 RadInfo.DraggingRect[i3].top=MdiInfo[i]->MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[MdiInfo[i]->MdiRadInfo->SelectingItem[i3]]->pos.y; 841 RadInfo.DraggingRect[i3].right=MdiInfo[i]->MdiRadInfo->ClientPos.x+pWindowInfo->childWindowInfos[MdiInfo[i]->MdiRadInfo->SelectingItem[i3]]->pos.x+pWindowInfo->childWindowInfos[MdiInfo[i]->MdiRadInfo->SelectingItem[i3]]->size.cx; 842 RadInfo.DraggingRect[i3].bottom=MdiInfo[i]->MdiRadInfo->ClientPos.y+pWindowInfo->childWindowInfos[MdiInfo[i]->MdiRadInfo->SelectingItem[i3]]->pos.y+pWindowInfo->childWindowInfos[MdiInfo[i]->MdiRadInfo->SelectingItem[i3]]->size.cy; 842 843 RadInfo.DragStartRect[i3]=RadInfo.DraggingRect[i3]; 843 844 i3++; … … 877 878 hParent=GetParent(hwnd); 878 879 i=GetWndNum(hParent); 879 i2 = GetWndInfoNum(MdiInfo[i] .path);880 ActiveBasic::PM::WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i] .path);881 882 if(MdiInfo[i] .MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){880 i2 = GetWndInfoNum(MdiInfo[i]->path); 881 ActiveBasic::PM::WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i]->path); 882 883 if(MdiInfo[i]->MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){ 883 884 if(RadInfo.NowDragging){ 884 885 if(RadInfo.DragStartPos.x==mouse.x&&RadInfo.DragStartPos.y==mouse.y){ … … 889 890 } 890 891 891 if(MdiInfo[i] .MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){892 if(MdiInfo[i]->MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){ 892 893 if(RadInfo.NowDragging==SELECTING_FRAME){ 893 894 SetItemNumOnFrame(i,i2,&RadInfo.DraggingRect[0]); … … 897 898 //ウィンドウ枠の調整完了 898 899 PointAndSize.size=pWindowInfo->size; 899 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i] .MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);900 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i]->MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize); 900 901 pWindowInfo->size.cx=RadInfo.DraggingRect[0].right-LEVER_THICK; 901 902 pWindowInfo->size.cy=RadInfo.DraggingRect[0].bottom-LEVER_THICK; … … 909 910 else{ 910 911 i3=0; 911 while(MdiInfo[i] .MdiRadInfo->SelectingItem[i3]!=-1){912 while(MdiInfo[i]->MdiRadInfo->SelectingItem[i3]!=-1){ 912 913 //アイテム枠の調整完了 913 PointAndSize.pos=pWindowInfo->childWindowInfos[MdiInfo[i] .MdiRadInfo->SelectingItem[i3]]->pos;914 PointAndSize.size=pWindowInfo->childWindowInfos[MdiInfo[i] .MdiRadInfo->SelectingItem[i3]]->size;915 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i] .MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize);916 pWindowInfo->childWindowInfos[MdiInfo[i] .MdiRadInfo->SelectingItem[i3]]->pos.x=RadInfo.DraggingRect[i3].left-MdiInfo[i].MdiRadInfo->ClientPos.x;917 pWindowInfo->childWindowInfos[MdiInfo[i] .MdiRadInfo->SelectingItem[i3]]->pos.y=RadInfo.DraggingRect[i3].top-MdiInfo[i].MdiRadInfo->ClientPos.y;918 pWindowInfo->childWindowInfos[MdiInfo[i] .MdiRadInfo->SelectingItem[i3]]->size.cx=RadInfo.DraggingRect[i3].right-RadInfo.DraggingRect[i3].left;919 pWindowInfo->childWindowInfos[MdiInfo[i] .MdiRadInfo->SelectingItem[i3]]->size.cy=RadInfo.DraggingRect[i3].bottom-RadInfo.DraggingRect[i3].top;914 PointAndSize.pos=pWindowInfo->childWindowInfos[MdiInfo[i]->MdiRadInfo->SelectingItem[i3]]->pos; 915 PointAndSize.size=pWindowInfo->childWindowInfos[MdiInfo[i]->MdiRadInfo->SelectingItem[i3]]->size; 916 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i]->MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize); 917 pWindowInfo->childWindowInfos[MdiInfo[i]->MdiRadInfo->SelectingItem[i3]]->pos.x=RadInfo.DraggingRect[i3].left-MdiInfo[i]->MdiRadInfo->ClientPos.x; 918 pWindowInfo->childWindowInfos[MdiInfo[i]->MdiRadInfo->SelectingItem[i3]]->pos.y=RadInfo.DraggingRect[i3].top-MdiInfo[i]->MdiRadInfo->ClientPos.y; 919 pWindowInfo->childWindowInfos[MdiInfo[i]->MdiRadInfo->SelectingItem[i3]]->size.cx=RadInfo.DraggingRect[i3].right-RadInfo.DraggingRect[i3].left; 920 pWindowInfo->childWindowInfos[MdiInfo[i]->MdiRadInfo->SelectingItem[i3]]->size.cy=RadInfo.DraggingRect[i3].bottom-RadInfo.DraggingRect[i3].top; 920 921 DrawRadWindow(i,pWindowInfo); 921 922 i3++; … … 930 931 } 931 932 else if(RadInfo.NowDragging==ITEM_MAKING){ 932 if(MdiInfo[i] .MdiRadInfo->ButtonSelect==IDC_TOOL_BUTTON){933 if(MdiInfo[i]->MdiRadInfo->ButtonSelect==IDC_TOOL_BUTTON){ 933 934 //ボタン コントロール作成 934 935 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){ … … 943 944 } 944 945 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect); 945 pos.x=rect.left-MdiInfo[i] .MdiRadInfo->ClientPos.x;946 pos.y=rect.top-MdiInfo[i] .MdiRadInfo->ClientPos.y;946 pos.x=rect.left-MdiInfo[i]->MdiRadInfo->ClientPos.x; 947 pos.y=rect.top-MdiInfo[i]->MdiRadInfo->ClientPos.y; 947 948 size.cx=rect.right-rect.left; 948 949 size.cy=rect.bottom-rect.top; 949 MdiInfo[i] .MdiRadInfo->SelectingItem[0] = InsertDlgItem(950 MdiInfo[i]->MdiRadInfo->SelectingItem[0] = InsertDlgItem( 950 951 i, 951 952 i2, … … 961 962 ); 962 963 } 963 if(MdiInfo[i] .MdiRadInfo->ButtonSelect==IDC_TOOL_CHECKBOX){964 if(MdiInfo[i]->MdiRadInfo->ButtonSelect==IDC_TOOL_CHECKBOX){ 964 965 //チェック ボックス作成 965 966 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){ … … 974 975 } 975 976 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect); 976 pos.x=rect.left-MdiInfo[i] .MdiRadInfo->ClientPos.x;977 pos.y=rect.top-MdiInfo[i] .MdiRadInfo->ClientPos.y;977 pos.x=rect.left-MdiInfo[i]->MdiRadInfo->ClientPos.x; 978 pos.y=rect.top-MdiInfo[i]->MdiRadInfo->ClientPos.y; 978 979 size.cx=rect.right-rect.left; 979 980 size.cy=rect.bottom-rect.top; 980 MdiInfo[i] .MdiRadInfo->SelectingItem[0]=InsertDlgItem(981 MdiInfo[i]->MdiRadInfo->SelectingItem[0]=InsertDlgItem( 981 982 i, 982 983 i2, … … 994 995 ); 995 996 } 996 if(MdiInfo[i] .MdiRadInfo->ButtonSelect==IDC_TOOL_COMBOBOX){997 if(MdiInfo[i]->MdiRadInfo->ButtonSelect==IDC_TOOL_COMBOBOX){ 997 998 //コンボ ボックス作成 998 999 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){ … … 1007 1008 } 1008 1009 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect); 1009 pos.x=rect.left-MdiInfo[i] .MdiRadInfo->ClientPos.x;1010 pos.y=rect.top-MdiInfo[i] .MdiRadInfo->ClientPos.y;1010 pos.x=rect.left-MdiInfo[i]->MdiRadInfo->ClientPos.x; 1011 pos.y=rect.top-MdiInfo[i]->MdiRadInfo->ClientPos.y; 1011 1012 size.cx=rect.right-rect.left; 1012 1013 size.cy=rect.bottom-rect.top; 1013 MdiInfo[i] .MdiRadInfo->SelectingItem[0] = InsertDlgItem(1014 MdiInfo[i]->MdiRadInfo->SelectingItem[0] = InsertDlgItem( 1014 1015 i, 1015 1016 i2, … … 1027 1028 ); 1028 1029 } 1029 else if(MdiInfo[i] .MdiRadInfo->ButtonSelect==IDC_TOOL_EDIT){1030 else if(MdiInfo[i]->MdiRadInfo->ButtonSelect==IDC_TOOL_EDIT){ 1030 1031 //エディット コントロール作成 1031 1032 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){ … … 1040 1041 } 1041 1042 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect); 1042 pos.x=rect.left-MdiInfo[i] .MdiRadInfo->ClientPos.x;1043 pos.y=rect.top-MdiInfo[i] .MdiRadInfo->ClientPos.y;1043 pos.x=rect.left-MdiInfo[i]->MdiRadInfo->ClientPos.x; 1044 pos.y=rect.top-MdiInfo[i]->MdiRadInfo->ClientPos.y; 1044 1045 size.cx=rect.right-rect.left; 1045 1046 size.cy=rect.bottom-rect.top; 1046 MdiInfo[i] .MdiRadInfo->SelectingItem[0] = InsertDlgItem(1047 MdiInfo[i]->MdiRadInfo->SelectingItem[0] = InsertDlgItem( 1047 1048 i, 1048 1049 i2, … … 1059 1060 ); 1060 1061 } 1061 else if(MdiInfo[i] .MdiRadInfo->ButtonSelect==IDC_TOOL_GROUPBOX){1062 else if(MdiInfo[i]->MdiRadInfo->ButtonSelect==IDC_TOOL_GROUPBOX){ 1062 1063 //グループ ボックス作成 1063 1064 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){ … … 1072 1073 } 1073 1074 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect); 1074 pos.x=rect.left-MdiInfo[i] .MdiRadInfo->ClientPos.x;1075 pos.y=rect.top-MdiInfo[i] .MdiRadInfo->ClientPos.y;1075 pos.x=rect.left-MdiInfo[i]->MdiRadInfo->ClientPos.x; 1076 pos.y=rect.top-MdiInfo[i]->MdiRadInfo->ClientPos.y; 1076 1077 size.cx=rect.right-rect.left; 1077 1078 size.cy=rect.bottom-rect.top; 1078 MdiInfo[i] .MdiRadInfo->SelectingItem[0] = InsertDlgItem(1079 MdiInfo[i]->MdiRadInfo->SelectingItem[0] = InsertDlgItem( 1079 1080 i, 1080 1081 i2, … … 1092 1093 ); 1093 1094 } 1094 else if(MdiInfo[i] .MdiRadInfo->ButtonSelect==IDC_TOOL_HSCROLLBAR){1095 else if(MdiInfo[i]->MdiRadInfo->ButtonSelect==IDC_TOOL_HSCROLLBAR){ 1095 1096 //水平スクロールバー作成 1096 1097 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){ … … 1105 1106 } 1106 1107 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect); 1107 pos.x=rect.left-MdiInfo[i] .MdiRadInfo->ClientPos.x;1108 pos.y=rect.top-MdiInfo[i] .MdiRadInfo->ClientPos.y;1108 pos.x=rect.left-MdiInfo[i]->MdiRadInfo->ClientPos.x; 1109 pos.y=rect.top-MdiInfo[i]->MdiRadInfo->ClientPos.y; 1109 1110 size.cx=rect.right-rect.left; 1110 1111 size.cy=rect.bottom-rect.top; 1111 MdiInfo[i] .MdiRadInfo->SelectingItem[0]=InsertDlgItem(1112 MdiInfo[i]->MdiRadInfo->SelectingItem[0]=InsertDlgItem( 1112 1113 i, 1113 1114 i2, … … 1125 1126 ); 1126 1127 } 1127 else if(MdiInfo[i] .MdiRadInfo->ButtonSelect==IDC_TOOL_IMAGEBOX){1128 else if(MdiInfo[i]->MdiRadInfo->ButtonSelect==IDC_TOOL_IMAGEBOX){ 1128 1129 //イメージ ボックス作成 1129 1130 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){ … … 1138 1139 } 1139 1140 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect); 1140 pos.x=rect.left-MdiInfo[i] .MdiRadInfo->ClientPos.x;1141 pos.y=rect.top-MdiInfo[i] .MdiRadInfo->ClientPos.y;1141 pos.x=rect.left-MdiInfo[i]->MdiRadInfo->ClientPos.x; 1142 pos.y=rect.top-MdiInfo[i]->MdiRadInfo->ClientPos.y; 1142 1143 size.cx=rect.right-rect.left; 1143 1144 size.cy=rect.bottom-rect.top; 1144 MdiInfo[i] .MdiRadInfo->SelectingItem[0] = InsertDlgItem(1145 MdiInfo[i]->MdiRadInfo->SelectingItem[0] = InsertDlgItem( 1145 1146 i, 1146 1147 i2, … … 1156 1157 ); 1157 1158 } 1158 else if(MdiInfo[i] .MdiRadInfo->ButtonSelect==IDC_TOOL_LISTBOX){1159 else if(MdiInfo[i]->MdiRadInfo->ButtonSelect==IDC_TOOL_LISTBOX){ 1159 1160 //リスト ボックス作成 1160 1161 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.Drag