Changeset 609 in dev for trunk/ab5.0/abdev/abdev/Rad_UndoRedo.cpp
- Timestamp:
- May 18, 2008, 4:37:11 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/abdev/Rad_UndoRedo.cpp
r475 r609 7 7 extern MDIINFO MdiInfo[MAX_WNDNUM]; 8 8 extern PROJECTINFO ProjectInfo; 9 int i ,WndInfoNum;9 int i; 10 10 DWORD dw; 11 11 char *temporary; … … 21 21 pUndoState->NowPos=i; 22 22 23 WndInfoNum=GetWndInfoNum(MdiInfo[WndNum].path); 23 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[WndNum].path); 24 int WndInfoNum = GetWndInfoNum(MdiInfo[WndNum].path); 24 25 switch(pUndoState->Command[pUndoState->NowPos]){ 25 26 case RAD_UNDO_INSERTITEM: … … 44 45 names=(RAD_UNDOSTATE_NAME *)pUndoState->lpdwData[pUndoState->NowPos]; 45 46 46 temporary= ProjectInfo.pWindowInfo[WndInfoNum].name;47 ProjectInfo.pWindowInfo[WndInfoNum].name=names->name;47 temporary=pWindowInfo->name; 48 pWindowInfo->name=names->name; 48 49 names->name=temporary; 49 50 GlobalFree(MdiInfo[WndNum].path); 50 MdiInfo[WndNum].path=(char *)GlobalAlloc(GMEM_FIXED,lstrlen( ProjectInfo.pWindowInfo[WndInfoNum].name)+1);51 lstrcpy(MdiInfo[WndNum].path, ProjectInfo.pWindowInfo[WndInfoNum].name);52 53 temporary= ProjectInfo.pWindowInfo[WndInfoNum].HandleName;54 ProjectInfo.pWindowInfo[WndInfoNum].HandleName=names->HandleName;51 MdiInfo[WndNum].path=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(pWindowInfo->name)+1); 52 lstrcpy(MdiInfo[WndNum].path,pWindowInfo->name); 53 54 temporary=pWindowInfo->HandleName; 55 pWindowInfo->HandleName=names->HandleName; 55 56 names->HandleName=temporary; 56 57 57 temporary= ProjectInfo.pWindowInfo[WndInfoNum].CallBackName;58 ProjectInfo.pWindowInfo[WndInfoNum].CallBackName=names->CallBackName;58 temporary=pWindowInfo->CallBackName; 59 pWindowInfo->CallBackName=names->CallBackName; 59 60 names->CallBackName=temporary; 60 61 } 61 62 else{ 62 temporary= ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].IdName;63 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].IdName=(char *)pUndoState->lpdwData[pUndoState->NowPos];63 temporary=pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].IdName; 64 pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].IdName=(char *)pUndoState->lpdwData[pUndoState->NowPos]; 64 65 pUndoState->lpdwData[pUndoState->NowPos]=(DWORD)temporary; 65 66 } … … 69 70 case RAD_UNDO_CAPTION: 70 71 if(pUndoState->SelectItemNum[pUndoState->NowPos]==SELECT_WINDOW){ 71 temporary= ProjectInfo.pWindowInfo[WndInfoNum].caption;72 ProjectInfo.pWindowInfo[WndInfoNum].caption=(char *)pUndoState->lpdwData[pUndoState->NowPos];72 temporary=pWindowInfo->caption; 73 pWindowInfo->caption=(char *)pUndoState->lpdwData[pUndoState->NowPos]; 73 74 pUndoState->lpdwData[pUndoState->NowPos]=(DWORD)temporary; 74 75 } 75 76 else{ 76 temporary= ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].caption;77 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].caption=(char *)pUndoState->lpdwData[pUndoState->NowPos];77 temporary=pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].caption; 78 pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].caption=(char *)pUndoState->lpdwData[pUndoState->NowPos]; 78 79 pUndoState->lpdwData[pUndoState->NowPos]=(DWORD)temporary; 79 80 } 80 81 if(pUndoState->SelectItemNum[pUndoState->NowPos]==MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]) 81 82 ChangePropertyWindow(WndNum,WndInfoNum); 82 DrawRadWindow(WndNum, &ProjectInfo.pWindowInfo[WndInfoNum]);83 DrawRadWindow(WndNum,pWindowInfo); 83 84 break; 84 85 case RAD_UNDO_FONT: 85 86 LOGFONT *pLogFont,lf; 86 87 pLogFont=(LOGFONT *)pUndoState->lpdwData[pUndoState->NowPos]; 87 lf= ProjectInfo.pWindowInfo[WndInfoNum].LogFont;88 ProjectInfo.pWindowInfo[WndInfoNum].LogFont=*pLogFont;88 lf=pWindowInfo->LogFont; 89 pWindowInfo->LogFont=*pLogFont; 89 90 *pLogFont=lf; 90 91 if(pUndoState->SelectItemNum[pUndoState->NowPos]==MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]) 91 92 ChangePropertyWindow(WndNum,WndInfoNum); 92 DrawRadWindow(WndNum, &ProjectInfo.pWindowInfo[WndInfoNum]);93 DrawRadWindow(WndNum,pWindowInfo); 93 94 break; 94 95 case RAD_UNDO_BGCOLOR: 95 dw= ProjectInfo.pWindowInfo[WndInfoNum].bgColor;96 ProjectInfo.pWindowInfo[WndInfoNum].bgColor=pUndoState->lpdwData[pUndoState->NowPos];96 dw=pWindowInfo->bgColor; 97 pWindowInfo->bgColor=pUndoState->lpdwData[pUndoState->NowPos]; 97 98 pUndoState->lpdwData[pUndoState->NowPos]=dw; 98 99 if(pUndoState->SelectItemNum[pUndoState->NowPos]==MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]) 99 100 ChangePropertyWindow(WndNum,WndInfoNum); 100 DrawRadWindow(WndNum, &ProjectInfo.pWindowInfo[WndInfoNum]);101 DrawRadWindow(WndNum,pWindowInfo); 101 102 break; 102 103 case RAD_UNDO_WINDOWMENU: 103 temporary= ProjectInfo.pWindowInfo[WndInfoNum].MenuID;104 ProjectInfo.pWindowInfo[WndInfoNum].MenuID=(char *)pUndoState->lpdwData[pUndoState->NowPos];104 temporary=pWindowInfo->MenuID; 105 pWindowInfo->MenuID=(char *)pUndoState->lpdwData[pUndoState->NowPos]; 105 106 pUndoState->lpdwData[pUndoState->NowPos]=(DWORD)temporary; 106 107 if(pUndoState->SelectItemNum[pUndoState->NowPos]==MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]) … … 108 109 break; 109 110 case RAD_UNDO_ICONRES: 110 temporary= ProjectInfo.pWindowInfo[WndInfoNum].IconResName;111 ProjectInfo.pWindowInfo[WndInfoNum].IconResName=(char *)pUndoState->lpdwData[pUndoState->NowPos];111 temporary=pWindowInfo->IconResName; 112 pWindowInfo->IconResName=(char *)pUndoState->lpdwData[pUndoState->NowPos]; 112 113 pUndoState->lpdwData[pUndoState->NowPos]=(DWORD)temporary; 113 114 if(pUndoState->SelectItemNum[pUndoState->NowPos]==MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]) … … 116 117 case RAD_UNDO_STYLE: 117 118 if(pUndoState->SelectItemNum[pUndoState->NowPos]==SELECT_WINDOW){ 118 dw= ProjectInfo.pWindowInfo[WndInfoNum].style;119 ProjectInfo.pWindowInfo[WndInfoNum].style=pUndoState->lpdwData[pUndoState->NowPos];120 pUndoState->lpdwData[pUndoState->NowPos]=dw; 121 } 122 else{ 123 dw= ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].style;124 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].style=pUndoState->lpdwData[pUndoState->NowPos];125 pUndoState->lpdwData[pUndoState->NowPos]=dw; 126 } 127 if(pUndoState->SelectItemNum[pUndoState->NowPos]==MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]) 128 ChangePropertyWindow(WndNum,WndInfoNum); 129 DrawRadWindow(WndNum, &ProjectInfo.pWindowInfo[WndInfoNum]);119 dw=pWindowInfo->style; 120 pWindowInfo->style=pUndoState->lpdwData[pUndoState->NowPos]; 121 pUndoState->lpdwData[pUndoState->NowPos]=dw; 122 } 123 else{ 124 dw=pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].style; 125 pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].style=pUndoState->lpdwData[pUndoState->NowPos]; 126 pUndoState->lpdwData[pUndoState->NowPos]=dw; 127 } 128 if(pUndoState->SelectItemNum[pUndoState->NowPos]==MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]) 129 ChangePropertyWindow(WndNum,WndInfoNum); 130 DrawRadWindow(WndNum,pWindowInfo); 130 131 break; 131 132 case RAD_UNDO_EXSTYLE: 132 133 if(pUndoState->SelectItemNum[pUndoState->NowPos]==SELECT_WINDOW){ 133 dw= ProjectInfo.pWindowInfo[WndInfoNum].ExStyle;134 ProjectInfo.pWindowInfo[WndInfoNum].ExStyle=pUndoState->lpdwData[pUndoState->NowPos];135 pUndoState->lpdwData[pUndoState->NowPos]=dw; 136 } 137 else{ 138 dw= ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].ExStyle;139 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].ExStyle=pUndoState->lpdwData[pUndoState->NowPos];140 pUndoState->lpdwData[pUndoState->NowPos]=dw; 141 } 142 DrawRadWindow(WndNum, &ProjectInfo.pWindowInfo[WndInfoNum]);134 dw=pWindowInfo->ExStyle; 135 pWindowInfo->ExStyle=pUndoState->lpdwData[pUndoState->NowPos]; 136 pUndoState->lpdwData[pUndoState->NowPos]=dw; 137 } 138 else{ 139 dw=pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].ExStyle; 140 pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].ExStyle=pUndoState->lpdwData[pUndoState->NowPos]; 141 pUndoState->lpdwData[pUndoState->NowPos]=dw; 142 } 143 DrawRadWindow(WndNum,pWindowInfo); 143 144 break; 144 145 case RAD_UNDO_POSITION: … … 146 147 pReadPointAndSize=(POINTANDSIZE *)pUndoState->lpdwData[pUndoState->NowPos]; 147 148 if(pUndoState->SelectItemNum[pUndoState->NowPos]==SELECT_WINDOW){ 148 PointAndSize.size= ProjectInfo.pWindowInfo[WndInfoNum].size;149 ProjectInfo.pWindowInfo[WndInfoNum].size=pReadPointAndSize->size;150 } 151 else{ 152 PointAndSize.pos= ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].pos;153 PointAndSize.size= ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].size;154 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].pos=pReadPointAndSize->pos;155 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].size=pReadPointAndSize->size;149 PointAndSize.size=pWindowInfo->size; 150 pWindowInfo->size=pReadPointAndSize->size; 151 } 152 else{ 153 PointAndSize.pos=pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].pos; 154 PointAndSize.size=pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].size; 155 pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].pos=pReadPointAndSize->pos; 156 pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].size=pReadPointAndSize->size; 156 157 } 157 158 *pReadPointAndSize=PointAndSize; 158 DrawRadWindow(WndNum, &ProjectInfo.pWindowInfo[WndInfoNum]);159 DrawRadWindow(WndNum,pWindowInfo); 159 160 SetStatusText(NULL); 160 161 … … 166 167 pImageCtrlInfo=(IMAGECTRLINFO *)pUndoState->lpdwData[pUndoState->NowPos]; 167 168 168 dw= ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].ImageCtrlInfo.type;169 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].ImageCtrlInfo.type=pImageCtrlInfo->type;169 dw=pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].ImageCtrlInfo.type; 170 pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].ImageCtrlInfo.type=pImageCtrlInfo->type; 170 171 pImageCtrlInfo->type=dw; 171 172 172 dw=(DWORD) ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].ImageCtrlInfo.path;173 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].ImageCtrlInfo.path=pImageCtrlInfo->path;173 dw=(DWORD)pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].ImageCtrlInfo.path; 174 pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].ImageCtrlInfo.path=pImageCtrlInfo->path; 174 175 pImageCtrlInfo->path=(char *)dw; 175 176 176 177 if(pUndoState->SelectItemNum[pUndoState->NowPos]==MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]) 177 178 ChangePropertyWindow(WndNum,WndInfoNum); 178 DrawRadWindow(WndNum, &ProjectInfo.pWindowInfo[WndInfoNum]);179 DrawRadWindow(WndNum,pWindowInfo); 179 180 break; 180 181 case RAD_UNDO_TYPE: 181 dw= ProjectInfo.pWindowInfo[WndInfoNum].type;182 ProjectInfo.pWindowInfo[WndInfoNum].type=pUndoState->lpdwData[pUndoState->NowPos];182 dw=pWindowInfo->type; 183 pWindowInfo->type=pUndoState->lpdwData[pUndoState->NowPos]; 183 184 pUndoState->lpdwData[pUndoState->NowPos]=dw; 184 185 if(pUndoState->SelectItemNum[pUndoState->NowPos]==MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]) … … 195 196 extern MDIINFO MdiInfo[MAX_WNDNUM]; 196 197 extern PROJECTINFO ProjectInfo; 197 int WndInfoNum;198 198 DWORD dw; 199 199 char *temporary; … … 208 208 } 209 209 210 WndInfoNum=GetWndInfoNum(MdiInfo[WndNum].path); 210 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[WndNum].path); 211 int WndInfoNum = GetWndInfoNum(MdiInfo[WndNum].path); 211 212 switch(pUndoState->Command[pUndoState->NowPos]){ 212 213 case RAD_UNDO_INSERTITEM: … … 229 230 names=(RAD_UNDOSTATE_NAME *)pUndoState->lpdwData[pUndoState->NowPos]; 230 231 231 temporary= ProjectInfo.pWindowInfo[WndInfoNum].name;232 ProjectInfo.pWindowInfo[WndInfoNum].name=names->name;232 temporary=pWindowInfo->name; 233 pWindowInfo->name=names->name; 233 234 names->name=temporary; 234 235 GlobalFree(MdiInfo[WndNum].path); 235 MdiInfo[WndNum].path=(char *)GlobalAlloc(GMEM_FIXED,lstrlen( ProjectInfo.pWindowInfo[WndInfoNum].name)+1);236 lstrcpy(MdiInfo[WndNum].path, ProjectInfo.pWindowInfo[WndInfoNum].name);237 238 temporary= ProjectInfo.pWindowInfo[WndInfoNum].HandleName;239 ProjectInfo.pWindowInfo[WndInfoNum].HandleName=names->HandleName;236 MdiInfo[WndNum].path=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(pWindowInfo->name)+1); 237 lstrcpy(MdiInfo[WndNum].path,pWindowInfo->name); 238 239 temporary=pWindowInfo->HandleName; 240 pWindowInfo->HandleName=names->HandleName; 240 241 names->HandleName=temporary; 241 242 242 temporary= ProjectInfo.pWindowInfo[WndInfoNum].CallBackName;243 ProjectInfo.pWindowInfo[WndInfoNum].CallBackName=names->CallBackName;243 temporary=pWindowInfo->CallBackName; 244 pWindowInfo->CallBackName=names->CallBackName; 244 245 names->CallBackName=temporary; 245 246 } 246 247 else{ 247 temporary= ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].IdName;248 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].IdName=(char *)pUndoState->lpdwData[pUndoState->NowPos];248 temporary=pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].IdName; 249 pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].IdName=(char *)pUndoState->lpdwData[pUndoState->NowPos]; 249 250 pUndoState->lpdwData[pUndoState->NowPos]=(DWORD)temporary; 250 251 } … … 254 255 case RAD_UNDO_CAPTION: 255 256 if(pUndoState->SelectItemNum[pUndoState->NowPos]==SELECT_WINDOW){ 256 temporary= ProjectInfo.pWindowInfo[WndInfoNum].caption;257 ProjectInfo.pWindowInfo[WndInfoNum].caption=(char *)pUndoState->lpdwData[pUndoState->NowPos];257 temporary=pWindowInfo->caption; 258 pWindowInfo->caption=(char *)pUndoState->lpdwData[pUndoState->NowPos]; 258 259 pUndoState->lpdwData[pUndoState->NowPos]=(DWORD)temporary; 259 260 } 260 261 else{ 261 temporary= ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].caption;262 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].caption=(char *)pUndoState->lpdwData[pUndoState->NowPos];262 temporary=pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].caption; 263 pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].caption=(char *)pUndoState->lpdwData[pUndoState->NowPos]; 263 264 pUndoState->lpdwData[pUndoState->NowPos]=(DWORD)temporary; 264 265 } 265 266 if(pUndoState->SelectItemNum[pUndoState->NowPos]==MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]) 266 267 ChangePropertyWindow(WndNum,WndInfoNum); 267 DrawRadWindow(WndNum, &ProjectInfo.pWindowInfo[WndInfoNum]);268 DrawRadWindow(WndNum,pWindowInfo); 268 269 break; 269 270 case RAD_UNDO_FONT: 270 271 LOGFONT *pLogFont,lf; 271 272 pLogFont=(LOGFONT *)pUndoState->lpdwData[pUndoState->NowPos]; 272 lf= ProjectInfo.pWindowInfo[WndInfoNum].LogFont;273 ProjectInfo.pWindowInfo[WndInfoNum].LogFont=*pLogFont;273 lf=pWindowInfo->LogFont; 274 pWindowInfo->LogFont=*pLogFont; 274 275 *pLogFont=lf; 275 276 if(pUndoState->SelectItemNum[pUndoState->NowPos]==MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]) 276 277 ChangePropertyWindow(WndNum,WndInfoNum); 277 DrawRadWindow(WndNum, &ProjectInfo.pWindowInfo[WndInfoNum]);278 DrawRadWindow(WndNum,pWindowInfo); 278 279 break; 279 280 case RAD_UNDO_BGCOLOR: 280 dw= ProjectInfo.pWindowInfo[WndInfoNum].bgColor;281 ProjectInfo.pWindowInfo[WndInfoNum].bgColor=pUndoState->lpdwData[pUndoState->NowPos];281 dw=pWindowInfo->bgColor; 282 pWindowInfo->bgColor=pUndoState->lpdwData[pUndoState->NowPos]; 282 283 pUndoState->lpdwData[pUndoState->NowPos]=dw; 283 284 if(pUndoState->SelectItemNum[pUndoState->NowPos]==MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]) 284 285 ChangePropertyWindow(WndNum,WndInfoNum); 285 DrawRadWindow(WndNum, &ProjectInfo.pWindowInfo[WndInfoNum]);286 DrawRadWindow(WndNum,pWindowInfo); 286 287 break; 287 288 case RAD_UNDO_WINDOWMENU: 288 temporary= ProjectInfo.pWindowInfo[WndInfoNum].MenuID;289 ProjectInfo.pWindowInfo[WndInfoNum].MenuID=(char *)pUndoState->lpdwData[pUndoState->NowPos];289 temporary=pWindowInfo->MenuID; 290 pWindowInfo->MenuID=(char *)pUndoState->lpdwData[pUndoState->NowPos]; 290 291 pUndoState->lpdwData[pUndoState->NowPos]=(DWORD)temporary; 291 292 if(pUndoState->SelectItemNum[pUndoState->NowPos]==MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]) … … 293 294 break; 294 295 case RAD_UNDO_ICONRES: 295 temporary= ProjectInfo.pWindowInfo[WndInfoNum].IconResName;296 ProjectInfo.pWindowInfo[WndInfoNum].IconResName=(char *)pUndoState->lpdwData[pUndoState->NowPos];296 temporary=pWindowInfo->IconResName; 297 pWindowInfo->IconResName=(char *)pUndoState->lpdwData[pUndoState->NowPos]; 297 298 pUndoState->lpdwData[pUndoState->NowPos]=(DWORD)temporary; 298 299 if(pUndoState->SelectItemNum[pUndoState->NowPos]==MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]) … … 301 302 case RAD_UNDO_STYLE: 302 303 if(pUndoState->SelectItemNum[pUndoState->NowPos]==SELECT_WINDOW){ 303 dw= ProjectInfo.pWindowInfo[WndInfoNum].style;304 ProjectInfo.pWindowInfo[WndInfoNum].style=pUndoState->lpdwData[pUndoState->NowPos];305 pUndoState->lpdwData[pUndoState->NowPos]=dw; 306 } 307 else{ 308 dw= ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].style;309 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].style=pUndoState->lpdwData[pUndoState->NowPos];310 pUndoState->lpdwData[pUndoState->NowPos]=dw; 311 } 312 if(pUndoState->SelectItemNum[pUndoState->NowPos]==MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]) 313 ChangePropertyWindow(WndNum,WndInfoNum); 314 DrawRadWindow(WndNum, &ProjectInfo.pWindowInfo[WndInfoNum]);304 dw=pWindowInfo->style; 305 pWindowInfo->style=pUndoState->lpdwData[pUndoState->NowPos]; 306 pUndoState->lpdwData[pUndoState->NowPos]=dw; 307 } 308 else{ 309 dw=pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].style; 310 pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].style=pUndoState->lpdwData[pUndoState->NowPos]; 311 pUndoState->lpdwData[pUndoState->NowPos]=dw; 312 } 313 if(pUndoState->SelectItemNum[pUndoState->NowPos]==MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]) 314 ChangePropertyWindow(WndNum,WndInfoNum); 315 DrawRadWindow(WndNum,pWindowInfo); 315 316 break; 316 317 case RAD_UNDO_EXSTYLE: 317 318 if(pUndoState->SelectItemNum[pUndoState->NowPos]==SELECT_WINDOW){ 318 dw= ProjectInfo.pWindowInfo[WndInfoNum].ExStyle;319 ProjectInfo.pWindowInfo[WndInfoNum].ExStyle=pUndoState->lpdwData[pUndoState->NowPos];320 pUndoState->lpdwData[pUndoState->NowPos]=dw; 321 } 322 else{ 323 dw= ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].ExStyle;324 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].ExStyle=pUndoState->lpdwData[pUndoState->NowPos];325 pUndoState->lpdwData[pUndoState->NowPos]=dw; 326 } 327 DrawRadWindow(WndNum, &ProjectInfo.pWindowInfo[WndInfoNum]);319 dw=pWindowInfo->ExStyle; 320 pWindowInfo->ExStyle=pUndoState->lpdwData[pUndoState->NowPos]; 321 pUndoState->lpdwData[pUndoState->NowPos]=dw; 322 } 323 else{ 324 dw=pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].ExStyle; 325 pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].ExStyle=pUndoState->lpdwData[pUndoState->NowPos]; 326 pUndoState->lpdwData[pUndoState->NowPos]=dw; 327 } 328 DrawRadWindow(WndNum,pWindowInfo); 328 329 break; 329 330 case RAD_UNDO_POSITION: … … 331 332 pReadPointAndSize=(POINTANDSIZE *)pUndoState->lpdwData[pUndoState->NowPos]; 332 333 if(pUndoState->SelectItemNum[pUndoState->NowPos]==SELECT_WINDOW){ 333 PointAndSize.size= ProjectInfo.pWindowInfo[WndInfoNum].size;334 ProjectInfo.pWindowInfo[WndInfoNum].size=pReadPointAndSize->size;335 } 336 else{ 337 PointAndSize.pos= ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].pos;338 PointAndSize.size= ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].size;339 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].pos=pReadPointAndSize->pos;340 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].size=pReadPointAndSize->size;334 PointAndSize.size=pWindowInfo->size; 335 pWindowInfo->size=pReadPointAndSize->size; 336 } 337 else{ 338 PointAndSize.pos=pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].pos; 339 PointAndSize.size=pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].size; 340 pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].pos=pReadPointAndSize->pos; 341 pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].size=pReadPointAndSize->size; 341 342 } 342 343 *pReadPointAndSize=PointAndSize; 343 DrawRadWindow(WndNum, &ProjectInfo.pWindowInfo[WndInfoNum]);344 DrawRadWindow(WndNum,pWindowInfo); 344 345 SetStatusText(NULL); 345 346 … … 351 352 pImageCtrlInfo=(IMAGECTRLINFO *)pUndoState->lpdwData[pUndoState->NowPos]; 352 353 353 dw= ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].ImageCtrlInfo.type;354 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].ImageCtrlInfo.type=pImageCtrlInfo->type;354 dw=pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].ImageCtrlInfo.type; 355 pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].ImageCtrlInfo.type=pImageCtrlInfo->type; 355 356 pImageCtrlInfo->type=dw; 356 357 357 dw=(DWORD) ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].ImageCtrlInfo.path;358 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].ImageCtrlInfo.path=pImageCtrlInfo->path;358 dw=(DWORD)pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].ImageCtrlInfo.path; 359 pWindowInfo->pChildInfo[pUndoState->SelectItemNum[pUndoState->NowPos]].ImageCtrlInfo.path=pImageCtrlInfo->path; 359 360 pImageCtrlInfo->path=(char *)dw; 360 361 361 362 if(pUndoState->SelectItemNum[pUndoState->NowPos]==MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]) 362 363 ChangePropertyWindow(WndNum,WndInfoNum); 363 DrawRadWindow(WndNum, &ProjectInfo.pWindowInfo[WndInfoNum]);364 DrawRadWindow(WndNum,pWindowInfo); 364 365 break; 365 366 case RAD_UNDO_TYPE: 366 dw= ProjectInfo.pWindowInfo[WndInfoNum].type;367 ProjectInfo.pWindowInfo[WndInfoNum].type=pUndoState->lpdwData[pUndoState->NowPos];367 dw=pWindowInfo->type; 368 pWindowInfo->type=pUndoState->lpdwData[pUndoState->NowPos]; 368 369 pUndoState->lpdwData[pUndoState->NowPos]=dw; 369 370 if(pUndoState->SelectItemNum[pUndoState->NowPos]==MdiInfo[WndNum].MdiRadInfo->SelectingItem[0])
Note:
See TracChangeset
for help on using the changeset viewer.