Changeset 624 in dev for trunk/ab5.0/abdev/abdev/RadSupport.cpp
- Timestamp:
- May 23, 2008, 10:35:36 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/abdev/RadSupport.cpp
r623 r624 40 40 HFONT *lphFont; 41 41 HANDLE *lphImage; 42 int i2 ,i3;42 int i2; 43 43 char temporary[MAX_PATH]; 44 44 … … 50 50 } 51 51 52 WindowInfo *pWindowInfo = projectInfo.windowInfos[WndInfoNum];53 54 if(pWindowInfo-> style&WS_CHILD){52 ActiveBasic::PM::WindowInfo *pWindowInfo = projectInfo.windowInfos[WndInfoNum]; 53 54 if(pWindowInfo->GetStyle()&WS_CHILD){ 55 55 //"チャイルドウィンドウをテスト表示することはできません" 56 56 MessageBox(hOwner,STRING_RAD_ERROR_CANT_CHILDTEST,STRING_ERROR,MB_OK|MB_ICONEXCLAMATION); … … 64 64 65 65 //テスト用のメインウィンドウを作成 66 hWnd=CreateWindowEx(pWindowInfo-> ExStyle,66 hWnd=CreateWindowEx(pWindowInfo->GetExStyle(), 67 67 "TestWindow", 68 68 pWindowInfo->GetName().c_str(), 69 pWindowInfo-> style|WS_VISIBLE,69 pWindowInfo->GetStyle()|WS_VISIBLE, 70 70 CW_USEDEFAULT,CW_USEDEFAULT, 71 71 pWindowInfo->size.cx,pWindowInfo->size.cy, … … 73 73 74 74 //子ウィンドウ作成 75 for(i2=0;i2<pWindowInfo->childWindowInfos.size();i2++){ 75 for( i2=0; i2<static_cast<int>(pWindowInfo->childWindowInfos.size()); i2++ ) 76 { 76 77 if(pWindowInfo->childWindowInfos[i2]->Control==CT_UPDOWN){ 77 78 CreateUpDownControl( 78 pWindowInfo->childWindowInfos[i2]-> style,79 pWindowInfo->childWindowInfos[i2]->GetStyle(), 79 80 pWindowInfo->childWindowInfos[i2]->pos.x,pWindowInfo->childWindowInfos[i2]->pos.y, 80 81 pWindowInfo->childWindowInfos[i2]->size.cx,pWindowInfo->childWindowInfos[i2]->size.cy, … … 85 86 GetItemClassName(temporary,pWindowInfo->childWindowInfos[i2]->Control); 86 87 hChild=CreateWindowEx( 87 pWindowInfo->childWindowInfos[i2]-> ExStyle,88 pWindowInfo->childWindowInfos[i2]->GetExStyle(), 88 89 temporary, 89 pWindowInfo->childWindowInfos[i2]-> caption,90 pWindowInfo->childWindowInfos[i2]-> style,90 pWindowInfo->childWindowInfos[i2]->GetCaption().c_str(), 91 pWindowInfo->childWindowInfos[i2]->GetStyle(), 91 92 pWindowInfo->childWindowInfos[i2]->pos.x, 92 93 pWindowInfo->childWindowInfos[i2]->pos.y, … … 102 103 // イメージ ボックスの場合 103 104 /////////////////////////// 104 if((pWindowInfo->childWindowInfos[i2]->style&0x000F)==SS_ICON){ 105 if(pWindowInfo->childWindowInfos[i2]->ImageCtrlInfo.type==IMGTYPE_FILE) 106 lstrcpy(temporary,pWindowInfo->childWindowInfos[i2]->ImageCtrlInfo.path); 107 else{ 108 for(i3=0;i3<projectInfo.resourceManager.iconResources.size();i3++) 105 if((pWindowInfo->childWindowInfos[i2]->GetStyle()&0x000F)==SS_ICON){ 106 if(pWindowInfo->childWindowInfos[i2]->image.IsFile()) 107 { 108 lstrcpy(temporary,pWindowInfo->childWindowInfos[i2]->image.path.c_str()); 109 } 110 else 111 { 112 temporary[0] = 0; 113 BOOST_FOREACH( const ActiveBasic::Common::ResourceItem &resourceItem, projectInfo.resourceManager.iconResources ) 109 114 { 110 if( projectInfo.resourceManager.iconResources[i3].idName == pWindowInfo->childWindowInfos[i2]->ImageCtrlInfo.path )115 if( resourceItem.idName == pWindowInfo->childWindowInfos[i2]->image.path ) 111 116 { 117 lstrcpy( temporary, resourceItem.filepath.c_str() ); 112 118 break; 113 119 } 114 120 } 115 if(i3==projectInfo.resourceManager.iconResources.size()) temporary[0]=0;116 else lstrcpy(temporary,projectInfo.resourceManager.iconResources[i3].filepath.c_str());117 121 } 118 122 if(temporary[0]){ … … 123 127 } 124 128 } 125 else if((pWindowInfo->childWindowInfos[i2]->style&0x000F)==SS_BITMAP){ 126 if(pWindowInfo->childWindowInfos[i2]->ImageCtrlInfo.type==IMGTYPE_FILE) 127 lstrcpy(temporary,pWindowInfo->childWindowInfos[i2]->ImageCtrlInfo.path); 128 else{ 129 for(i3=0;i3<projectInfo.resourceManager.bitmapResources.size();i3++){ 130 if( projectInfo.resourceManager.bitmapResources[i3].idName == pWindowInfo->childWindowInfos[i2]->ImageCtrlInfo.path ) 129 else if((pWindowInfo->childWindowInfos[i2]->GetStyle()&0x000F)==SS_BITMAP){ 130 if(pWindowInfo->childWindowInfos[i2]->image.IsFile()) 131 { 132 lstrcpy(temporary,pWindowInfo->childWindowInfos[i2]->image.path.c_str()); 133 } 134 else 135 { 136 temporary[0] = 0; 137 BOOST_FOREACH( const ActiveBasic::Common::ResourceItem &resourceItem, projectInfo.resourceManager.bitmapResources ) 138 { 139 if( resourceItem.idName == pWindowInfo->childWindowInfos[i2]->image.path ) 131 140 { 141 lstrcpy( temporary, resourceItem.filepath.c_str() ); 132 142 break; 133 143 } 134 144 } 135 if(i3==projectInfo.resourceManager.bitmapResources.size()) temporary[0]=0;136 else lstrcpy(temporary,projectInfo.resourceManager.bitmapResources[i3].filepath.c_str());137 145 } 138 146 if(temporary[0]){ … … 155 163 156 164 //フォントハンドルを破棄 157 for(i2=0;i2< pWindowInfo->childWindowInfos.size();i2++){165 for(i2=0;i2<static_cast<int>(pWindowInfo->childWindowInfos.size());i2++){ 158 166 if(lphFont[i2]) DeleteObject(lphFont[i2]); 159 167 } … … 161 169 162 170 //イメージハンドルを破棄 163 for(i2=0;i2< pWindowInfo->childWindowInfos.size();i2++){171 for(i2=0;i2<static_cast<int>(pWindowInfo->childWindowInfos.size());i2++){ 164 172 if(lphImage[i2]){ 165 if((pWindowInfo->childWindowInfos[i2]-> style&0x000F)==SS_ICON)173 if((pWindowInfo->childWindowInfos[i2]->GetStyle()&0x000F)==SS_ICON) 166 174 DestroyIcon((HICON)lphImage[i2]); 167 else if((pWindowInfo->childWindowInfos[i2]-> style&0x000F)==SS_BITMAP)175 else if((pWindowInfo->childWindowInfos[i2]->GetStyle()&0x000F)==SS_BITMAP) 168 176 DeleteObject(lphImage[i2]); 169 177 } … … 176 184 } 177 185 178 void SetSupportDlgData(int WndNum, const WindowInfo &windowInfo )186 void SetSupportDlgData(int WndNum, const ActiveBasic::PM::WindowInfo &windowInfo ) 179 187 { 180 188 //////////////////////////////////// … … 307 315 308 316 i=GetWndNum(GetParent(hwnd)); 309 WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path);317 ActiveBasic::PM::WindowInfo *pWindowInfo = GetWndInfo(MdiInfo[i].path); 310 318 311 319 for(i3=0;;i3++){
Note:
See TracChangeset
for help on using the changeset viewer.