Changeset 612 in dev
- Timestamp:
- May 18, 2008, 7:15:49 PM (17 years ago)
- Location:
- trunk/ab5.0/abdev/abdev
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/abdev/Common.h
r609 r612 1105 1105 1106 1106 //RadProc.cpp 1107 void NewRadWindow( int WndInfoNum);1107 void NewRadWindow( const WINDOW_INFO &windowInfo ); 1108 1108 int InsertDlgItem(int WndNum,int WndInfoNum,int ItemNum,POINT *pPos,SIZE *pSize,char *IdName,char *caption,DWORD style_or_WndNum,DWORD ExStyle,int Control,int ImageType,char *ImagePath,DWORD dwInsertType); 1109 1109 void DeleteDlgItem(int WndNum,int WndInfoNum,int ItemNum,BOOL bNoticeChanging); … … 1117 1117 1118 1118 //DrawWindow.cpp 1119 void DrawRadWindow(int WndNum, WINDOW_INFO *pWindowInfo);1119 void DrawRadWindow(int WndNum,const WINDOW_INFO *pWindowInfo); 1120 1120 1121 1121 //Rad_UndoRedo.cpp … … 1153 1153 //RadSupport.cpp 1154 1154 LRESULT CALLBACK TestWindowProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam); 1155 void SetSupportDlgData(int WndNum, int WndInfoNum);1155 void SetSupportDlgData(int WndNum, const WINDOW_INFO &windowInfo ); 1156 1156 BOOL CALLBACK DlgRadSupport(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam); 1157 1157 -
trunk/ab5.0/abdev/abdev/DrawWindow.cpp
r475 r612 689 689 DeleteObject(hBmp); 690 690 } 691 void DesigningWindow(int WndNum,HDC hdc,POINT *pBasePos, WINDOW_INFO *pWindowInfo){691 void DesigningWindow(int WndNum,HDC hdc,POINT *pBasePos,const WINDOW_INFO *pWindowInfo){ 692 692 extern MDIINFO MdiInfo[MAX_WNDNUM]; 693 693 extern PROJECTINFO ProjectInfo; … … 1751 1751 DeleteObject(hFont); 1752 1752 } 1753 void DrawRadWindow(int WndNum, WINDOW_INFO *pWindowInfo){1753 void DrawRadWindow(int WndNum,const WINDOW_INFO *pWindowInfo){ 1754 1754 extern MDIINFO MdiInfo[MAX_WNDNUM]; 1755 1755 HBRUSH hOldBrush; -
trunk/ab5.0/abdev/abdev/ProjectControl.cpp
r609 r612 182 182 for(i=0;i<static_cast<int>(ProjectInfo.windowInfos.size());i++){ 183 183 if(ProjectInfo.windowInfos[i].hTreeItem==hTreeItem){ 184 NewRadWindow( i);184 NewRadWindow( ProjectInfo.windowInfos[i] ); 185 185 break; 186 186 } … … 1590 1590 for(i3=0;i3<static_cast<int>(ProjectInfo.windowInfos.size());i3++){ 1591 1591 if(lstrcmpi(ProjectInfo.windowInfos[i3].name,temp2)==0){ 1592 NewRadWindow( i3);1592 NewRadWindow( ProjectInfo.windowInfos[i3] ); 1593 1593 break; 1594 1594 } … … 1712 1712 for(i3=0;i3<static_cast<int>(ProjectInfo.windowInfos.size());i3++){ 1713 1713 if(lstrcmpi(ProjectInfo.windowInfos[i3].name,temp2)==0){ 1714 NewRadWindow( i3);1714 NewRadWindow( ProjectInfo.windowInfos[i3] ); 1715 1715 break; 1716 1716 } -
trunk/ab5.0/abdev/abdev/RadProc.cpp
r611 r612 4 4 #include "common.h" 5 5 6 void NewRadWindow(int WndInfoNum){ 6 void NewRadWindow( const WINDOW_INFO &windowInfo ) 7 { 7 8 extern HINSTANCE hInst,hResInst; 8 9 extern HWND hDocCombo; … … 13 14 RECT rect; 14 15 MDICREATESTRUCT mdic; 15 WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];16 16 17 17 //すでに指定されたファイルが開かれている場合 … … 20 20 i=GetWndNum(hChild); 21 21 if(MdiInfo[i].DocType==WNDTYPE_RAD){ 22 if(lstrcmpi(MdiInfo[i].path, pWindowInfo->name)==0) break;22 if(lstrcmpi(MdiInfo[i].path,windowInfo.name)==0) break; 23 23 } 24 24 hChild=GetNextWindow(hChild,GW_HWNDNEXT); … … 29 29 } 30 30 31 mdic.szTitle= pWindowInfo->name;31 mdic.szTitle=windowInfo.name; 32 32 mdic.szClass="MDIClientWindow_Rad"; 33 33 mdic.hOwner=hInst; … … 86 86 MdiInfo[i].hwnd=hChild; 87 87 MdiInfo[i].DocType=WNDTYPE_RAD; 88 MdiInfo[i].title=(char *)GlobalAlloc(GMEM_FIXED,lstrlen( pWindowInfo->name)+1);89 lstrcpy(MdiInfo[i].title, pWindowInfo->name);90 MdiInfo[i].path=(char *)GlobalAlloc(GMEM_FIXED,lstrlen( pWindowInfo->name)+1);91 lstrcpy(MdiInfo[i].path, pWindowInfo->name);88 MdiInfo[i].title=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(windowInfo.name)+1); 89 lstrcpy(MdiInfo[i].title,windowInfo.name); 90 MdiInfo[i].path=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(windowInfo.name)+1); 91 lstrcpy(MdiInfo[i].path,windowInfo.name); 92 92 93 93 … … 127 127 128 128 129 DrawRadWindow(i, pWindowInfo);129 DrawRadWindow(i,&windowInfo); 130 130 131 131 //サポートダイアログの内容をセット 132 SetSupportDlgData(i, WndInfoNum);132 SetSupportDlgData(i,windowInfo); 133 133 134 134 break; … … 142 142 ResizeToRadToolWindows(i,rect.right,rect.bottom); 143 143 144 i=SendMessage(hDocCombo,CB_ADDSTRING,0,(long) pWindowInfo->name); //Docコンボボックスに追加144 i=SendMessage(hDocCombo,CB_ADDSTRING,0,(long)windowInfo.name); //Docコンボボックスに追加 145 145 SendMessage(hDocCombo,CB_SETCURSEL,i,0); 146 146 147 147 //タブに追加 148 pobj_MainTab->InsertItem( pWindowInfo->name, true );148 pobj_MainTab->InsertItem( windowInfo.name, true ); 149 149 150 150 //メニュー状態を設定 … … 678 678 679 679 //サポートダイアログの内容をセット 680 SetSupportDlgData( WndNum,WndInfoNum);680 SetSupportDlgData( WndNum, ProjectInfo.windowInfos[WndInfoNum] ); 681 681 } 682 682 void SetItemNumOnFrame(int WndNum,int WndInfoNum,RECT *pRect){ … … 843 843 844 844 //サポートダイアログの内容をセット 845 SetSupportDlgData( i,i2);845 SetSupportDlgData( i, *pWindowInfo ); 846 846 break; 847 847 } … … 958 958 959 959 //サポートダイアログの内容をセット 960 SetSupportDlgData( i,i2);960 SetSupportDlgData( i, *pWindowInfo ); 961 961 } 962 962 } … … 1280 1280 } 1281 1281 case WM_MOUSEMOVE: 1282 mouse.x=(int)(short)LOWORD(lParam); 1283 mouse.y=(int)(short)HIWORD(lParam); 1284 CursorPos_LocalToGlobal(hwnd,&mouse.x,&mouse.y); 1285 1286 hParent=GetParent(hwnd); 1287 i=GetWndNum(hParent); 1288 i2 = GetWndInfoNum(MdiInfo[i].path); 1289 1290 if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){ 1291 if(wParam&MK_LBUTTON&&RadInfo.NowDragging){ 1292 //////////////////////////////////////////////// 1293 // ドラッグ中の場合(コントロールのサイズ変更) 1294 1295 if(RadInfo.NowDragging==FRAME_UPPER_LEFT){ 1296 if(RadInfo.DraggingRect[0].right-MIN_ITEM_X<=(mouse.x+LEVER_THICK)) 1297 RadInfo.DraggingRect[0].left=RadInfo.DraggingRect[0].right-MIN_ITEM_X; 1298 else if(mouse.x+LEVER_THICK<MdiInfo[i].MdiRadInfo->ClientPos.x) 1299 RadInfo.DraggingRect[0].left=MdiInfo[i].MdiRadInfo->ClientPos.x; 1300 else RadInfo.DraggingRect[0].left=mouse.x+LEVER_THICK; 1301 1302 if(RadInfo.DraggingRect[0].bottom-MIN_ITEM_Y<=(mouse.y+LEVER_THICK)) 1303 RadInfo.DraggingRect[0].top=RadInfo.DraggingRect[0].bottom-MIN_ITEM_Y; 1304 else if(mouse.y+LEVER_THICK<MdiInfo[i].MdiRadInfo->ClientPos.y) 1305 RadInfo.DraggingRect[0].top=MdiInfo[i].MdiRadInfo->ClientPos.y; 1306 else RadInfo.DraggingRect[0].top=mouse.y+LEVER_THICK; 1307 DrawFrame(hwnd,i,i2,&RadInfo.DraggingRect[0],&RadInfo.OldDraggingRect[0],0); 1308 } 1309 else if(RadInfo.NowDragging==FRAME_UPPER_RIGHT){ 1310 if(mouse.x-LEVER_THICK-MIN_ITEM_X<=RadInfo.DraggingRect[0].left) 1311 RadInfo.DraggingRect[0].right=RadInfo.DraggingRect[0].left+MIN_ITEM_X; 1312 else if(mouse.x>MdiInfo[i].MdiRadInfo->ClientPos.x+MdiInfo[i].MdiRadInfo->ClientSize.cx) 1313 RadInfo.DraggingRect[0].right=MdiInfo[i].MdiRadInfo->ClientPos.x+MdiInfo[i].MdiRadInfo->ClientSize.cx; 1314 else RadInfo.DraggingRect[0].right=mouse.x-LEVER_THICK; 1315 1316 if(RadInfo.DraggingRect[0].bottom-MIN_ITEM_Y<=(mouse.y+LEVER_THICK)) RadInfo.DraggingRect[0].top=RadInfo.DraggingRect[0].bottom-MIN_ITEM_Y; 1317 else if(mouse.y+LEVER_THICK<MdiInfo[i].MdiRadInfo->ClientPos.y) 1318 RadInfo.DraggingRect[0].top=MdiInfo[i].MdiRadInfo->ClientPos.y; 1319 else RadInfo.DraggingRect[0].top=mouse.y+LEVER_THICK; 1320 DrawFrame(hwnd,i,i2,&RadInfo.DraggingRect[0],&RadInfo.OldDraggingRect[0],0); 1321 } 1322 else if(RadInfo.NowDragging==FRAME_LOWER_LEFT){ 1323 if(RadInfo.DraggingRect[0].right-MIN_ITEM_X<=(mouse.x+LEVER_THICK)) 1324 RadInfo.DraggingRect[0].left=RadInfo.DraggingRect[0].right-MIN_ITEM_X; 1325 else if(mouse.x+LEVER_THICK<MdiInfo[i].MdiRadInfo->ClientPos.x) 1326 RadInfo.DraggingRect[0].left=MdiInfo[i].MdiRadInfo->ClientPos.x; 1327 else RadInfo.DraggingRect[0].left=mouse.x+LEVER_THICK; 1328 1329 if(mouse.y-LEVER_THICK-MIN_ITEM_Y<=RadInfo.DraggingRect[0].top) 1330 RadInfo.DraggingRect[0].bottom=RadInfo.DraggingRect[0].top+MIN_ITEM_Y; 1331 else if(mouse.y>MdiInfo[i].MdiRadInfo->ClientPos.y+MdiInfo[i].MdiRadInfo->ClientSize.cy) 1332 RadInfo.DraggingRect[0].bottom=MdiInfo[i].MdiRadInfo->ClientPos.y+MdiInfo[i].MdiRadInfo->ClientSize.cy; 1333 else RadInfo.DraggingRect[0].bottom=mouse.y-LEVER_THICK; 1334 DrawFrame(hwnd,i,i2,&RadInfo.DraggingRect[0],&RadInfo.OldDraggingRect[0],0); 1335 } 1336 else if(RadInfo.NowDragging==FRAME_LOWER_RIGHT){ 1337 if(mouse.x-LEVER_THICK-MIN_ITEM_X<=RadInfo.DraggingRect[0].left) 1338 RadInfo.DraggingRect[0].right=RadInfo.DraggingRect[0].left+MIN_ITEM_X; 1339 else if((mouse.x>MdiInfo[i].MdiRadInfo->ClientPos.x+MdiInfo[i].MdiRadInfo->ClientSize.cx)&&MdiInfo[i].MdiRadInfo->SelectingItem[0]!=SELECT_WINDOW) 1340 RadInfo.DraggingRect[0].right=MdiInfo[i].MdiRadInfo->ClientPos.x+MdiInfo[i].MdiRadInfo->ClientSize.cx; 1341 else RadInfo.DraggingRect[0].right=mouse.x-LEVER_THICK; 1342 1343 if(mouse.y-LEVER_THICK-MIN_ITEM_Y<=RadInfo.DraggingRect[0].top) 1344 RadInfo.DraggingRect[0].bottom=RadInfo.DraggingRect[0].top+MIN_ITEM_Y; 1345 else if((mouse.y>MdiInfo[i].MdiRadInfo->ClientPos.y+MdiInfo[i].MdiRadInfo->ClientSize.cy)&&MdiInfo[i].MdiRadInfo->SelectingItem[0]!=SELECT_WINDOW) 1346 RadInfo.DraggingRect[0].bottom=MdiInfo[i].MdiRadInfo->ClientPos.y+MdiInfo[i].MdiRadInfo->ClientSize.cy; 1347 else RadInfo.DraggingRect[0].bottom=mouse.y-LEVER_THICK; 1348 DrawFrame(hwnd,i,i2,&RadInfo.DraggingRect[0],&RadInfo.OldDraggingRect[0],0); 1349 } 1350 else if(RadInfo.NowDragging==FRAME_LEFT){ 1351 if(RadInfo.DraggingRect[0].right-MIN_ITEM_X<=(mouse.x+LEVER_THICK)) 1352 RadInfo.DraggingRect[0].left=RadInfo.DraggingRect[0].right-MIN_ITEM_X; 1353 else if(mouse.x+LEVER_THICK<MdiInfo[i].MdiRadInfo->ClientPos.x) 1354 RadInfo.DraggingRect[0].left=MdiInfo[i].MdiRadInfo->ClientPos.x; 1355 else RadInfo.DraggingRect[0].left=mouse.x+LEVER_THICK; 1356 DrawFrame(hwnd,i,i2,&RadInfo.DraggingRect[0],&RadInfo.OldDraggingRect[0],0); 1357 } 1358 else if(RadInfo.NowDragging==FRAME_RIGHT){ 1359 if(mouse.x-LEVER_THICK-MIN_ITEM_X<=RadInfo.DraggingRect[0].left) 1360 RadInfo.DraggingRect[0].right=RadInfo.DraggingRect[0].left+MIN_ITEM_X; 1361 else if((mouse.x>MdiInfo[i].MdiRadInfo->ClientPos.x+MdiInfo[i].MdiRadInfo->ClientSize.cx)&&MdiInfo[i].MdiRadInfo->SelectingItem[0]!=SELECT_WINDOW) 1362 RadInfo.DraggingRect[0].right=MdiInfo[i].MdiRadInfo->ClientPos.x+MdiInfo[i].MdiRadInfo->ClientSize.cx; 1363 else RadInfo.DraggingRect[0].right=mouse.x-LEVER_THICK; 1364 DrawFrame(hwnd,i,i2,&RadInfo.DraggingRect[0],&RadInfo.OldDraggingRect[0],0); 1365 } 1366 else if(RadInfo.NowDragging==FRAME_UPPER){ 1367 if(RadInfo.DraggingRect[0].bottom-MIN_ITEM_Y<=(mouse.y+LEVER_THICK)) 1368 RadInfo.DraggingRect[0].top=RadInfo.DraggingRect[0].bottom-MIN_ITEM_Y; 1369 else if(mouse.y+LEVER_THICK<MdiInfo[i].MdiRadInfo->ClientPos.y) 1370 RadInfo.DraggingRect[0].top=MdiInfo[i].MdiRadInfo->ClientPos.y; 1371 else RadInfo.DraggingRect[0].top=mouse.y+LEVER_THICK; 1372 DrawFrame(hwnd,i,i2,&RadInfo.DraggingRect[0],&RadInfo.OldDraggingRect[0],0); 1373 } 1374 else if(RadInfo.NowDragging==FRAME_LOWER){ 1375 if(mouse.y-LEVER_THICK-MIN_ITEM_Y<=RadInfo.DraggingRect[0].top) 1376 RadInfo.DraggingRect[0].bottom=RadInfo.DraggingRect[0].top+MIN_ITEM_Y; 1377 else if((mouse.y>MdiInfo[i].MdiRadInfo->ClientPos.y+MdiInfo[i].MdiRadInfo->ClientSize.cy)&&MdiInfo[i].MdiRadInfo->SelectingItem[0]!=SELECT_WINDOW) 1378 RadInfo.DraggingRect[0].bottom=MdiInfo[i].MdiRadInfo->ClientPos.y+MdiInfo[i].MdiRadInfo->ClientSize.cy; 1379 else RadInfo.DraggingRect[0].bottom=mouse.y-LEVER_THICK; 1380 DrawFrame(hwnd,i,i2,&RadInfo.DraggingRect[0],&RadInfo.OldDraggingRect[0],0); 1381 } 1382 else if(RadInfo.NowDragging==FRAME_INSIDE){ 1383 i3=0; 1384 while(MdiInfo[i].MdiRadInfo->SelectingItem[i3]!=-1){ 1385 i4=RadInfo.DragStartRect[i3].left+mouse.x-RadInfo.DragStartPos.x; 1386 1387 if(i4>MdiInfo[i].MdiRadInfo->ClientPos.x){ 1388 i4=RadInfo.DragStartRect[i3].right+mouse.x-RadInfo.DragStartPos.x; 1389 if(i4<MdiInfo[i].MdiRadInfo->ClientPos.x+MdiInfo[i].MdiRadInfo->ClientSize.cx) i4=0; 1390 else i4-=MdiInfo[i].MdiRadInfo->ClientPos.x+MdiInfo[i].MdiRadInfo->ClientSize.cx; 1282 { 1283 mouse.x=(int)(short)LOWORD(lParam); 1284 mouse.y=(int)(short)HIWORD(lParam); 1285 CursorPos_LocalToGlobal(hwnd,&mouse.x,&mouse.y); 1286 1287 hParent=GetParent(hwnd); 1288 i=GetWndNum(hParent); 1289 i2 = GetWndInfoNum(MdiInfo[i].path); 1290 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 1291 1292 if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){ 1293 if(wParam&MK_LBUTTON&&RadInfo.NowDragging){ 1294 //////////////////////////////////////////////// 1295 // ドラッグ中の場合(コントロールのサイズ変更) 1296 1297 if(RadInfo.NowDragging==FRAME_UPPER_LEFT){ 1298 if(RadInfo.DraggingRect[0].right-MIN_ITEM_X<=(mouse.x+LEVER_THICK)) 1299 RadInfo.DraggingRect[0].left=RadInfo.DraggingRect[0].right-MIN_ITEM_X; 1300 else if(mouse.x+LEVER_THICK<MdiInfo[i].MdiRadInfo->ClientPos.x) 1301 RadInfo.DraggingRect[0].left=MdiInfo[i].MdiRadInfo->ClientPos.x; 1302 else RadInfo.DraggingRect[0].left=mouse.x+LEVER_THICK; 1303 1304 if(RadInfo.DraggingRect[0].bottom-MIN_ITEM_Y<=(mouse.y+LEVER_THICK)) 1305 RadInfo.DraggingRect[0].top=RadInfo.DraggingRect[0].bottom-MIN_ITEM_Y; 1306 else if(mouse.y+LEVER_THICK<MdiInfo[i].MdiRadInfo->ClientPos.y) 1307 RadInfo.DraggingRect[0].top=MdiInfo[i].MdiRadInfo->ClientPos.y; 1308 else RadInfo.DraggingRect[0].top=mouse.y+LEVER_THICK; 1309 DrawFrame(hwnd,i,i2,&RadInfo.DraggingRect[0],&RadInfo.OldDraggingRect[0],0); 1310 } 1311 else if(RadInfo.NowDragging==FRAME_UPPER_RIGHT){ 1312 if(mouse.x-LEVER_THICK-MIN_ITEM_X<=RadInfo.DraggingRect[0].left) 1313 RadInfo.DraggingRect[0].right=RadInfo.DraggingRect[0].left+MIN_ITEM_X; 1314 else if(mouse.x>MdiInfo[i].MdiRadInfo->ClientPos.x+MdiInfo[i].MdiRadInfo->ClientSize.cx) 1315 RadInfo.DraggingRect[0].right=MdiInfo[i].MdiRadInfo->ClientPos.x+MdiInfo[i].MdiRadInfo->ClientSize.cx; 1316 else RadInfo.DraggingRect[0].right=mouse.x-LEVER_THICK; 1317 1318 if(RadInfo.DraggingRect[0].bottom-MIN_ITEM_Y<=(mouse.y+LEVER_THICK)) RadInfo.DraggingRect[0].top=RadInfo.DraggingRect[0].bottom-MIN_ITEM_Y; 1319 else if(mouse.y+LEVER_THICK<MdiInfo[i].MdiRadInfo->ClientPos.y) 1320 RadInfo.DraggingRect[0].top=MdiInfo[i].MdiRadInfo->ClientPos.y; 1321 else RadInfo.DraggingRect[0].top=mouse.y+LEVER_THICK; 1322 DrawFrame(hwnd,i,i2,&RadInfo.DraggingRect[0],&RadInfo.OldDraggingRect[0],0); 1323 } 1324 else if(RadInfo.NowDragging==FRAME_LOWER_LEFT){ 1325 if(RadInfo.DraggingRect[0].right-MIN_ITEM_X<=(mouse.x+LEVER_THICK)) 1326 RadInfo.DraggingRect[0].left=RadInfo.DraggingRect[0].right-MIN_ITEM_X; 1327 else if(mouse.x+LEVER_THICK<MdiInfo[i].MdiRadInfo->ClientPos.x) 1328 RadInfo.DraggingRect[0].left=MdiInfo[i].MdiRadInfo->ClientPos.x; 1329 else RadInfo.DraggingRect[0].left=mouse.x+LEVER_THICK; 1330 1331 if(mouse.y-LEVER_THICK-MIN_ITEM_Y<=RadInfo.DraggingRect[0].top) 1332 RadInfo.DraggingRect[0].bottom=RadInfo.DraggingRect[0].top+MIN_ITEM_Y; 1333 else if(mouse.y>MdiInfo[i].MdiRadInfo->ClientPos.y+MdiInfo[i].MdiRadInfo->ClientSize.cy) 1334 RadInfo.DraggingRect[0].bottom=MdiInfo[i].MdiRadInfo->ClientPos.y+MdiInfo[i].MdiRadInfo->ClientSize.cy; 1335 else RadInfo.DraggingRect[0].bottom=mouse.y-LEVER_THICK; 1336 DrawFrame(hwnd,i,i2,&RadInfo.DraggingRect[0],&RadInfo.OldDraggingRect[0],0); 1337 } 1338 else if(RadInfo.NowDragging==FRAME_LOWER_RIGHT){ 1339 if(mouse.x-LEVER_THICK-MIN_ITEM_X<=RadInfo.DraggingRect[0].left) 1340 RadInfo.DraggingRect[0].right=RadInfo.DraggingRect[0].left+MIN_ITEM_X; 1341 else if((mouse.x>MdiInfo[i].MdiRadInfo->ClientPos.x+MdiInfo[i].MdiRadInfo->ClientSize.cx)&&MdiInfo[i].MdiRadInfo->SelectingItem[0]!=SELECT_WINDOW) 1342 RadInfo.DraggingRect[0].right=MdiInfo[i].MdiRadInfo->ClientPos.x+MdiInfo[i].MdiRadInfo->ClientSize.cx; 1343 else RadInfo.DraggingRect[0].right=mouse.x-LEVER_THICK; 1344 1345 if(mouse.y-LEVER_THICK-MIN_ITEM_Y<=RadInfo.DraggingRect[0].top) 1346 RadInfo.DraggingRect[0].bottom=RadInfo.DraggingRect[0].top+MIN_ITEM_Y; 1347 else if((mouse.y>MdiInfo[i].MdiRadInfo->ClientPos.y+MdiInfo[i].MdiRadInfo->ClientSize.cy)&&MdiInfo[i].MdiRadInfo->SelectingItem[0]!=SELECT_WINDOW) 1348 RadInfo.DraggingRect[0].bottom=MdiInfo[i].MdiRadInfo->ClientPos.y+MdiInfo[i].MdiRadInfo->ClientSize.cy; 1349 else RadInfo.DraggingRect[0].bottom=mouse.y-LEVER_THICK; 1350 DrawFrame(hwnd,i,i2,&RadInfo.DraggingRect[0],&RadInfo.OldDraggingRect[0],0); 1351 } 1352 else if(RadInfo.NowDragging==FRAME_LEFT){ 1353 if(RadInfo.DraggingRect[0].right-MIN_ITEM_X<=(mouse.x+LEVER_THICK)) 1354 RadInfo.DraggingRect[0].left=RadInfo.DraggingRect[0].right-MIN_ITEM_X; 1355 else if(mouse.x+LEVER_THICK<MdiInfo[i].MdiRadInfo->ClientPos.x) 1356 RadInfo.DraggingRect[0].left=MdiInfo[i].MdiRadInfo->ClientPos.x; 1357 else RadInfo.DraggingRect[0].left=mouse.x+LEVER_THICK; 1358 DrawFrame(hwnd,i,i2,&RadInfo.DraggingRect[0],&RadInfo.OldDraggingRect[0],0); 1359 } 1360 else if(RadInfo.NowDragging==FRAME_RIGHT){ 1361 if(mouse.x-LEVER_THICK-MIN_ITEM_X<=RadInfo.DraggingRect[0].left) 1362 RadInfo.DraggingRect[0].right=RadInfo.DraggingRect[0].left+MIN_ITEM_X; 1363 else if((mouse.x>MdiInfo[i].MdiRadInfo->ClientPos.x+MdiInfo[i].MdiRadInfo->ClientSize.cx)&&MdiInfo[i].MdiRadInfo->SelectingItem[0]!=SELECT_WINDOW) 1364 RadInfo.DraggingRect[0].right=MdiInfo[i].MdiRadInfo->ClientPos.x+MdiInfo[i].MdiRadInfo->ClientSize.cx; 1365 else RadInfo.DraggingRect[0].right=mouse.x-LEVER_THICK; 1366 DrawFrame(hwnd,i,i2,&RadInfo.DraggingRect[0],&RadInfo.OldDraggingRect[0],0); 1367 } 1368 else if(RadInfo.NowDragging==FRAME_UPPER){ 1369 if(RadInfo.DraggingRect[0].bottom-MIN_ITEM_Y<=(mouse.y+LEVER_THICK)) 1370 RadInfo.DraggingRect[0].top=RadInfo.DraggingRect[0].bottom-MIN_ITEM_Y; 1371 else if(mouse.y+LEVER_THICK<MdiInfo[i].MdiRadInfo->ClientPos.y) 1372 RadInfo.DraggingRect[0].top=MdiInfo[i].MdiRadInfo->ClientPos.y; 1373 else RadInfo.DraggingRect[0].top=mouse.y+LEVER_THICK; 1374 DrawFrame(hwnd,i,i2,&RadInfo.DraggingRect[0],&RadInfo.OldDraggingRect[0],0); 1375 } 1376 else if(RadInfo.NowDragging==FRAME_LOWER){ 1377 if(mouse.y-LEVER_THICK-MIN_ITEM_Y<=RadInfo.DraggingRect[0].top) 1378 RadInfo.DraggingRect[0].bottom=RadInfo.DraggingRect[0].top+MIN_ITEM_Y; 1379 else if((mouse.y>MdiInfo[i].MdiRadInfo->ClientPos.y+MdiInfo[i].MdiRadInfo->ClientSize.cy)&&MdiInfo[i].MdiRadInfo->SelectingItem[0]!=SELECT_WINDOW) 1380 RadInfo.DraggingRect[0].bottom=MdiInfo[i].MdiRadInfo->ClientPos.y+MdiInfo[i].MdiRadInfo->ClientSize.cy; 1381 else RadInfo.DraggingRect[0].bottom=mouse.y-LEVER_THICK; 1382 DrawFrame(hwnd,i,i2,&RadInfo.DraggingRect[0],&RadInfo.OldDraggingRect[0],0); 1383 } 1384 else if(RadInfo.NowDragging==FRAME_INSIDE){ 1385 i3=0; 1386 while(MdiInfo[i].MdiRadInfo->SelectingItem[i3]!=-1){ 1387 i4=RadInfo.DragStartRect[i3].left+mouse.x-RadInfo.DragStartPos.x; 1388 1389 if(i4>MdiInfo[i].MdiRadInfo->ClientPos.x){ 1390 i4=RadInfo.DragStartRect[i3].right+mouse.x-RadInfo.DragStartPos.x; 1391 if(i4<MdiInfo[i].MdiRadInfo->ClientPos.x+MdiInfo[i].MdiRadInfo->ClientSize.cx) i4=0; 1392 else i4-=MdiInfo[i].MdiRadInfo->ClientPos.x+MdiInfo[i].MdiRadInfo->ClientSize.cx; 1393 } 1394 else i4-=MdiInfo[i].MdiRadInfo->ClientPos.x; 1395 //i4は枠外に出たときのポインタと壁にあたったコントロールとの差 1396 RadInfo.DraggingRect[i3].left=RadInfo.DragStartRect[i3].left+mouse.x-RadInfo.DragStartPos.x-i4; 1397 RadInfo.DraggingRect[i3].right=RadInfo.DragStartRect[i3].right+mouse.x-RadInfo.DragStartPos.x-i4; 1398 1399 i4=RadInfo.DragStartRect[i3].top+mouse.y-RadInfo.DragStartPos.y; 1400 if(i4>MdiInfo[i].MdiRadInfo->ClientPos.y){ 1401 i4=RadInfo.DragStartRect[i3].bottom+mouse.y-RadInfo.DragStartPos.y; 1402 if(i4<MdiInfo[i].MdiRadInfo->ClientPos.y+MdiInfo[i].MdiRadInfo->ClientSize.cy) i4=0; 1403 else i4-=MdiInfo[i].MdiRadInfo->ClientPos.y+MdiInfo[i].MdiRadInfo->ClientSize.cy; 1404 } 1405 else i4-=MdiInfo[i].MdiRadInfo->ClientPos.y; 1406 RadInfo.DraggingRect[i3].top=RadInfo.DragStartRect[i3].top+mouse.y-RadInfo.DragStartPos.y-i4; 1407 RadInfo.DraggingRect[i3].bottom=RadInfo.DragStartRect[i3].bottom+mouse.y-RadInfo.DragStartPos.y-i4; 1408 1409 if(MdiInfo[i].MdiRadInfo->SelectingItem[1]==-1) i4=1; 1410 else i4=0; 1411 DrawFrame(hwnd,i,i2,&RadInfo.DraggingRect[i3],&RadInfo.OldDraggingRect[i3],i4); 1412 i3++; 1391 1413 } 1392 else i4-=MdiInfo[i].MdiRadInfo->ClientPos.x; 1393 //i4は枠外に出たときのポインタと壁にあたったコントロールとの差 1394 RadInfo.DraggingRect[i3].left=RadInfo.DragStartRect[i3].left+mouse.x-RadInfo.DragStartPos.x-i4; 1395 RadInfo.DraggingRect[i3].right=RadInfo.DragStartRect[i3].right+mouse.x-RadInfo.DragStartPos.x-i4; 1396 1397 i4=RadInfo.DragStartRect[i3].top+mouse.y-RadInfo.DragStartPos.y; 1398 if(i4>MdiInfo[i].MdiRadInfo->ClientPos.y){ 1399 i4=RadInfo.DragStartRect[i3].bottom+mouse.y-RadInfo.DragStartPos.y; 1400 if(i4<MdiInfo[i].MdiRadInfo->ClientPos.y+MdiInfo[i].MdiRadInfo->ClientSize.cy) i4=0; 1401 else i4-=MdiInfo[i].MdiRadInfo->ClientPos.y+MdiInfo[i].MdiRadInfo->ClientSize.cy; 1402 } 1403 else i4-=MdiInfo[i].MdiRadInfo->ClientPos.y; 1404 RadInfo.DraggingRect[i3].top=RadInfo.DragStartRect[i3].top+mouse.y-RadInfo.DragStartPos.y-i4; 1405 RadInfo.DraggingRect[i3].bottom=RadInfo.DragStartRect[i3].bottom+mouse.y-RadInfo.DragStartPos.y-i4; 1406 1407 if(MdiInfo[i].MdiRadInfo->SelectingItem[1]==-1) i4=1; 1408 else i4=0; 1409 DrawFrame(hwnd,i,i2,&RadInfo.DraggingRect[i3],&RadInfo.OldDraggingRect[i3],i4); 1410 i3++; 1411 } 1412 } 1413 else if(RadInfo.NowDragging==SELECTING_FRAME){ 1414 RadInfo.DraggingRect[0].left=RadInfo.DragStartPos.x; 1415 RadInfo.DraggingRect[0].top=RadInfo.DragStartPos.y; 1414 } 1415 else if(RadInfo.NowDragging==SELECTING_FRAME){ 1416 RadInfo.DraggingRect[0].left=RadInfo.DragStartPos.x; 1417 RadInfo.DraggingRect[0].top=RadInfo.DragStartPos.y; 1418 RadInfo.DraggingRect[0].right=mouse.x; 1419 RadInfo.DraggingRect[0].bottom=mouse.y; 1420 DrawFrame(hwnd,i,i2,&RadInfo.DraggingRect[0],&RadInfo.OldDraggingRect[0],0); 1421 } 1422 SetCursorByState(RadInfo.NowDragging); 1423 1424 SetStatusText(NULL); 1425 1426 //サポートダイアログの内容をセット 1427 SetSupportDlgData( i, *pWindowInfo ); 1428 } 1429 else{ 1430 //ドラッグ中でないとき 1431 SetCursorByState(GetStateOfDraggingFrame(i,i2,mouse.x,mouse.y)); 1432 } 1433 } 1434 else{ 1435 //アイテム(子ウィンドウ作成中) 1436 if(wParam&MK_LBUTTON&&RadInfo.NowDragging==ITEM_MAKING){ 1437 //ドラッグ中の場合 1438 1416 1439 RadInfo.DraggingRect[0].right=mouse.x; 1417 1440 RadInfo.DraggingRect[0].bottom=mouse.y; 1418 1441 DrawFrame(hwnd,i,i2,&RadInfo.DraggingRect[0],&RadInfo.OldDraggingRect[0],0); 1419 1442 } 1420 SetCursorByState(RadInfo.NowDragging);1421 1422 SetStatusText(NULL);1423 1424 //サポートダイアログの内容をセット1425 SetSupportDlgData(i,i2);1426 1443 } 1427 else{ 1428 //ドラッグ中でないとき 1429 SetCursorByState(GetStateOfDraggingFrame(i,i2,mouse.x,mouse.y)); 1430 } 1444 return 0; 1431 1445 } 1432 else{1433 //アイテム(子ウィンドウ作成中)1434 if(wParam&MK_LBUTTON&&RadInfo.NowDragging==ITEM_MAKING){1435 //ドラッグ中の場合1436 1437 RadInfo.DraggingRect[0].right=mouse.x;1438 RadInfo.DraggingRect[0].bottom=mouse.y;1439 DrawFrame(hwnd,i,i2,&RadInfo.DraggingRect[0],&RadInfo.OldDraggingRect[0],0);1440 }1441 }1442 return 0;1443 1446 case WM_LBUTTONDBLCLK: 1444 1447 { … … 1477 1480 hParent=GetParent(hwnd); 1478 1481 i=GetWndNum(hParent); 1479 i2=GetWndInfoNum(MdiInfo[i].path);1480 1482 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 1481 1483 if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){ … … 1502 1504 1503 1505 //サポートダイアログの内容をセット 1504 SetSupportDlgData( i,i2);1506 SetSupportDlgData( i, *pWindowInfo ); 1505 1507 } 1506 1508 } … … 1528 1530 1529 1531 //サポートダイアログの内容をセット 1530 SetSupportDlgData( i,i2);1532 SetSupportDlgData( i, *pWindowInfo ); 1531 1533 } 1532 1534 else if(wParam==VK_LEFT){ … … 1549 1551 1550 1552 //サポートダイアログの内容をセット 1551 SetSupportDlgData( i,i2);1553 SetSupportDlgData( i, *pWindowInfo ); 1552 1554 } 1553 1555 else if(wParam==VK_UP){ … … 1570 1572 1571 1573 //サポートダイアログの内容をセット 1572 SetSupportDlgData( i,i2);1574 SetSupportDlgData( i, *pWindowInfo ); 1573 1575 } 1574 1576 else if(wParam==VK_DOWN){ … … 1591 1593 1592 1594 //サポートダイアログの内容をセット 1593 SetSupportDlgData( i,i2);1595 SetSupportDlgData( i, *pWindowInfo ); 1594 1596 } 1595 1597 else if(wParam==VK_DELETE) -
trunk/ab5.0/abdev/abdev/RadSupport.cpp
r609 r612 172 172 } 173 173 174 void SetSupportDlgData(int WndNum,int WndInfoNum){ 174 void SetSupportDlgData(int WndNum, const WINDOW_INFO &windowInfo ) 175 { 175 176 //////////////////////////////////// 176 177 // サポートダイアログの内容をセット … … 186 187 hSupport=MdiInfo[WndNum].MdiRadInfo->hSupport; 187 188 188 WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum];189 190 189 if(RadInfo.NowDragging>=FRAME_CHANGEPOS_START&&RadInfo.NowDragging<=FRAME_CHANGEPOS_END&& 191 190 (!(MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]!=-1&&MdiInfo[WndNum].MdiRadInfo->SelectingItem[1]!=-1))){ … … 213 212 SetDlgItemText(hSupport,IDC_YPOS,""); 214 213 215 sprintf(temporary,"%d", pWindowInfo->size.cx);214 sprintf(temporary,"%d",windowInfo.size.cx); 216 215 SetDlgItemText(hSupport,IDC_WIDTH,temporary); 217 216 218 sprintf(temporary,"%d", pWindowInfo->size.cy);217 sprintf(temporary,"%d",windowInfo.size.cy); 219 218 SetDlgItemText(hSupport,IDC_HEIGHT,temporary); 220 219 } … … 240 239 EnableWindow(GetDlgItem(hSupport,IDC_SPIN4),1); 241 240 242 sprintf(temporary,"%d", pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].pos.x);241 sprintf(temporary,"%d",windowInfo.pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].pos.x); 243 242 SetDlgItemText(hSupport,IDC_XPOS,temporary); 244 243 245 sprintf(temporary,"%d", pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].pos.y);244 sprintf(temporary,"%d",windowInfo.pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].pos.y); 246 245 SetDlgItemText(hSupport,IDC_YPOS,temporary); 247 246 248 sprintf(temporary,"%d", pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].size.cx);247 sprintf(temporary,"%d",windowInfo.pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].size.cx); 249 248 SetDlgItemText(hSupport,IDC_WIDTH,temporary); 250 249 251 sprintf(temporary,"%d", pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].size.cy);250 sprintf(temporary,"%d",windowInfo.pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].size.cy); 252 251 SetDlgItemText(hSupport,IDC_HEIGHT,temporary); 253 252 } -
trunk/ab5.0/abdev/abdev/Rad_UndoRedo.cpp
r609 r612 161 161 162 162 //サポートダイアログの内容をセット 163 SetSupportDlgData( WndNum,WndInfoNum);163 SetSupportDlgData( WndNum, *pWindowInfo ); 164 164 break; 165 165 case RAD_UNDO_IMAGESTATE: … … 346 346 347 347 //サポートダイアログの内容をセット 348 SetSupportDlgData( WndNum,WndInfoNum);348 SetSupportDlgData( WndNum, *pWindowInfo ); 349 349 break; 350 350 case RAD_UNDO_IMAGESTATE: -
trunk/ab5.0/abdev/abdev/WindowControl.cpp
r609 r612 15 15 int GetWndInfoNum(char *name){ 16 16 extern PROJECTINFO ProjectInfo; 17 int i; 18 for(i=0;i<ProjectInfo.windowInfos.size();i++){ 17 for( int i=0;i<static_cast<int>(ProjectInfo.windowInfos.size());i++){ 19 18 if(lstrcmpi(name,ProjectInfo.windowInfos[i].name)==0) return i; 20 19 } … … 24 23 { 25 24 extern PROJECTINFO ProjectInfo; 26 int i; 27 for( int i=0;i<ProjectInfo.windowInfos.size();i++) 25 BOOST_FOREACH( WINDOW_INFO &windowInfo, ProjectInfo.windowInfos ) 28 26 { 29 if(lstrcmpi(name, ProjectInfo.windowInfos[i].name)==0) return &ProjectInfo.windowInfos[i];27 if(lstrcmpi(name,windowInfo.name)==0) return &windowInfo; 30 28 } 31 29 return NULL; … … 1008 1006 1009 1007 ppNames=(char **)HeapAlloc(hHeap,0,1); 1010 for(i=0,i4=1000,i5=0;i<ProjectInfo.windowInfos.size();i++){ 1011 for(i3=0;i3<ProjectInfo.windowInfos[i].NumberOfChildWindows;i3++){ 1008 i4=1000; 1009 i5=0; 1010 BOOST_FOREACH( WINDOW_INFO &windowInfo, ProjectInfo.windowInfos ) 1011 { 1012 for(i3=0;i3<windowInfo.NumberOfChildWindows;i3++){ 1012 1013 1013 1014 //重複チェック 1014 1015 for(i6=0,sw1=0;i6<i5;i6++){ 1015 if(lstrcmpi(ppNames[i6], ProjectInfo.windowInfos[i].pChildInfo[i3].IdName)==0){1016 if(lstrcmpi(ppNames[i6],windowInfo.pChildInfo[i3].IdName)==0){ 1016 1017 sw1=1; 1017 1018 break; … … 1021 1022 1022 1023 ppNames=(char **)HeapReAlloc(hHeap,0,ppNames,sizeof(char *)*(i5+1)); 1023 ppNames[i5]= ProjectInfo.windowInfos[i].pChildInfo[i3].IdName;1024 ppNames[i5]=windowInfo.pChildInfo[i3].IdName; 1024 1025 i5++; 1025 1026 1026 sprintf(buffer+i2,"Const %s=%d\r\n", ProjectInfo.windowInfos[i].pChildInfo[i3].IdName,i4);1027 sprintf(buffer+i2,"Const %s=%d\r\n",windowInfo.pChildInfo[i3].IdName,i4); 1027 1028 i2+=lstrlen(buffer+i2); 1028 1029 i4++; … … 1044 1045 1045 1046 //ハンドル変数を定義 1046 for(i=0;i<ProjectInfo.windowInfos.size();i++){ 1047 sprintf(buffer+i2,"Dim %s As HWND\r\n",ProjectInfo.windowInfos[i].HandleName); 1048 i2+=lstrlen(buffer+i2); 1049 sprintf(buffer+i2,"Dim hFont_%s As HFONT\r\n",ProjectInfo.windowInfos[i].name); 1047 BOOST_FOREACH( WINDOW_INFO &windowInfo, ProjectInfo.windowInfos ) 1048 { 1049 sprintf(buffer+i2,"Dim %s As HWND\r\n",windowInfo.HandleName); 1050 i2+=lstrlen(buffer+i2); 1051 sprintf(buffer+i2,"Dim hFont_%s As HFONT\r\n",windowInfo.name); 1050 1052 i2+=lstrlen(buffer+i2); 1051 1053 sprintf(buffer+i2,"hFont_%s=CreateFont(%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,\"%s\")\r\n", 1052 ProjectInfo.windowInfos[i].name,1053 ProjectInfo.windowInfos[i].LogFont.lfHeight,1054 ProjectInfo.windowInfos[i].LogFont.lfWidth,1055 ProjectInfo.windowInfos[i].LogFont.lfEscapement,1056 ProjectInfo.windowInfos[i].LogFont.lfOrientation,1057 ProjectInfo.windowInfos[i].LogFont.lfWeight,1058 ProjectInfo.windowInfos[i].LogFont.lfItalic,1059 ProjectInfo.windowInfos[i].LogFont.lfUnderline,1060 ProjectInfo.windowInfos[i].LogFont.lfStrikeOut,1061 ProjectInfo.windowInfos[i].LogFont.lfCharSet,1062 ProjectInfo.windowInfos[i].LogFont.lfOutPrecision,1063 ProjectInfo.windowInfos[i].LogFont.lfClipPrecision,1064 ProjectInfo.windowInfos[i].LogFont.lfQuality,1065 ProjectInfo.windowInfos[i].LogFont.lfPitchAndFamily,1066 ProjectInfo.windowInfos[i].LogFont.lfFaceName);1054 windowInfo.name, 1055 windowInfo.LogFont.lfHeight, 1056 windowInfo.LogFont.lfWidth, 1057 windowInfo.LogFont.lfEscapement, 1058 windowInfo.LogFont.lfOrientation, 1059 windowInfo.LogFont.lfWeight, 1060 windowInfo.LogFont.lfItalic, 1061 windowInfo.LogFont.lfUnderline, 1062 windowInfo.LogFont.lfStrikeOut, 1063 windowInfo.LogFont.lfCharSet, 1064 windowInfo.LogFont.lfOutPrecision, 1065 windowInfo.LogFont.lfClipPrecision, 1066 windowInfo.LogFont.lfQuality, 1067 windowInfo.LogFont.lfPitchAndFamily, 1068 windowInfo.LogFont.lfFaceName); 1067 1069 i2+=lstrlen(buffer+i2); 1068 1070 … … 1078 1080 lstrcpy(buffer+i2,"h3DFaceBrush=CreateSolidBrush(GetSysColor(COLOR_3DFACE))\r\n"); 1079 1081 i2+=lstrlen(buffer+i2); 1080 for(i=0;i<ProjectInfo.windowInfos.size();i++){ 1081 if(ProjectInfo.windowInfos[i].bgColor<=0&& 1082 ProjectInfo.windowInfos[i].bgColor!=-(int)RGB(255,255,255)&& 1083 ProjectInfo.windowInfos[i].bgColor!=-(int)RGB(0,0,0)){ 1082 i=0; 1083 BOOST_FOREACH( WINDOW_INFO &windowInfo, ProjectInfo.windowInfos ) 1084 { 1085 if(windowInfo.bgColor<=0&& 1086 windowInfo.bgColor!=-(int)RGB(255,255,255)&& 1087 windowInfo.bgColor!=-(int)RGB(0,0,0)){ 1084 1088 sprintf(buffer+i2,"Dim _RadSys_hBackBrush%d As HBRUSH\r\n",i); 1085 1089 i2+=lstrlen(buffer+i2); 1086 sprintf(buffer+i2,"_RadSys_hBackBrush%d=CreateSolidBrush(%d)\r\n",i,- ProjectInfo.windowInfos[i].bgColor);1090 sprintf(buffer+i2,"_RadSys_hBackBrush%d=CreateSolidBrush(%d)\r\n",i,-windowInfo.bgColor); 1087 1091 i2+=lstrlen(buffer+i2); 1088 1092 } 1089 if( ProjectInfo.windowInfos[i].bgColor>=0x1000){1093 if(windowInfo.bgColor>=0x1000){ 1090 1094 sprintf(buffer+i2,"Dim _RadSys_hBackBrush%d As HBRUSH\r\n",i); 1091 1095 i2+=lstrlen(buffer+i2); 1092 1096 sprintf(buffer+i2,"_RadSys_hBackBrush%d=CreatePatternBrush(LoadImage(GetModuleHandle(0),%s,IMAGE_BITMAP,0,0,LR_DEFAULTSIZE or LR_SHARED))\r\n", 1093 1097 i, 1094 ProjectInfo.res.pBitmapResInfo[ ProjectInfo.windowInfos[i].bgColor-0x1000].IdName);1098 ProjectInfo.res.pBitmapResInfo[windowInfo.bgColor-0x1000].IdName); 1095 1099 i2+=lstrlen(buffer+i2); 1096 1100 } 1101 1102 i++; 1097 1103 } 1098 1104 … … 1101 1107 1102 1108 //イメージ ボックス用の変数を定義 1103 for(i=0;i<ProjectInfo.windowInfos.size();i++){ 1104 for(i3=0;i3<ProjectInfo.windowInfos[i].NumberOfChildWindows;i3++){ 1105 if(ProjectInfo.windowInfos[i].pChildInfo[i3].Control==CT_IMAGEBOX){ 1106 if((ProjectInfo.windowInfos[i].pChildInfo[i3].style&0x000F)==SS_ICON|| 1107 (ProjectInfo.windowInfos[i].pChildInfo[i3].style&0x000F)==SS_BITMAP){ 1108 sprintf(buffer+i2,"Dim hImage_%s_%s As HANDLE\r\n",ProjectInfo.windowInfos[i].name,ProjectInfo.windowInfos[i].pChildInfo[i3].IdName); 1109 BOOST_FOREACH( WINDOW_INFO &windowInfo, ProjectInfo.windowInfos ) 1110 { 1111 for(i3=0;i3<windowInfo.NumberOfChildWindows;i3++){ 1112 if(windowInfo.pChildInfo[i3].Control==CT_IMAGEBOX){ 1113 if((windowInfo.pChildInfo[i3].style&0x000F)==SS_ICON|| 1114 (windowInfo.pChildInfo[i3].style&0x000F)==SS_BITMAP){ 1115 sprintf(buffer+i2,"Dim hImage_%s_%s As HANDLE\r\n",windowInfo.name,windowInfo.pChildInfo[i3].IdName); 1109 1116 i2+=lstrlen(buffer+i2); 1110 1117 … … 1154 1161 } 1155 1162 1156 for(i=0;i<ProjectInfo.windowInfos.size();i++){ 1163 BOOST_FOREACH( WINDOW_INFO &windowInfo, ProjectInfo.windowInfos ) 1164 { 1157 1165 //フォントハンドル解放 1158 sprintf(buffer+i2,"\tDeleteObject(hFont_%s)\r\n", ProjectInfo.windowInfos[i].name);1166 sprintf(buffer+i2,"\tDeleteObject(hFont_%s)\r\n",windowInfo.name); 1159 1167 i2+=lstrlen(buffer+i2); 1160 1168 … … 1168 1176 lstrcpy(buffer+i2,"\tDeleteObject(h3DFaceBrush)\r\n"); 1169 1177 i2+=lstrlen(buffer+i2); 1170 for(i=0;i<ProjectInfo.windowInfos.size();i++){ 1171 if(ProjectInfo.windowInfos[i].bgColor<=0&& 1172 ProjectInfo.windowInfos[i].bgColor!=-(int)RGB(255,255,255)&& 1173 ProjectInfo.windowInfos[i].bgColor!=-(int)RGB(0,0,0)){ 1178 i=0; 1179 BOOST_FOREACH( WINDOW_INFO &windowInfo, ProjectInfo.windowInfos ) 1180 { 1181 if(windowInfo.bgColor<=0&& 1182 windowInfo.bgColor!=-(int)RGB(255,255,255)&& 1183 windowInfo.bgColor!=-(int)RGB(0,0,0)){ 1174 1184 sprintf(buffer+i2,"\tDeleteObject(_RadSys_hBackBrush%d)\r\n",i); 1175 1185 i2+=lstrlen(buffer+i2); 1176 1186 } 1187 i++; 1177 1188 } 1178 1189 … … 1184 1195 1185 1196 1186 for(i=0;i<ProjectInfo.windowInfos.size();i++){ 1197 i=0; 1198 BOOST_FOREACH( WINDOW_INFO &windowInfo, ProjectInfo.windowInfos ) 1199 { 1187 1200 if(i!=0){ 1188 1201 lstrcpy(buffer+i2,"\r\n"); … … 1197 1210 ppNames=GetProcedureNamesOfMessageCall(i,&pItemEventInfo,&i3,&bAvailUserProc[i]); 1198 1211 1199 sprintf(buffer+i2,"Function EventCall_%s(hWnd As HWND, message As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT\r\n", ProjectInfo.windowInfos[i].name);1212 sprintf(buffer+i2,"Function EventCall_%s(hWnd As HWND, message As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT\r\n",windowInfo.name); 1200 1213 i2+=lstrlen(buffer+i2); 1201 1214 … … 1235 1248 i2+=lstrlen(buffer+i2); 1236 1249 if(sw4){ 1237 sprintf(buffer+i2,"\t\t\t%s_Notify(ByVal (lParam As *NMHDR))\r\n", ProjectInfo.windowInfos[i].name);1250 sprintf(buffer+i2,"\t\t\t%s_Notify(ByVal (lParam As *NMHDR))\r\n",windowInfo.name); 1238 1251 i2+=lstrlen(buffer+i2); 1239 1252 } … … 1245 1258 i2+=lstrlen(buffer+i2); 1246 1259 1247 if(GetNotifyCommandByItemMessage(& ProjectInfo.windowInfos[i],pItemEventInfo,buffer+i2,"\t\t\t\t")){1260 if(GetNotifyCommandByItemMessage(&windowInfo,pItemEventInfo,buffer+i2,"\t\t\t\t")){ 1248 1261 i2+=lstrlen(buffer+i2); 1249 1262 … … 1261 1274 lstrcpy(buffer+i2,"\t\tCase WM_NOTIFY\r\n"); 1262 1275 i2+=lstrlen(buffer+i2); 1263 sprintf(buffer+i2,"\t\t\t%s_Notify(ByVal (lParam As *NMHDR))\r\n", ProjectInfo.windowInfos[i].name);1276 sprintf(buffer+i2,"\t\t\t%s_Notify(ByVal (lParam As *NMHDR))\r\n",windowInfo.name); 1264 1277 i2+=lstrlen(buffer+i2); 1265 1278 } … … 1273 1286 1274 1287 //pItemEventInfoのIdName、EventNameメンバのメモリ解放はこの関数内で行う 1275 GetCommandByItemMessage(& ProjectInfo.windowInfos[i],pItemEventInfo,buffer+i2,"\t\t\t\t");1288 GetCommandByItemMessage(&windowInfo,pItemEventInfo,buffer+i2,"\t\t\t\t"); 1276 1289 i2+=lstrlen(buffer+i2); 1277 1290 … … 1284 1297 lstrcpy(buffer+i2,"\t\tCase Else\r\n"); 1285 1298 i2+=lstrlen(buffer+i2); 1286 sprintf(buffer+i2,"\t\t\tEventCall_%s=DefWindowProc(hWnd,message,wParam,lParam)\r\n", ProjectInfo.windowInfos[i].name);1299 sprintf(buffer+i2,"\t\t\tEventCall_%s=DefWindowProc(hWnd,message,wParam,lParam)\r\n",windowInfo.name); 1287 1300 i2+=lstrlen(buffer+i2); 1288 1301 lstrcpy(buffer+i2,"\t\t\tExit Function\r\n"); … … 1292 1305 i2+=lstrlen(buffer+i2); 1293 1306 1294 sprintf(buffer+i2,"\tEventCall_%s=0\r\n", ProjectInfo.windowInfos[i].name);1307 sprintf(buffer+i2,"\tEventCall_%s=0\r\n",windowInfo.name); 1295 1308 i2+=lstrlen(buffer+i2); 1296 1309 lstrcpy(buffer+i2,"End Function\r\n"); … … 1301 1314 buffer=(char *)HeapReAlloc(hHeap,0,buffer,65535*size); 1302 1315 } 1316 1317 i++; 1303 1318 } 1304 1319 … … 1344 1359 lstrcpy(buffer+i2,"\tDim hDlg As HWND\r\n"); 1345 1360 i2+=lstrlen(buffer+i2); 1346 for(i=0,sw1=0;i<ProjectInfo.windowInfos.size();i++){ 1347 if(ProjectInfo.windowInfos[i].type==WNDTYPE_MODALDLG){ 1361 sw1=0; 1362 i=0; 1363 BOOST_FOREACH( WINDOW_INFO &windowInfo, ProjectInfo.windowInfos ) 1364 { 1365 if(windowInfo.type==WNDTYPE_MODALDLG){ 1348 1366 if(sw1==0){ 1349 sprintf(buffer+i2,"\tIf lstrcmp(TemplateName,\"%s\")=0 Then\r\n", ProjectInfo.windowInfos[i].name);1367 sprintf(buffer+i2,"\tIf lstrcmp(TemplateName,\"%s\")=0 Then\r\n",windowInfo.name); 1350 1368 i2+=lstrlen(buffer+i2); 1351 1369 sw1=1; 1352 1370 } 1353 1371 else{ 1354 sprintf(buffer+i2,"\tElseIf lstrcmp(TemplateName,\"%s\")=0 Then\r\n", ProjectInfo.windowInfos[i].name);1372 sprintf(buffer+i2,"\tElseIf lstrcmp(TemplateName,\"%s\")=0 Then\r\n",windowInfo.name); 1355 1373 i2+=lstrlen(buffer+i2); 1356 1374 } 1357 1375 sprintf(buffer+i2,"\t\t%s=CreateWindowEx(&H%08x,\"NORMALDLG\",\"%s\",&H%08x,%d,%d,%d,%d,hOwnerWnd,%d As HMENU,GetModuleHandle(0),0)\r\n", 1358 ProjectInfo.windowInfos[i].HandleName,1359 ProjectInfo.windowInfos[i].ExStyle,1360 ProjectInfo.windowInfos[i].caption,1361 ProjectInfo.windowInfos[i].style,1362 ProjectInfo.windowInfos[i].pos.x,1363 ProjectInfo.windowInfos[i].pos.y,1364 ProjectInfo.windowInfos[i].size.cx,1365 ProjectInfo.windowInfos[i].size.cy,1366 ProjectInfo.windowInfos[i].id);1376 windowInfo.HandleName, 1377 windowInfo.ExStyle, 1378 windowInfo.caption, 1379 windowInfo.style, 1380 windowInfo.pos.x, 1381 windowInfo.pos.y, 1382 windowInfo.size.cx, 1383 windowInfo.size.cy, 1384 windowInfo.id); 1367 1385 i2+=lstrlen(buffer+i2); 1368 1386 sprintf(buffer+i2,"\t\thDlg=%s\r\n", 1369 ProjectInfo.windowInfos[i].HandleName);1387 windowInfo.HandleName); 1370 1388 i2+=lstrlen(buffer+i2); 1371 1389 if(bAvailUserProc[i]){ 1372 1390 sprintf(buffer+i2,"\t\tSetWindowLongPtr(%s,GWLP_WNDPROC,AddressOf(%s) As LONG_PTR)\r\n", 1373 ProjectInfo.windowInfos[i].HandleName,1374 ProjectInfo.windowInfos[i].CallBackName);1391 windowInfo.HandleName, 1392 windowInfo.CallBackName); 1375 1393 } 1376 1394 else{ 1377 1395 sprintf(buffer+i2,"\t\tSetWindowLongPtr(%s,GWLP_WNDPROC,AddressOf(EventCall_%s) As LONG_PTR)\r\n", 1378 ProjectInfo.windowInfos[i].HandleName,1379 ProjectInfo.windowInfos[i].name);1380 } 1381 i2+=lstrlen(buffer+i2); 1382 sprintf(buffer+i2,"\t\tSendMessage(%s,WM_INITDIALOG,0,0)\r\n", ProjectInfo.windowInfos[i].HandleName);1383 i2+=lstrlen(buffer+i2); 1384 if( ProjectInfo.windowInfos[i].IconResName){1385 sprintf(buffer+i2,"\t\tSendMessage(%s,WM_SETICON,ICON_SMALL,LoadIcon(GetModuleHandle(0),MAKEINTRESOURCE(%s)) As LPARAM)\r\n", ProjectInfo.windowInfos[i].HandleName,ProjectInfo.windowInfos[i].IconResName);1396 windowInfo.HandleName, 1397 windowInfo.name); 1398 } 1399 i2+=lstrlen(buffer+i2); 1400 sprintf(buffer+i2,"\t\tSendMessage(%s,WM_INITDIALOG,0,0)\r\n",windowInfo.HandleName); 1401 i2+=lstrlen(buffer+i2); 1402 if(windowInfo.IconResName){ 1403 sprintf(buffer+i2,"\t\tSendMessage(%s,WM_SETICON,ICON_SMALL,LoadIcon(GetModuleHandle(0),MAKEINTRESOURCE(%s)) As LPARAM)\r\n",windowInfo.HandleName,windowInfo.IconResName); 1386 1404 i2+=lstrlen(buffer+i2); 1387 1405 } 1388 sprintf(buffer+i2,"\t\tShowWindow(%s,SW_SHOW)\r\n", ProjectInfo.windowInfos[i].HandleName);1406 sprintf(buffer+i2,"\t\tShowWindow(%s,SW_SHOW)\r\n",windowInfo.HandleName); 1389 1407 i2+=lstrlen(buffer+i2); 1390 1408 } … … 1393 1411 buffer=(char *)HeapReAlloc(hHeap,0,buffer,65535*size); 1394 1412 } 1413 i++; 1395 1414 } 1396 1415 if(sw1){ … … 1440 1459 lstrcpy(buffer+i2,"\r\nFunction CreateDialog(hOwnerWnd As HWND, TemplateName As LPSTR) As HWND\r\n"); 1441 1460 i2+=lstrlen(buffer+i2); 1442 for(i=0;i<ProjectInfo.windowInfos.size();i++){ 1443 if(ProjectInfo.windowInfos[i].type==WNDTYPE_MODELESSDLG){ 1444 sprintf(buffer+i2,"\tIf lstrcmp(TemplateName,\"%s\")=0 Then\r\n",ProjectInfo.windowInfos[i].name); 1461 i=0; 1462 BOOST_FOREACH( WINDOW_INFO &windowInfo, ProjectInfo.windowInfos ) 1463 { 1464 if(windowInfo.type==WNDTYPE_MODELESSDLG){ 1465 sprintf(buffer+i2,"\tIf lstrcmp(TemplateName,\"%s\")=0 Then\r\n",windowInfo.name); 1445 1466 i2+=lstrlen(buffer+i2); 1446 1467 1447 1468 sprintf(buffer+i2,"\t\t%s=CreateWindowEx(&H%08x,\"NORMALDLG\",\"%s\",&H%08x,%d,%d,%d,%d,hOwnerWnd,%d As HMENU,GetModuleHandle(0),0)\r\n", 1448 ProjectInfo.windowInfos[i].HandleName,1449 ProjectInfo.windowInfos[i].ExStyle,1450 ProjectInfo.windowInfos[i].caption,1451 ProjectInfo.windowInfos[i].style,1452 ProjectInfo.windowInfos[i].pos.x,1453 ProjectInfo.windowInfos[i].pos.y,1454 ProjectInfo.windowInfos[i].size.cx,1455 ProjectInfo.windowInfos[i].size.cy,1456 ProjectInfo.windowInfos[i].id);1457 i2+=lstrlen(buffer+i2); 1458 sprintf(buffer+i2,"\t\tCreateDialog=%s\r\n", ProjectInfo.windowInfos[i].HandleName);1469 windowInfo.HandleName, 1470 windowInfo.ExStyle, 1471 windowInfo.caption, 1472 windowInfo.style, 1473 windowInfo.pos.x, 1474 windowInfo.pos.y, 1475 windowInfo.size.cx, 1476 windowInfo.size.cy, 1477 windowInfo.id); 1478 i2+=lstrlen(buffer+i2); 1479 sprintf(buffer+i2,"\t\tCreateDialog=%s\r\n",windowInfo.HandleName); 1459 1480 i2+=lstrlen(buffer+i2); 1460 1481 if(bAvailUserProc[i]){ 1461 1482 sprintf(buffer+i2,"\t\tSetWindowLongPtr(%s,GWLP_WNDPROC,AddressOf(%s) As LONG_PTR)\r\n", 1462 ProjectInfo.windowInfos[i].HandleName,1463 ProjectInfo.windowInfos[i].CallBackName);1483 windowInfo.HandleName, 1484 windowInfo.CallBackName); 1464 1485 } 1465 1486 else{ 1466 1487 sprintf(buffer+i2,"\t\tSetWindowLongPtr(%s,GWLP_WNDPROC,AddressOf(EventCall_%s) As LONG_PTR)\r\n", 1467 ProjectInfo.windowInfos[i].HandleName,1468 ProjectInfo.windowInfos[i].name);1469 } 1470 i2+=lstrlen(buffer+i2); 1471 sprintf(buffer+i2,"\t\tSendMessage(%s,WM_INITDIALOG,0,0)\r\n", ProjectInfo.windowInfos[i].HandleName);1472 i2+=lstrlen(buffer+i2); 1473 if( ProjectInfo.windowInfos[i].IconResName){1474 sprintf(buffer+i2,"\t\tSendMessage(%s,WM_SETICON,ICON_SMALL,LoadIcon(GetModuleHandle(0),MAKEINTRESOURCE(%s)) As LPARAM)\r\n", ProjectInfo.windowInfos[i].HandleName,ProjectInfo.windowInfos[i].IconResName);1488 windowInfo.HandleName, 1489 windowInfo.name); 1490 } 1491 i2+=lstrlen(buffer+i2); 1492 sprintf(buffer+i2,"\t\tSendMessage(%s,WM_INITDIALOG,0,0)\r\n",windowInfo.HandleName); 1493 i2+=lstrlen(buffer+i2); 1494 if(windowInfo.IconResName){ 1495 sprintf(buffer+i2,"\t\tSendMessage(%s,WM_SETICON,ICON_SMALL,LoadIcon(GetModuleHandle(0),MAKEINTRESOURCE(%s)) As LPARAM)\r\n",windowInfo.HandleName,windowInfo.IconResName); 1475 1496 i2+=lstrlen(buffer+i2); 1476 1497 } 1477 sprintf(buffer+i2,"\tEnd If\r\n", ProjectInfo.windowInfos[i].name);1498 sprintf(buffer+i2,"\tEnd If\r\n",windowInfo.name); 1478 1499 i2+=lstrlen(buffer+i2); 1479 1500 } … … 1482 1503 buffer=(char *)HeapReAlloc(hHeap,0,buffer,65535*size); 1483 1504 } 1505 i++; 1484 1506 } 1485 1507 lstrcpy(buffer+i2,"End Function\r\n"); … … 1510 1532 i2+=lstrlen(buffer+i2); 1511 1533 1512 for(i=0;i<ProjectInfo.windowInfos.size();i++){ 1513 if(ProjectInfo.windowInfos[i].type==WNDTYPE_DEFAULT){ 1534 i=0; 1535 BOOST_FOREACH( WINDOW_INFO &windowInfo, ProjectInfo.windowInfos ) 1536 { 1537 if(windowInfo.type==WNDTYPE_DEFAULT){ 1514 1538 ////////////////////// 1515 1539 //通常ウィンドウ作成 … … 1518 1542 i2+=2; 1519 1543 1520 if( ProjectInfo.windowInfos[i].IconResName==0){1544 if(windowInfo.IconResName==0){ 1521 1545 lstrcpy(buffer+i2,"_RadSys_wcl.hIcon=LoadIcon(NULL,MAKEINTRESOURCE(IDI_APPLICATION))\r\n"); 1522 1546 i2+=lstrlen(buffer+i2); … … 1525 1549 } 1526 1550 else{ 1527 sprintf(buffer+i2,"_RadSys_wcl.hIcon=LoadIcon(_RadSys_wcl.hInstance,MAKEINTRESOURCE(%s))\r\n", ProjectInfo.windowInfos[i].IconResName);1551 sprintf(buffer+i2,"_RadSys_wcl.hIcon=LoadIcon(_RadSys_wcl.hInstance,MAKEINTRESOURCE(%s))\r\n",windowInfo.IconResName); 1528 1552 i2+=lstrlen(buffer+i2); 1529 sprintf(buffer+i2,"_RadSys_wcl.hIconSm=LoadIcon(_RadSys_wcl.hInstance,MAKEINTRESOURCE(%s))\r\n", ProjectInfo.windowInfos[i].IconResName);1553 sprintf(buffer+i2,"_RadSys_wcl.hIconSm=LoadIcon(_RadSys_wcl.hInstance,MAKEINTRESOURCE(%s))\r\n",windowInfo.IconResName); 1530 1554 i2+=lstrlen(buffer+i2); 1531 1555 } … … 1534 1558 i2+=lstrlen(buffer+i2); 1535 1559 if(bAvailUserProc[i]) 1536 sprintf(buffer+i2,"_RadSys_wcl.lpfnWndProc=AddressOf(%s)\r\n", ProjectInfo.windowInfos[i].CallBackName);1537 else sprintf(buffer+i2,"_RadSys_wcl.lpfnWndProc=AddressOf(EventCall_%s)\r\n", ProjectInfo.windowInfos[i].name);1538 i2+=lstrlen(buffer+i2); 1539 if( ProjectInfo.windowInfos[i].bgColor==COLOR_3DFACE)1560 sprintf(buffer+i2,"_RadSys_wcl.lpfnWndProc=AddressOf(%s)\r\n",windowInfo.CallBackName); 1561 else sprintf(buffer+i2,"_RadSys_wcl.lpfnWndProc=AddressOf(EventCall_%s)\r\n",windowInfo.name); 1562 i2+=lstrlen(buffer+i2); 1563 if(windowInfo.bgColor==COLOR_3DFACE) 1540 1564 lstrcpy(buffer+i2,"_RadSys_wcl.hbrBackground=h3DFaceBrush\r\n"); 1541 else if( ProjectInfo.windowInfos[i].bgColor==-(int)RGB(255,255,255))1565 else if(windowInfo.bgColor==-(int)RGB(255,255,255)) 1542 1566 lstrcpy(buffer+i2,"_RadSys_wcl.hbrBackground=GetStockObject(WHITE_BRUSH)\r\n"); 1543 else if( ProjectInfo.windowInfos[i].bgColor==-(int)RGB(0,0,0))1567 else if(windowInfo.bgColor==-(int)RGB(0,0,0)) 1544 1568 lstrcpy(buffer+i2,"_RadSys_wcl.hbrBackground=GetStockObject(BLACK_BRUSH)\r\n"); 1545 else if( ProjectInfo.windowInfos[i].bgColor<=0||1546 ProjectInfo.windowInfos[i].bgColor>=0x1000){1569 else if(windowInfo.bgColor<=0|| 1570 windowInfo.bgColor>=0x1000){ 1547 1571 //色指定またはビットマップ 1548 1572 sprintf(buffer+i2,"_RadSys_wcl.hbrBackground=_RadSys_hBackBrush%d\r\n",i); … … 1552 1576 i2+=lstrlen(buffer+i2); 1553 1577 sprintf(buffer+i2,"CreateWindowEx(&H%08x,\"%s%d\",\"%s\",&H%08x,%d,%d,%d,%d,0,0,GetModuleHandle(0),0)\r\n", 1554 ProjectInfo.windowInfos[i].ExStyle,1555 ProjectInfo.windowInfos[i].ClassName,i,1556 ProjectInfo.windowInfos[i].caption,1557 ProjectInfo.windowInfos[i].style,1558 ProjectInfo.windowInfos[i].pos.x,1559 ProjectInfo.windowInfos[i].pos.y,1560 ProjectInfo.windowInfos[i].size.cx,1561 ProjectInfo.windowInfos[i].size.cy);1578 windowInfo.ExStyle, 1579 windowInfo.ClassName,i, 1580 windowInfo.caption, 1581 windowInfo.style, 1582 windowInfo.pos.x, 1583 windowInfo.pos.y, 1584 windowInfo.size.cx, 1585 windowInfo.size.cy); 1562 1586 i2+=lstrlen(buffer+i2); 1563 1587 } … … 1567 1591 buffer=(char *)HeapReAlloc(hHeap,0,buffer,65535*size); 1568 1592 } 1593 1594 i++; 1569 1595 } 1570 1596 … … 1612 1638 size=2; 1613 1639 buffer=(char *)HeapAlloc(hHeap,0,GENERAL_SIZE*size); 1614 for(i=0,i2=0;i<windowInfos.size();i++){ 1615 sprintf(buffer+i2,"WINDOW:%s\r\n",windowInfos[i].name); 1616 i2+=lstrlen(buffer+i2); 1617 sprintf(buffer+i2," HANDLE = %s\r\n",windowInfos[i].HandleName); 1618 i2+=lstrlen(buffer+i2); 1619 sprintf(buffer+i2," POINT = %d,%d\r\n",windowInfos[i].pos.x,windowInfos[i].pos.y); 1620 i2+=lstrlen(buffer+i2); 1621 sprintf(buffer+i2," SIZE = %d,%d\r\n",windowInfos[i].size.cx,windowInfos[i].size.cy); 1622 i2+=lstrlen(buffer+i2); 1623 sprintf(buffer+i2," CAPTION = \"%s\"\r\n",windowInfos[i].caption); 1624 i2+=lstrlen(buffer+i2); 1625 sprintf(buffer+i2," STYLE = &H%08x\r\n",windowInfos[i].style); 1626 i2+=lstrlen(buffer+i2); 1627 sprintf(buffer+i2," EXSTYLE = &H%08x\r\n",windowInfos[i].ExStyle); 1628 i2+=lstrlen(buffer+i2); 1629 if(windowInfos[i].MenuID){ 1630 sprintf(buffer+i2," MENUID = %s\r\n",windowInfos[i].MenuID); 1631 i2+=lstrlen(buffer+i2); 1632 } 1633 sprintf(buffer+i2," ID = %d\r\n",windowInfos[i].id); 1634 i2+=lstrlen(buffer+i2); 1635 sprintf(buffer+i2," BGCOLOR = %d\r\n",windowInfos[i].bgColor); 1640 i2=0; 1641 BOOST_FOREACH( WINDOW_INFO &windowInfo, ProjectInfo.windowInfos ) 1642 { 1643 sprintf(buffer+i2,"WINDOW:%s\r\n",windowInfo.name); 1644 i2+=lstrlen(buffer+i2); 1645 sprintf(buffer+i2," HANDLE = %s\r\n",windowInfo.HandleName); 1646 i2+=lstrlen(buffer+i2); 1647 sprintf(buffer+i2," POINT = %d,%d\r\n",windowInfo.pos.x,windowInfo.pos.y); 1648 i2+=lstrlen(buffer+i2); 1649 sprintf(buffer+i2," SIZE = %d,%d\r\n",windowInfo.size.cx,windowInfo.size.cy); 1650 i2+=lstrlen(buffer+i2); 1651 sprintf(buffer+i2," CAPTION = \"%s\"\r\n",windowInfo.caption); 1652 i2+=lstrlen(buffer+i2); 1653 sprintf(buffer+i2," STYLE = &H%08x\r\n",windowInfo.style); 1654 i2+=lstrlen(buffer+i2); 1655 sprintf(buffer+i2," EXSTYLE = &H%08x\r\n",windowInfo.ExStyle); 1656 i2+=lstrlen(buffer+i2); 1657 if(windowInfo.MenuID){ 1658 sprintf(buffer+i2," MENUID = %s\r\n",windowInfo.MenuID); 1659 i2+=lstrlen(buffer+i2); 1660 } 1661 sprintf(buffer+i2," ID = %d\r\n",windowInfo.id); 1662 i2+=lstrlen(buffer+i2); 1663 sprintf(buffer+i2," BGCOLOR = %d\r\n",windowInfo.bgColor); 1636 1664 i2+=lstrlen(buffer+i2); 1637 1665 sprintf(buffer+i2," FONT = %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,\"%s\"\r\n", 1638 windowInfo s[i].LogFont.lfHeight,1639 windowInfo s[i].LogFont.lfWidth,1640 windowInfo s[i].LogFont.lfEscapement,1641 windowInfo s[i].LogFont.lfOrientation,1642 windowInfo s[i].LogFont.lfWeight,1643 windowInfo s[i].LogFont.lfItalic,1644 windowInfo s[i].LogFont.lfUnderline,1645 windowInfo s[i].LogFont.lfStrikeOut,1646 windowInfo s[i].LogFont.lfCharSet,1647 windowInfo s[i].LogFont.lfOutPrecision,1648 windowInfo s[i].LogFont.lfClipPrecision,1649 windowInfo s[i].LogFont.lfQuality,1650 windowInfo s[i].LogFont.lfPitchAndFamily,1651 windowInfo s[i].LogFont.lfFaceName);1652 i2+=lstrlen(buffer+i2); 1653 if(windowInfo s[i].IconResName){1654 sprintf(buffer+i2," ICONID = %s\r\n",windowInfo s[i].IconResName);1655 i2+=lstrlen(buffer+i2); 1656 } 1657 sprintf(buffer+i2," CLASS = \"%s\"\r\n",windowInfo s[i].ClassName);1658 i2+=lstrlen(buffer+i2); 1659 sprintf(buffer+i2," CALLBACK = %s\r\n",windowInfo s[i].CallBackName);1660 i2+=lstrlen(buffer+i2); 1661 sprintf(buffer+i2," TYPE = %d\r\n",windowInfo s[i].type);1662 i2+=lstrlen(buffer+i2); 1663 sprintf(buffer+i2," FILEPATH = %s\r\n",windowInfo s[i].filepath);1664 i2+=lstrlen(buffer+i2); 1665 for(i3=0;i3<windowInfo s[i].NumberOfChildWindows;i3++){1666 temporary=SetCaptionSequence(windowInfo s[i].pChildInfo[i3].caption);1666 windowInfo.LogFont.lfHeight, 1667 windowInfo.LogFont.lfWidth, 1668 windowInfo.LogFont.lfEscapement, 1669 windowInfo.LogFont.lfOrientation, 1670 windowInfo.LogFont.lfWeight, 1671 windowInfo.LogFont.lfItalic, 1672 windowInfo.LogFont.lfUnderline, 1673 windowInfo.LogFont.lfStrikeOut, 1674 windowInfo.LogFont.lfCharSet, 1675 windowInfo.LogFont.lfOutPrecision, 1676 windowInfo.LogFont.lfClipPrecision, 1677 windowInfo.LogFont.lfQuality, 1678 windowInfo.LogFont.lfPitchAndFamily, 1679 windowInfo.LogFont.lfFaceName); 1680 i2+=lstrlen(buffer+i2); 1681 if(windowInfo.IconResName){ 1682 sprintf(buffer+i2," ICONID = %s\r\n",windowInfo.IconResName); 1683 i2+=lstrlen(buffer+i2); 1684 } 1685 sprintf(buffer+i2," CLASS = \"%s\"\r\n",windowInfo.ClassName); 1686 i2+=lstrlen(buffer+i2); 1687 sprintf(buffer+i2," CALLBACK = %s\r\n",windowInfo.CallBackName); 1688 i2+=lstrlen(buffer+i2); 1689 sprintf(buffer+i2," TYPE = %d\r\n",windowInfo.type); 1690 i2+=lstrlen(buffer+i2); 1691 sprintf(buffer+i2," FILEPATH = %s\r\n",windowInfo.filepath); 1692 i2+=lstrlen(buffer+i2); 1693 for(i3=0;i3<windowInfo.NumberOfChildWindows;i3++){ 1694 temporary=SetCaptionSequence(windowInfo.pChildInfo[i3].caption); 1667 1695 sprintf(buffer+i2," ITEM = %s,%d,%d,%d,%d,\"%s\",&H%08x,&H%08x,%d", 1668 windowInfo s[i].pChildInfo[i3].IdName,1669 windowInfo s[i].pChildInfo[i3].pos.x,windowInfos[i].pChildInfo[i3].pos.y,1670 windowInfo s[i].pChildInfo[i3].size.cx,windowInfos[i].pChildInfo[i3].size.cy,1696 windowInfo.pChildInfo[i3].IdName, 1697 windowInfo.pChildInfo[i3].pos.x,windowInfo.pChildInfo[i3].pos.y, 1698 windowInfo.pChildInfo[i3].size.cx,windowInfo.pChildInfo[i3].size.cy, 1671 1699 temporary, 1672 windowInfo s[i].pChildInfo[i3].style,1673 windowInfo s[i].pChildInfo[i3].ExStyle,1674 windowInfo s[i].pChildInfo[i3].Control1700 windowInfo.pChildInfo[i3].style, 1701 windowInfo.pChildInfo[i3].ExStyle, 1702 windowInfo.pChildInfo[i3].Control 1675 1703 ); 1676 1704 i2+=lstrlen(buffer+i2); 1677 1705 HeapDefaultFree(temporary); 1678 if(windowInfo s[i].pChildInfo[i3].Control==CT_IMAGEBOX){1679 sprintf(buffer+i2,",%d,\"%s\"",windowInfo s[i].pChildInfo[i3].ImageCtrlInfo.type,windowInfos[i].pChildInfo[i3].ImageCtrlInfo.path);1706 if(windowInfo.pChildInfo[i3].Control==CT_IMAGEBOX){ 1707 sprintf(buffer+i2,",%d,\"%s\"",windowInfo.pChildInfo[i3].ImageCtrlInfo.type,windowInfo.pChildInfo[i3].ImageCtrlInfo.path); 1680 1708 i2+=lstrlen(buffer+i2); 1681 1709 } … … 1687 1715 } 1688 1716 } 1689 sprintf(buffer+i2,"END\r\n",windowInfo s[i].name);1717 sprintf(buffer+i2,"END\r\n",windowInfo.name); 1690 1718 i2+=lstrlen(buffer+i2); 1691 1719 if(i2-GENERAL_SIZE<GENERAL_SIZE){ … … 2146 2174 extern HANDLE hHeap; 2147 2175 extern PROJECTINFO ProjectInfo; 2148 int i;2149 2176 char temporary[MAX_PATH],temp2[1024],*pTemp; 2150 2177 … … 2158 2185 return; 2159 2186 } 2160 for(i=0;i<ProjectInfo.windowInfos.size();i++){ 2161 if(lstrcmpi(NewWindow.name,ProjectInfo.windowInfos[i].name)==0){ 2187 BOOST_FOREACH( WINDOW_INFO &windowInfo, ProjectInfo.windowInfos ) 2188 { 2189 if(lstrcmpi(NewWindow.name,windowInfo.name)==0){ 2162 2190 //"\"%s\" ウィンドウは既にプロジェクト内に存在します。" 2163 sprintf(temporary,STRING_DUPLICATIONERROR_WINDOW_IN_PROJECT, ProjectInfo.windowInfos[i].name);2191 sprintf(temporary,STRING_DUPLICATIONERROR_WINDOW_IN_PROJECT,windowInfo.name); 2164 2192 MessageBox(hOwner,temporary,STRING_ERROR,MB_OK|MB_ICONEXCLAMATION); 2165 2193 return; 2166 2194 } 2167 if(lstrcmpi(NewWindow.HandleName, ProjectInfo.windowInfos[i].HandleName)==0){2195 if(lstrcmpi(NewWindow.HandleName,windowInfo.HandleName)==0){ 2168 2196 //"\"%s\" ハンドルは既にプロジェクト内に存在します。" 2169 sprintf(temporary,STRING_DUPLICATIONERROR_HANDLE_IN_PROJECT, ProjectInfo.windowInfos[i].HandleName);2197 sprintf(temporary,STRING_DUPLICATIONERROR_HANDLE_IN_PROJECT,windowInfo.HandleName); 2170 2198 MessageBox(hOwner,temporary,STRING_ERROR,MB_OK|MB_ICONEXCLAMATION); 2171 2199 return; 2172 2200 } 2173 if(lstrcmpi(NewWindow.CallBackName, ProjectInfo.windowInfos[i].CallBackName)==0){2201 if(lstrcmpi(NewWindow.CallBackName,windowInfo.CallBackName)==0){ 2174 2202 //"\"%s\" プロシージャは既にプロジェクト内に存在します。" 2175 sprintf(temporary,STRING_DUPLICATIONERROR_PROC_IN_PROJECT, ProjectInfo.windowInfos[i].CallBackName);2203 sprintf(temporary,STRING_DUPLICATIONERROR_PROC_IN_PROJECT,windowInfo.CallBackName); 2176 2204 MessageBox(hOwner,temporary,STRING_ERROR,MB_OK|MB_ICONEXCLAMATION); 2177 2205 return; … … 2301 2329 ProjectInfo.ModifyOfMaterial=1; 2302 2330 2303 NewRadWindow( ProjectInfo.windowInfos.size()-1);2331 NewRadWindow( ProjectInfo.windowInfos.back() ); 2304 2332 } 2305 2333 void Project_Window_Delete(int WndInfoNum){
Note:
See TracChangeset
for help on using the changeset viewer.