- Timestamp:
- May 18, 2008, 4:37:11 PM (17 years ago)
- Location:
- trunk/ab5.0/abdev/abdev
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/abdev/Common.h
r608 r609 160 160 #define TABCOLOR_BLUE RGB(200,220,255) //青 161 161 #define TABCOLOR_YELLOW RGB(255,255,180) //黄色 162 163 164 //////////////////////////////////////////165 // BasicCompiler、ProjectEditor共通の定数166 //////////////////////////////////////////167 168 //サイズ変更枠の太さ169 #define LEVER_THICK 5170 171 #define WM_SHOWERROR WM_USER+70 //エラー表示メッセージ172 173 #define WM_SETCOMPILEVIEW WM_USER+71 //コンパイラウィンドウが表示されたとき174 #define WM_DESTROYCOMPILEVIEW WM_USER+72 //コンパイラウィンドウが破棄されたとき175 176 #define WM_SETDEBUGGERBASE WM_USER+73 //デバッガベースウィンドウが表示されたとき177 #define WM_DESTROYDEBUGGERBASE WM_USER+74 //デバッガベースウィンドウが破棄されたとき178 179 #define WM_SETDEBUGGERVIEW WM_USER+75 //デバッガウィンドウが表示されたとき180 #define WM_DESTROYDEBUGGERVIEW WM_USER+76 //デバッガウィンドウが表示されたとき181 182 ///////////////////////////////////////////183 162 184 163 … … 614 593 HTREEITEM hMenuTreeItem; 615 594 616 int NumberOfWindows; 617 WINDOW_INFO *pWindowInfo; 595 std::vector<WINDOW_INFO> windowInfos; 618 596 HTREEITEM hWindowTreeItem; 619 597 … … 639 617 }; 640 618 extern PROJECTINFO ProjectInfo; 619 620 extern ActiveBasic::IDE::ProjectManager projectManager; 641 621 642 622 … … 1094 1074 //WindowControl.cpp 1095 1075 int GetWndInfoNum(char *name); 1076 WINDOW_INFO *GetWndInfo( char *name ); 1096 1077 HGLOBAL Rad_GetChildInfoClipboardData(int WndNum,int WndInfoNum); 1097 1078 void Rad_PasteChildInfoClipboardData(int WndNum,HGLOBAL hGlobal); … … 1099 1080 void GetItemClassName(char *buffer,int Control); 1100 1081 void SaveWindowProgram(); 1101 void SaveWindowFile( char *path,WINDOW_INFO *WindowInfo,int NumberOfWindowInfo);1082 void SaveWindowFile( char *path, const std::vector<WINDOW_INFO> &windowInfos ); 1102 1083 _int8 OpenWindowFile(char *path); 1103 1084 void GetDefaultWindowFont(LOGFONT *LogFont); -
trunk/ab5.0/abdev/abdev/FileOperation.cpp
r475 r609 350 350 if(ProjectInfo.ModifyOfMaterial){ 351 351 sprintf(temporary,"%s%s.wnd",ProjectInfo.dir,ProjectInfo.name); 352 SaveWindowFile( temporary,ProjectInfo.pWindowInfo,ProjectInfo.NumberOfWindows);352 SaveWindowFile( temporary, ProjectInfo.windowInfos ); 353 353 354 354 //.wbpファイルを生成 -
trunk/ab5.0/abdev/abdev/MessageCallOperation.cpp
r475 r609 20 20 buffer[i]=0; 21 21 if(lstrcmp(EventName,"MenuClick")==0) return CT_MENU; 22 for(i=0;i<ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows;i++){ 23 if(lstrcmp(buffer,ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].IdName)==0) break; 24 } 25 if(i==ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows) return 0; 26 27 return ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].Control; 22 23 WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum]; 24 for(i=0;i<pWindowInfo->NumberOfChildWindows;i++){ 25 if(lstrcmp(buffer,pWindowInfo->pChildInfo[i].IdName)==0) break; 26 } 27 if(i==pWindowInfo->NumberOfChildWindows) return 0; 28 29 return pWindowInfo->pChildInfo[i].Control; 28 30 } 29 31 char **GetProcedureNamesOfMessageCall(int WndInfoNum,ITEMEVENTINFO **ppItemEventInfo,int *num,BOOL *pbAlways){ … … 33 35 char *buffer,**ppNames,temporary[MAX_PATH],temp2[MAX_PATH]; 34 36 35 NameLen=lstrlen(ProjectInfo.pWindowInfo[WndInfoNum].name); 36 CallBackNameLen=lstrlen(ProjectInfo.pWindowInfo[WndInfoNum].CallBackName); 37 38 sprintf(temporary,"%s%s",ProjectInfo.dir,ProjectInfo.pWindowInfo[WndInfoNum].filepath); 37 WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum]; 38 39 NameLen=lstrlen(pWindowInfo->name); 40 CallBackNameLen=lstrlen(pWindowInfo->CallBackName); 41 42 sprintf(temporary,"%s%s",ProjectInfo.dir,pWindowInfo->filepath); 39 43 buffer=ReadBuffer(temporary); 40 44 … … 72 76 strncpy(temporary,buffer+i2,NameLen); 73 77 temporary[NameLen]=0; 74 if(lstrcmp(temporary, ProjectInfo.pWindowInfo[WndInfoNum].name)==0&&buffer[i2+NameLen]=='_'){78 if(lstrcmp(temporary,pWindowInfo->name)==0&&buffer[i2+NameLen]=='_'){ 75 79 for(i2+=NameLen+1,i3=0;;i2++,i3++){ 76 80 if(!IsVariableChar(buffer[i2])){ … … 113 117 i2+=9; 114 118 while(buffer[i2]==' '||buffer[i2]=='\t') i2++; 115 if(memicmp(buffer+i2, ProjectInfo.pWindowInfo[WndInfoNum].CallBackName,CallBackNameLen)==0&&119 if(memicmp(buffer+i2,pWindowInfo->CallBackName,CallBackNameLen)==0&& 116 120 (buffer[i2+CallBackNameLen]==' '||buffer[i2+CallBackNameLen]=='\t'||buffer[i2+CallBackNameLen]=='(')){ 117 121 *pbAlways=1; … … 132 136 POINT pos; 133 137 134 sprintf(temporary,"%s%s",ProjectInfo.dir,ProjectInfo.pWindowInfo[WndInfoNum].filepath); 138 WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum]; 139 140 sprintf(temporary,"%s%s",ProjectInfo.dir,pWindowInfo->filepath); 135 141 hChild=OpenFileWithExtension(temporary); 136 142 if(!hChild) return; … … 217 223 char temporary[MAX_PATH]; 218 224 225 WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum]; 226 219 227 MaxCount=ListView_GetItemCount(hList); 220 228 if(MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){ … … 224 232 ListView_GetItemText(hList,i,0,temporary,MAX_PATH); 225 233 sprintf(EventName,"%s_%s", 226 ProjectInfo.pWindowInfo[WndInfoNum].name,234 pWindowInfo->name, 227 235 temporary); 228 236 break; … … 263 271 ListView_GetItemText(hList,i,0,temporary,MAX_PATH); 264 272 sprintf(EventName,"%s_%s_MenuClick", 265 ProjectInfo.pWindowInfo[WndInfoNum].name,273 pWindowInfo->name, 266 274 temporary); 267 275 break; … … 277 285 ListView_GetItemText(hList,i,0,temporary,MAX_PATH); 278 286 sprintf(EventName,"%s_%s", 279 ProjectInfo.pWindowInfo[WndInfoNum].name,287 pWindowInfo->name, 280 288 temporary); 281 289 break; … … 292 300 ListView_GetItemText(hList,i,0,temporary,MAX_PATH); 293 301 sprintf(EventName,"%s_%s_%s", 294 ProjectInfo.pWindowInfo[WndInfoNum].name,295 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].IdName,302 pWindowInfo->name, 303 pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].IdName, 296 304 temporary); 297 305 break; … … 300 308 if(i==MaxCount) return 0; 301 309 302 if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_LISTVIEW){310 if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_LISTVIEW){ 303 311 //ListView 304 312 if(i==0) lstrcpy(Parameter,"ByRef nmListView As NMLISTVIEW"); … … 324 332 else if(i==20) lstrcpy(Parameter,"ByRef nmLVDispInfo As NMLVDISPINFO"); 325 333 } 326 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_PROGRESSBAR){334 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_PROGRESSBAR){ 327 335 //ProgressBar 328 336 lstrcpy(Parameter,"ByRef nmHdr As NMHDR"); 329 337 } 330 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_TRACKBAR){338 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_TRACKBAR){ 331 339 //TrackBar 332 340 lstrcpy(Parameter,"ByRef nmHdr As NMHDR"); 333 341 } 334 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_TREEVIEW){342 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_TREEVIEW){ 335 343 //TreeView 336 344 if(0<=i&&i<=7) lstrcpy(Parameter,"ByRef nmHdr As NMHDR"); 337 345 else lstrcpy(Parameter,"ByRef nmTreeView As NMTREEVIEW"); 338 346 } 339 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_UPDOWN){347 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_UPDOWN){ 340 348 //UpDown 341 349 if(i==0) lstrcpy(Parameter,"ByRef nmHdr As NMHDR"); … … 391 399 extern MDIINFO MdiInfo[MAX_WNDNUM]; 392 400 extern PROJECTINFO ProjectInfo; 393 int i,i2,WndNum ,WndInfoNum;401 int i,i2,WndNum; 394 402 HWND hList; 395 403 … … 399 407 400 408 WndNum=GetWndNum(GetWindow(hClient,GW_CHILD)); 401 W ndInfoNum=GetWndInfoNum(MdiInfo[WndNum].path);409 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[WndNum].path); 402 410 i=0; 403 411 if(MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){ … … 437 445 //メニュー イベント 438 446 SendDlgItemMessage(hDlg,IDC_MENU,BM_SETCHECK,BST_CHECKED,0); 439 if( ProjectInfo.pWindowInfo[WndInfoNum].MenuID){447 if(pWindowInfo->MenuID){ 440 448 int MenuInfoNum; 441 MenuInfoNum=GetMenuInfoNum( ProjectInfo.pWindowInfo[WndInfoNum].MenuID);449 MenuInfoNum=GetMenuInfoNum(pWindowInfo->MenuID); 442 450 i=0; 443 451 i2=0; … … 456 464 EnableWindow(GetDlgItem(hDlg,IDC_MMSYS),0); 457 465 SendDlgItemMessage(hDlg,IDC_DEFAULT,BM_SETCHECK,BST_CHECKED,0); 458 if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_BUTTON){466 if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_BUTTON){ 459 467 //Button 460 468 InsertEventToList(hList,i++,"Click","BN_CLICKED","ボタンがクリックされた時"); 461 469 InsertEventToList(hList,i++,"DblClick","BN_DBLCLK","ボタンがダブル クリックされた時"); 462 470 } 463 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_CHECKBOX){471 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_CHECKBOX){ 464 472 //CheckBox 465 473 InsertEventToList(hList,i++,"Click","BN_CLICKED","チェック ボックスがクリックされた時"); 466 474 InsertEventToList(hList,i++,"DblClick","BN_DBLCLK","チェック ボックスがダブル クリックされた時"); 467 475 } 468 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_COMBOBOX){476 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_COMBOBOX){ 469 477 //ComboBox 470 478 InsertEventToList(hList,i++,"CloseUp","CBN_CLOSEUP","リスト ボックスが非表示になる時"); … … 480 488 InsertEventToList(hList,i++,"SetFocus","CBN_SETFOCUS","入力フォーカスを取得した時"); 481 489 } 482 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_EDIT){490 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_EDIT){ 483 491 //Edit 484 492 InsertEventToList(hList,i++,"Change","EN_CHANGE","エディット ボックスの内容が変更された時(後処理)"); … … 491 499 InsertEventToList(hList,i++,"VScroll","EN_VSCROLL","垂直スクロールを行った時"); 492 500 } 493 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_IMAGEBOX){501 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_IMAGEBOX){ 494 502 //ImageBox 495 503 InsertEventToList(hList,i++,"Click","STN_CLICKED","イメージ ボックスがクリックされた時"); 496 504 InsertEventToList(hList,i++,"DblClick","STN_DBLCLK","イメージ ボックスがダブル クリックされた時"); 497 505 } 498 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_LISTBOX){506 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_LISTBOX){ 499 507 //ListBox 500 508 InsertEventToList(hList,i++,"SelChange","LBN_SELCHANGE","リスト内の選択が変更された時"); … … 505 513 InsertEventToList(hList,i++,"SetFocus","LBN_SETFOCUS","入力フォーカスを取得した時"); 506 514 } 507 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_LISTVIEW){515 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_LISTVIEW){ 508 516 //ListView 509 517 i=SetDefaultNotifyMessagesInList(hList,CT_LISTVIEW); 510 518 } 511 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_PROGRESSBAR){519 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_PROGRESSBAR){ 512 520 //ProgressBar 513 521 InsertEventToList(hList,i++,"OutOfMemory","NM_OUTOFMEMORY","メモリ不足でコントロールの動作が完了できない時"); 514 522 } 515 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_RADIOBUTTON){523 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_RADIOBUTTON){ 516 524 //RadioButton 517 525 InsertEventToList(hList,i++,"Click","BN_CLICKED","ラジオ ボタンがクリックされた時"); 518 526 InsertEventToList(hList,i++,"DblClick","BN_DBLCLK","ラジオ ボタンがダブル クリックされた時"); 519 527 } 520 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_STATIC){528 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_STATIC){ 521 529 //Static 522 530 InsertEventToList(hList,i++,"Click","STN_CLICKED","スタティック テキストがクリックされた時"); 523 531 InsertEventToList(hList,i++,"DblClick","STN_DBLCLK","スタティック テキストがダブル クリックされた時"); 524 532 } 525 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_TRACKBAR){533 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_TRACKBAR){ 526 534 //TrackBar 527 535 InsertEventToList(hList,i++,"OutOfMemory","NM_OUTOFMEMORY","メモリ不足でコントロールの動作が完了できない時"); … … 529 537 InsertEventToList(hList,i++,"CustomDraw","NM_CUSTOMDRAW ","カスタム描画操作の通知"); 530 538 } 531 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_TREEVIEW){539 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_TREEVIEW){ 532 540 //TreeView 533 541 i=SetDefaultNotifyMessagesInList(hList,CT_TREEVIEW); 534 542 } 535 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_UPDOWN){543 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_UPDOWN){ 536 544 //UpDown 537 545 InsertEventToList(hList,i++,"OutOfMemory","NM_OUTOFMEMORY","メモリ不足でコントロールの動作が完了できない時"); … … 643 651 SetWindowLongPtr(GetDlgItem(hwnd,IDC_EVENTLIST),GWLP_WNDPROC,(long)EventListViewProc); 644 652 645 WndNum=GetWndNum(GetWindow(hClient,GW_CHILD)); 646 WndInfoNum=GetWndInfoNum(MdiInfo[WndNum].path); 647 NowMenuNum=GetMenuInfoNum(ProjectInfo.pWindowInfo[WndInfoNum].MenuID); 653 { 654 WndNum=GetWndNum(GetWindow(hClient,GW_CHILD)); 655 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[WndNum].path); 656 NowMenuNum=GetMenuInfoNum(pWindowInfo->MenuID); 657 } 648 658 break; 649 659 case WM_COMMAND: -
trunk/ab5.0/abdev/abdev/ProjectControl.cpp
r608 r609 180 180 case IDM_MATERIALTREE_OPEN: 181 181 hTreeItem=TreeView_GetSelection(hMaterialTreeView); 182 for(i=0;i< ProjectInfo.NumberOfWindows;i++){183 if(ProjectInfo. pWindowInfo[i].hTreeItem==hTreeItem){182 for(i=0;i<static_cast<int>(ProjectInfo.windowInfos.size());i++){ 183 if(ProjectInfo.windowInfos[i].hTreeItem==hTreeItem){ 184 184 NewRadWindow(i); 185 185 break; … … 247 247 } 248 248 } 249 for(i=0;i< ProjectInfo.NumberOfWindows;i++){250 if(ProjectInfo. pWindowInfo[i].hTreeItem==hTreeItem){249 for(i=0;i<static_cast<int>(ProjectInfo.windowInfos.size());i++){ 250 if(ProjectInfo.windowInfos[i].hTreeItem==hTreeItem){ 251 251 252 252 //"%s ウィンドウをプロジェクトから削除します。よろしいですか?" 253 sprintf(str,STRING_PJ_CHECK_DELETEWINDOW,ProjectInfo. pWindowInfo[i].name);253 sprintf(str,STRING_PJ_CHECK_DELETEWINDOW,ProjectInfo.windowInfos[i].name); 254 254 if(IDCANCEL==MessageBox(hOwner,str,APPLICATION_NAME,MB_OKCANCEL|MB_ICONEXCLAMATION)) break; 255 255 … … 1058 1058 // ウィンドウ定義ファイル(*.wnd)を作成 1059 1059 ///////////////////////////////////////// 1060 WINDOW_INFO WindowInfo[1]; 1061 WindowInfo[0].name="MainWnd"; 1062 WindowInfo[0].HandleName="hMainWnd"; 1063 WindowInfo[0].pos.x=CW_USEDEFAULT; 1064 WindowInfo[0].pos.y=CW_USEDEFAULT; 1065 WindowInfo[0].size.cx=480; 1066 WindowInfo[0].size.cy=360; 1067 WindowInfo[0].caption=NewProjectInfo.name; 1060 std::vector<WINDOW_INFO> windowInfos; 1061 windowInfos.push_back( WINDOW_INFO() ); 1062 windowInfos.back().name="MainWnd"; 1063 windowInfos.back().HandleName="hMainWnd"; 1064 windowInfos.back().pos.x=CW_USEDEFAULT; 1065 windowInfos.back().pos.y=CW_USEDEFAULT; 1066 windowInfos.back().size.cx=480; 1067 windowInfos.back().size.cy=360; 1068 windowInfos.back().caption=NewProjectInfo.name; 1068 1069 if(NewProjectInfo.dwTypeID==IDC_EXE_WINDOWBASE) 1069 WindowInfo[0].style=WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_THICKFRAME|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_VISIBLE;1070 windowInfos.back().style=WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_THICKFRAME|WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_VISIBLE; 1070 1071 else if(NewProjectInfo.dwTypeID==IDC_EXE_DIRECTX) 1071 WindowInfo[0].style=WS_OVERLAPPED|WS_THICKFRAME|WS_SYSMENU;1072 WindowInfo[0].ExStyle=0;1073 WindowInfo[0].MenuID=0;1074 WindowInfo[0].id=0;1075 WindowInfo[0].bgColor=COLOR_3DFACE;1076 GetDefaultWindowFont(& WindowInfo[0].LogFont);1077 WindowInfo[0].IconResName=0;1078 WindowInfo[0].ClassName="NORMAL";1079 WindowInfo[0].CallBackName="MainWndProc";1080 WindowInfo[0].type=WNDTYPE_DEFAULT;1081 WindowInfo[0].filepath="MainWnd.ab";1082 WindowInfo[0].NumberOfChildWindows=0;1072 windowInfos.back().style=WS_OVERLAPPED|WS_THICKFRAME|WS_SYSMENU; 1073 windowInfos.back().ExStyle=0; 1074 windowInfos.back().MenuID=0; 1075 windowInfos.back().id=0; 1076 windowInfos.back().bgColor=COLOR_3DFACE; 1077 GetDefaultWindowFont(&windowInfos.back().LogFont); 1078 windowInfos.back().IconResName=0; 1079 windowInfos.back().ClassName="NORMAL"; 1080 windowInfos.back().CallBackName="MainWndProc"; 1081 windowInfos.back().type=WNDTYPE_DEFAULT; 1082 windowInfos.back().filepath="MainWnd.ab"; 1083 windowInfos.back().NumberOfChildWindows=0; 1083 1084 sprintf(temporary,"%s%s.wnd",dir,NewProjectInfo.name); 1084 1085 1085 1086 ProjectInfo.NumberOfMenu=0; 1086 SaveWindowFile( temporary,WindowInfo,1);1087 SaveWindowFile( temporary, windowInfos ); 1087 1088 } 1088 1089 … … 1209 1210 tv.hParent=TreeView_InsertItem(hMaterialTreeView,&tv); 1210 1211 ProjectInfo.hWindowTreeItem=tv.hParent; 1211 for(i=0;i<ProjectInfo.NumberOfWindows;i++){ 1212 BOOST_FOREACH( WINDOW_INFO &windowInfo, ProjectInfo.windowInfos ) 1213 { 1212 1214 tv.item.iImage=2; 1213 1215 tv.item.iSelectedImage=2; 1214 tv.item.pszText =ProjectInfo.pWindowInfo[i].name;1215 ProjectInfo.pWindowInfo[i].hTreeItem=TreeView_InsertItem(hMaterialTreeView,&tv);1216 tv.item.pszText = windowInfo.name; 1217 windowInfo.hTreeItem=TreeView_InsertItem(hMaterialTreeView,&tv); 1216 1218 } 1217 1219 } … … 1253 1255 //解析 1254 1256 ProjectInfo.pobj_DBFileInfo=new CDBFileInfo(); 1257 bool isUseWindow = false; 1255 1258 for(i=0;;i++){ 1256 1259 if(buffer[i]=='\0') break; … … 1324 1327 temporary[i2]=buffer[i]; 1325 1328 } 1326 ProjectInfo.NumberOfWindows=atoi(temporary); 1329 if( atoi(temporary) > 0 ) 1330 { 1331 isUseWindow = true; 1332 } 1327 1333 } 1328 1334 else if(lstrcmpi(temporary,"OPTION")==0&&buffer[i]=='='){ … … 1450 1456 1451 1457 1452 if(ProjectInfo.NumberOfWindows){ 1458 if( isUseWindow ) 1459 { 1453 1460 ///////////////////////////////////////////// 1454 1461 //ウィンドウ定義ファイル(*.wnd)をオープン … … 1457 1464 } 1458 1465 else{ 1459 ProjectInfo. pWindowInfo=(WINDOW_INFO *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,1);1466 ProjectInfo.windowInfos.clear(); 1460 1467 1461 1468 ProjectInfo.NumberOfMenu=0; … … 1581 1588 } 1582 1589 else if(lstrcmpi(temporary,"rad")==0){ 1583 for(i3=0;i3< ProjectInfo.NumberOfWindows;i3++){1584 if(lstrcmpi(ProjectInfo. pWindowInfo[i3].name,temp2)==0){1590 for(i3=0;i3<static_cast<int>(ProjectInfo.windowInfos.size());i3++){ 1591 if(lstrcmpi(ProjectInfo.windowInfos[i3].name,temp2)==0){ 1585 1592 NewRadWindow(i3); 1586 1593 break; … … 1703 1710 } 1704 1711 else if(lstrcmpi(temporary,"rad")==0){ 1705 for(i3=0;i3< ProjectInfo.NumberOfWindows;i3++){1706 if(lstrcmpi(ProjectInfo. pWindowInfo[i3].name,temp2)==0){1712 for(i3=0;i3<static_cast<int>(ProjectInfo.windowInfos.size());i3++){ 1713 if(lstrcmpi(ProjectInfo.windowInfos[i3].name,temp2)==0){ 1707 1714 NewRadWindow(i3); 1708 1715 break; … … 1897 1904 } 1898 1905 else if(MdiInfo[WndNum].DocType==WNDTYPE_RAD){ 1899 for(i=0;i<ProjectInfo.NumberOfWindows;i++){ 1900 if(lstrcmp(MdiInfo[WndNum].path,ProjectInfo.pWindowInfo[i].name)==0){ 1906 BOOST_FOREACH( const WINDOW_INFO &windowInfo, ProjectInfo.windowInfos ) 1907 { 1908 if(lstrcmp(MdiInfo[WndNum].path, windowInfo.name)==0){ 1901 1909 SendMessage(hCloseChild,WM_CLOSE,0,0); 1902 1910 break; … … 1931 1939 1932 1940 //ウィンドウ情報のメモリを解放 1933 for(i=0;i<ProjectInfo.NumberOfWindows;i++){ 1934 HeapDefaultFree(ProjectInfo.pWindowInfo[i].name); 1935 HeapDefaultFree(ProjectInfo.pWindowInfo[i].HandleName); 1936 HeapDefaultFree(ProjectInfo.pWindowInfo[i].caption); 1937 HeapDefaultFree(ProjectInfo.pWindowInfo[i].ClassName); 1938 HeapDefaultFree(ProjectInfo.pWindowInfo[i].CallBackName); 1939 HeapDefaultFree(ProjectInfo.pWindowInfo[i].filepath); 1940 if(ProjectInfo.pWindowInfo[i].MenuID) 1941 HeapDefaultFree(ProjectInfo.pWindowInfo[i].MenuID); 1942 if(ProjectInfo.pWindowInfo[i].IconResName) 1943 HeapDefaultFree(ProjectInfo.pWindowInfo[i].IconResName); 1941 BOOST_FOREACH( WINDOW_INFO &windowInfo, ProjectInfo.windowInfos ) 1942 { 1943 HeapDefaultFree(windowInfo.name); 1944 HeapDefaultFree(windowInfo.HandleName); 1945 HeapDefaultFree(windowInfo.caption); 1946 HeapDefaultFree(windowInfo.ClassName); 1947 HeapDefaultFree(windowInfo.CallBackName); 1948 HeapDefaultFree(windowInfo.filepath); 1949 if(windowInfo.MenuID) 1950 HeapDefaultFree(windowInfo.MenuID); 1951 if(windowInfo.IconResName) 1952 HeapDefaultFree(windowInfo.IconResName); 1944 1953 1945 1954 //子ウィンドウのメモリを解放 1946 for(i2=0;i2< ProjectInfo.pWindowInfo[i].NumberOfChildWindows;i2++){1947 HeapDefaultFree( ProjectInfo.pWindowInfo[i].pChildInfo[i2].IdName);1948 HeapDefaultFree( ProjectInfo.pWindowInfo[i].pChildInfo[i2].caption);1949 if( ProjectInfo.pWindowInfo[i].pChildInfo[i2].Control==CT_IMAGEBOX){1955 for(i2=0;i2<windowInfo.NumberOfChildWindows;i2++){ 1956 HeapDefaultFree(windowInfo.pChildInfo[i2].IdName); 1957 HeapDefaultFree(windowInfo.pChildInfo[i2].caption); 1958 if(windowInfo.pChildInfo[i2].Control==CT_IMAGEBOX){ 1950 1959 //イメージ ボックスの場合 1951 HeapDefaultFree( ProjectInfo.pWindowInfo[i].pChildInfo[i2].ImageCtrlInfo.path);1952 } 1953 } 1954 HeapDefaultFree( ProjectInfo.pWindowInfo[i].pChildInfo);1955 } 1956 HeapDefaultFree(ProjectInfo.pWindowInfo);1960 HeapDefaultFree(windowInfo.pChildInfo[i2].ImageCtrlInfo.path); 1961 } 1962 } 1963 HeapDefaultFree(windowInfo.pChildInfo); 1964 } 1965 ProjectInfo.windowInfos.clear(); 1957 1966 1958 1967 //メニュー情報のメモリを解放 … … 2041 2050 } 2042 2051 else if(MdiInfo[WndNum].DocType==WNDTYPE_RAD){ 2043 for(i=0;i<ProjectInfo.NumberOfWindows;i++){ 2044 if(lstrcmpi(MdiInfo[WndNum].path,ProjectInfo.pWindowInfo[i].name)==0){ 2052 BOOST_FOREACH( WINDOW_INFO &windowInfo, ProjectInfo.windowInfos ) 2053 { 2054 if(lstrcmpi(MdiInfo[WndNum].path,windowInfo.name)==0){ 2045 2055 sprintf(buffer+i2,"rad,%s\r\n",MdiInfo[WndNum].path); 2046 2056 i2+=lstrlen(buffer+i2); … … 2178 2188 i2+=lstrlen(buffer+i2); 2179 2189 } 2180 sprintf(buffer+i2,"#USEWINDOW=%d\r\n\r\n",ProjectInfo. NumberOfWindows);2190 sprintf(buffer+i2,"#USEWINDOW=%d\r\n\r\n",ProjectInfo.windowInfos.size()); 2181 2191 i2+=lstrlen(buffer+i2); 2182 2192 sprintf(buffer+i2,"#OPTION=&H%08x\r\n\r\n",ProjectInfo.dwOption); … … 2312 2322 } 2313 2323 } 2314 if(ProjectInfo.NumberOfWindows){ 2324 if( !ProjectInfo.windowInfos.empty() ) 2325 { 2315 2326 lstrcpy(buffer+i2,"\r\n"); 2316 2327 i2+=lstrlen(buffer+i2); … … 2333 2344 } 2334 2345 } 2335 if(ProjectInfo.NumberOfWindows){ 2346 if( !ProjectInfo.windowInfos.empty() ) 2347 { 2336 2348 lstrcpy(buffer+i2,"\r\n"); 2337 2349 i2+=lstrlen(buffer+i2); … … 2358 2370 2359 2371 2360 if(ProjectInfo.NumberOfWindows){ 2372 if( !ProjectInfo.windowInfos.empty() ) 2373 { 2361 2374 ///////////////////////////////////////////////////// 2362 2375 //ウィンドウ関連ファイル(*.wnd)を作成、保存 2363 2376 if(ProjectInfo.ModifyOfMaterial){ 2364 2377 sprintf(temporary,"%s%s.wnd",ProjectInfo.dir,ProjectInfo.name); 2365 SaveWindowFile( temporary,ProjectInfo.pWindowInfo,ProjectInfo.NumberOfWindows);2378 SaveWindowFile( temporary, ProjectInfo.windowInfos ); 2366 2379 } 2367 2380 … … 2438 2451 SourceTime.dwLowDateTime>ExeTime.dwLowDateTime) return 1; 2439 2452 } 2440 if(ProjectInfo.NumberOfWindows){ 2453 if( !ProjectInfo.windowInfos.empty() ) 2454 { 2441 2455 //CallBack.wbp 2442 2456 lstrcpy(temporary,"CallBack.wbp"); -
trunk/ab5.0/abdev/abdev/RadProc.cpp
r475 r609 13 13 RECT rect; 14 14 MDICREATESTRUCT mdic; 15 WINDOW_INFO *pWindowInfo; 16 17 pWindowInfo=&ProjectInfo.pWindowInfo[WndInfoNum]; 15 WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum]; 18 16 19 17 //すでに指定されたファイルが開かれている場合 … … 169 167 CHILDINFO *pChildInfo; 170 168 171 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo=(CHILDINFO *)HeapReAlloc(hHeap,0,ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo,(ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows+1)*sizeof(WINDOW_INFO)); 169 WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum]; 170 171 pWindowInfo->pChildInfo=(CHILDINFO *)HeapReAlloc(hHeap,0,pWindowInfo->pChildInfo,(pWindowInfo->NumberOfChildWindows+1)*sizeof(WINDOW_INFO)); 172 172 if(ItemNum==-1) 173 NewItemNum= ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows;173 NewItemNum=pWindowInfo->NumberOfChildWindows; 174 174 else{ 175 for(i= ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows;i>ItemNum;i--)176 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i]=ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i-1];175 for(i=pWindowInfo->NumberOfChildWindows;i>ItemNum;i--) 176 pWindowInfo->pChildInfo[i]=pWindowInfo->pChildInfo[i-1]; 177 177 NewItemNum=ItemNum; 178 178 } 179 pChildInfo=& ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[NewItemNum];179 pChildInfo=&pWindowInfo->pChildInfo[NewItemNum]; 180 180 181 181 //ID … … 199 199 else sprintf(temporary,"%s%d",IdName,i2); 200 200 SearchStart: 201 for(i=0;i< ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows;i++){201 for(i=0;i<pWindowInfo->NumberOfChildWindows;i++){ 202 202 if(i!=NewItemNum){ 203 if(lstrcmp( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].IdName,temporary)==0){203 if(lstrcmp(pWindowInfo->pChildInfo[i].IdName,temporary)==0){ 204 204 i2++; 205 205 sprintf(temporary,"%s%d",IdName,i2); … … 256 256 Rad_NoticeChanging(WndNum,RAD_UNDO_INSERTITEM,NewItemNum,(DWORD)pChildInfo); 257 257 258 ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows++;259 260 DrawRadWindow(WndNum, &ProjectInfo.pWindowInfo[WndInfoNum]);258 pWindowInfo->NumberOfChildWindows++; 259 260 DrawRadWindow(WndNum,pWindowInfo); 261 261 return NewItemNum; 262 262 } … … 267 267 int i; 268 268 269 WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum]; 270 269 271 //変更情報 270 272 if(bNoticeChanging) 271 Rad_NoticeChanging(WndNum,RAD_UNDO_DELETEITEM,ItemNum,(DWORD)& ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[ItemNum]);273 Rad_NoticeChanging(WndNum,RAD_UNDO_DELETEITEM,ItemNum,(DWORD)&pWindowInfo->pChildInfo[ItemNum]); 272 274 273 275 //子ウィンドウのメモリを解放 274 HeapDefaultFree( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[ItemNum].IdName);275 HeapDefaultFree( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[ItemNum].caption);276 if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[ItemNum].Control==CT_IMAGEBOX){276 HeapDefaultFree(pWindowInfo->pChildInfo[ItemNum].IdName); 277 HeapDefaultFree(pWindowInfo->pChildInfo[ItemNum].caption); 278 if(pWindowInfo->pChildInfo[ItemNum].Control==CT_IMAGEBOX){ 277 279 //イメージ ボックスの場合 278 HeapDefaultFree( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[ItemNum].ImageCtrlInfo.path);279 } 280 281 ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows--;282 for(i=ItemNum;i< ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows;i++)283 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i]=ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i+1];284 if(ProjectInfo. NumberOfWindows==0) ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo=(CHILDINFO *)HeapReAlloc(hHeap,0,ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo,1);285 else ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo=(CHILDINFO *)HeapReAlloc(hHeap,0,ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo,ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows*sizeof(CHILDINFO));286 287 DrawRadWindow(WndNum, &ProjectInfo.pWindowInfo[WndInfoNum]);280 HeapDefaultFree(pWindowInfo->pChildInfo[ItemNum].ImageCtrlInfo.path); 281 } 282 283 pWindowInfo->NumberOfChildWindows--; 284 for(i=ItemNum;i<pWindowInfo->NumberOfChildWindows;i++) 285 pWindowInfo->pChildInfo[i]=pWindowInfo->pChildInfo[i+1]; 286 if(ProjectInfo.windowInfos.size()==0) pWindowInfo->pChildInfo=(CHILDINFO *)HeapReAlloc(hHeap,0,pWindowInfo->pChildInfo,1); 287 else pWindowInfo->pChildInfo=(CHILDINFO *)HeapReAlloc(hHeap,0,pWindowInfo->pChildInfo,pWindowInfo->NumberOfChildWindows*sizeof(CHILDINFO)); 288 289 DrawRadWindow(WndNum,pWindowInfo); 288 290 289 291 … … 341 343 RECT rect; 342 344 345 WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum]; 346 343 347 hdc=GetDC(hwnd); 344 348 345 349 sw=0; 346 350 if(pobj_nv->bLineAdjust&&bLA){ 347 for(i=0;i< ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows;i++){351 for(i=0;i<pWindowInfo->NumberOfChildWindows;i++){ 348 352 if(i==MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]) continue; 349 if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].Control !=350 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control) continue;353 if(pWindowInfo->pChildInfo[i].Control != 354 pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control) continue; 351 355 352 356 if(NewRect->left<OldRect->left){ 353 if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x357 if(pWindowInfo->pChildInfo[i].pos.x 354 358 > 355 359 NewRect->left - MdiInfo[WndNum].MdiRadInfo->ClientPos.x 356 360 && 357 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x-10361 pWindowInfo->pChildInfo[i].pos.x-10 358 362 < 359 363 NewRect->left - MdiInfo[WndNum].MdiRadInfo->ClientPos.x){ … … 361 365 //左側をストップする 362 366 x=NewRect->right-NewRect->left; 363 NewRect->left= ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x + MdiInfo[WndNum].MdiRadInfo->ClientPos.x;367 NewRect->left=pWindowInfo->pChildInfo[i].pos.x + MdiInfo[WndNum].MdiRadInfo->ClientPos.x; 364 368 NewRect->right=NewRect->left+x; 365 369 … … 376 380 } 377 381 if(NewRect->top<OldRect->top){ 378 if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y382 if(pWindowInfo->pChildInfo[i].pos.y 379 383 > 380 384 NewRect->top - MdiInfo[WndNum].MdiRadInfo->ClientPos.y 381 385 && 382 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y-10386 pWindowInfo->pChildInfo[i].pos.y-10 383 387 < 384 388 NewRect->top - MdiInfo[WndNum].MdiRadInfo->ClientPos.y){ … … 386 390 //左側をストップする 387 391 y=NewRect->bottom-NewRect->top; 388 NewRect->top= ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y + MdiInfo[WndNum].MdiRadInfo->ClientPos.y;392 NewRect->top=pWindowInfo->pChildInfo[i].pos.y + MdiInfo[WndNum].MdiRadInfo->ClientPos.y; 389 393 NewRect->bottom=NewRect->top+y; 390 394 … … 441 445 extern MDIINFO MdiInfo[MAX_WNDNUM]; 442 446 extern PROJECTINFO ProjectInfo; 447 448 WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum]; 449 443 450 if(MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]==SELECT_WINDOW){ 444 451 //ウィンドウ軸を選択 445 452 rect->left=0; 446 453 rect->top=0; 447 rect->right= ProjectInfo.pWindowInfo[WndInfoNum].size.cx+(LEVER_THICK*2);448 rect->bottom= ProjectInfo.pWindowInfo[WndInfoNum].size.cy+(LEVER_THICK*2);454 rect->right=pWindowInfo->size.cx+(LEVER_THICK*2); 455 rect->bottom=pWindowInfo->size.cy+(LEVER_THICK*2); 449 456 } 450 457 else{ 451 458 //子ウィンドウを選択 452 rect->left=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+ ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].pos.x-LEVER_THICK;453 rect->top=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+ ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].pos.y-LEVER_THICK;454 rect->right=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+ ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].pos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].size.cx+LEVER_THICK;455 rect->bottom=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+ ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].pos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].size.cy+LEVER_THICK;459 rect->left=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].pos.x-LEVER_THICK; 460 rect->top=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].pos.y-LEVER_THICK; 461 rect->right=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].pos.x+pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].size.cx+LEVER_THICK; 462 rect->bottom=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].pos.y+pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[num]].size.cy+LEVER_THICK; 456 463 } 457 464 } … … 538 545 SCROLLINFO ScrollInfo; 539 546 547 WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum]; 548 540 549 DestroyWindow(MdiInfo[WndNum].MdiRadInfo->hProp_Dlg); 541 550 if(MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){ … … 551 560 } 552 561 else{ 553 if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_BUTTON)562 if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_BUTTON) 554 563 MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_BUTTON),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ButtonProc); 555 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_CHECKBOX)564 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_CHECKBOX) 556 565 MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_CHECKBOX),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_CheckBoxProc); 557 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_COMBOBOX)566 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_COMBOBOX) 558 567 MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_COMBOBOX),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ComboBoxProc); 559 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_EDIT)568 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_EDIT) 560 569 MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_EDIT),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_EditProc); 561 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_GROUPBOX)570 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_GROUPBOX) 562 571 MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_GROUPBOX),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_GroupBoxProc); 563 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_HSCROLLBAR)572 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_HSCROLLBAR) 564 573 MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_SCROLLBAR),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ScrollBarProc); 565 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_IMAGEBOX)574 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_IMAGEBOX) 566 575 MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_IMAGEBOX),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ImageBoxProc); 567 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_LISTBOX)576 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_LISTBOX) 568 577 MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_LISTBOX),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ListBoxProc); 569 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_LISTVIEW)578 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_LISTVIEW) 570 579 MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_LISTVIEW),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ListViewProc); 571 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_PROGRESSBAR)580 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_PROGRESSBAR) 572 581 MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_PROGRESSBAR),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ProgressBarProc); 573 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_RADIOBUTTON)582 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_RADIOBUTTON) 574 583 MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_RADIOBUTTON),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_RadioButtonProc); 575 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_STATIC)584 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_STATIC) 576 585 MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_STATIC),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_StaticProc); 577 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_TRACKBAR)586 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_TRACKBAR) 578 587 MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_TRACKBAR),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_TrackBarProc); 579 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_TREEVIEW)588 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_TREEVIEW) 580 589 MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_TREEVIEW),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_TreeViewProc); 581 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_UPDOWN)590 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_UPDOWN) 582 591 MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_UPDOWN),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_UpDownProc); 583 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_VSCROLLBAR)592 else if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_VSCROLLBAR) 584 593 MdiInfo[WndNum].MdiRadInfo->hProp_Dlg=CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_SCROLLBAR),MdiInfo[WndNum].MdiRadInfo->hProperty,(DLGPROC)RadProperty_ScrollBarProc); 585 594 … … 598 607 int i; 599 608 600 for(i=ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows-1;i>=0;i--){ 601 if(ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].Control==CT_COMBOBOX&& 602 (ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].style&0x000F)!=CBS_SIMPLE){ 609 WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum]; 610 611 for(i=pWindowInfo->NumberOfChildWindows-1;i>=0;i--){ 612 if(pWindowInfo->pChildInfo[i].Control==CT_COMBOBOX&& 613 (pWindowInfo->pChildInfo[i].style&0x000F)!=CBS_SIMPLE){ 603 614 //コンボ ボックスの場合は表示部分をターゲットに選択する(高さ20pixel) 604 if(x>=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+ ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x&&605 x<=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+ ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].size.cx&&606 y>=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+ ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y&&607 y<=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+ ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y+20){615 if(x>=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[i].pos.x&& 616 x<=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[i].pos.x+pWindowInfo->pChildInfo[i].size.cx&& 617 y>=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[i].pos.y&& 618 y<=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[i].pos.y+20){ 608 619 break; 609 620 } 610 621 } 611 else if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].Control==CT_GROUPBOX){622 else if(pWindowInfo->pChildInfo[i].Control==CT_GROUPBOX){ 612 623 //グループ ボックスの場合は中央をあける 613 624 if(( 614 x>=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+ ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x&&615 x<=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+ ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].size.cx&&616 y>=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+ ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y&&617 y<=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+ ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].size.cy625 x>=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[i].pos.x&& 626 x<=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[i].pos.x+pWindowInfo->pChildInfo[i].size.cx&& 627 y>=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[i].pos.y&& 628 y<=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[i].pos.y+pWindowInfo->pChildInfo[i].size.cy 618 629 )&& 619 630 (!( 620 x>=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+ ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x+LEVER_THICK*2&&621 x<=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+ ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].size.cx-LEVER_THICK*2&&622 y>=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+ ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y+LEVER_THICK*3&&623 y<=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+ ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].size.cy-LEVER_THICK*2631 x>=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[i].pos.x+LEVER_THICK*2&& 632 x<=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[i].pos.x+pWindowInfo->pChildInfo[i].size.cx-LEVER_THICK*2&& 633 y>=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[i].pos.y+LEVER_THICK*3&& 634 y<=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[i].pos.y+pWindowInfo->pChildInfo[i].size.cy-LEVER_THICK*2 624 635 )) 625 636 ){ … … 627 638 } 628 639 } 629 else if(x>=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+ ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x&&630 x<=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+ ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].size.cx&&631 y>=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+ ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y&&632 y<=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+ ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].size.cy){640 else if(x>=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[i].pos.x&& 641 x<=MdiInfo[WndNum].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[i].pos.x+pWindowInfo->pChildInfo[i].size.cx&& 642 y>=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[i].pos.y&& 643 y<=MdiInfo[WndNum].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[i].pos.y+pWindowInfo->pChildInfo[i].size.cy){ 633 644 break; 634 645 } … … 667 678 RECT rect; 668 679 680 WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum]; 681 669 682 for(i=1;i<MAX_RAD_SELITEM;i++) MdiInfo[WndNum].MdiRadInfo->SelectingItem[i]=-1; 670 683 RectNaturalFormat(pRect,&rect); 671 684 if(MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW) sw=0; 672 685 else sw=1; 673 for(i= ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows-1,i2=0;i>=0;i--){674 if(rect.left <= ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x+MdiInfo[WndNum].MdiRadInfo->ClientPos.x&&675 rect.top <= ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y+MdiInfo[WndNum].MdiRadInfo->ClientPos.y&&676 rect.right >= ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.x+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].size.cx+MdiInfo[WndNum].MdiRadInfo->ClientPos.x&&677 rect.bottom >= ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].pos.y+ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].size.cy+MdiInfo[WndNum].MdiRadInfo->ClientPos.y){686 for(i=pWindowInfo->NumberOfChildWindows-1,i2=0;i>=0;i--){ 687 if(rect.left <= pWindowInfo->pChildInfo[i].pos.x+MdiInfo[WndNum].MdiRadInfo->ClientPos.x&& 688 rect.top <= pWindowInfo->pChildInfo[i].pos.y+MdiInfo[WndNum].MdiRadInfo->ClientPos.y&& 689 rect.right >= pWindowInfo->pChildInfo[i].pos.x+pWindowInfo->pChildInfo[i].size.cx+MdiInfo[WndNum].MdiRadInfo->ClientPos.x&& 690 rect.bottom >= pWindowInfo->pChildInfo[i].pos.y+pWindowInfo->pChildInfo[i].size.cy+MdiInfo[WndNum].MdiRadInfo->ClientPos.y){ 678 691 MdiInfo[WndNum].MdiRadInfo->SelectingItem[i2]=i; 679 692 i2++; … … 691 704 RECT rect; 692 705 706 WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum]; 707 693 708 if(MdiInfo[WndNum].MdiRadInfo->SelectingItem[1]!=-1){ 694 709 i=0; … … 698 713 if(x>=rect.left+LEVER_THICK&&x<=rect.right-LEVER_THICK&& 699 714 y>=rect.top+LEVER_THICK&&y<=rect.bottom-LEVER_THICK){ 700 if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[i]].Control==CT_GROUPBOX){715 if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[i]].Control==CT_GROUPBOX){ 701 716 //グループボックスの場合は中央をあける 702 717 if(!(x>=rect.left+LEVER_THICK*2&&x<=rect.right-LEVER_THICK*2&& … … 716 731 if(x>=rect.left+LEVER_THICK&&x<=rect.right-LEVER_THICK&& 717 732 y>=rect.top+LEVER_THICK&&y<=rect.bottom-LEVER_THICK){ 718 if( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_GROUPBOX){733 if(pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].Control==CT_GROUPBOX){ 719 734 //グループ ボックスの場合は中央をあける 720 735 if(!(x>=rect.left+LEVER_THICK*3&&x<=rect.right-LEVER_THICK*3&& … … 748 763 extern PROJECTINFO ProjectInfo; 749 764 extern MDIINFO MdiInfo[MAX_WNDNUM]; 750 int WndInfoNum;751 765 SCROLLINFO ScrollInfo; 752 766 SIZE NeedSize; 753 767 754 W ndInfoNum=GetWndInfoNum(MdiInfo[WndNum].path);768 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[WndNum].path); 755 769 756 770 //必要な幅、高さを共に100ピクセル余裕を持たせる 757 NeedSize.cx= ProjectInfo.pWindowInfo[WndInfoNum].size.cx+(LEVER_THICK*2)+100;758 NeedSize.cy= ProjectInfo.pWindowInfo[WndInfoNum].size.cy+(LEVER_THICK*2)+100;771 NeedSize.cx=pWindowInfo->size.cx+(LEVER_THICK*2)+100; 772 NeedSize.cy=pWindowInfo->size.cy+(LEVER_THICK*2)+100; 759 773 760 774 ScrollInfo.cbSize=sizeof(SCROLLINFO); … … 798 812 switch(message){ 799 813 case WM_LBUTTONDOWN: 800 SetCapture(hwnd); 801 802 SetFocus(hwnd); 803 mouse.x=LOWORD(lParam); 804 mouse.y=HIWORD(lParam); 805 CursorPos_LocalToGlobal(hwnd,&mouse.x,&mouse.y); 806 807 i=GetWndNum(GetParent(hwnd)); 808 i2=GetWndInfoNum(MdiInfo[i].path); 809 810 if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){ 811 if(((wParam&MK_CONTROL)||(wParam&MK_SHIFT))&& 812 MdiInfo[i].MdiRadInfo->SelectingItem[0]!=SELECT_WINDOW){ 813 814 //Shiftキー、Ctrlキーによる複数選択 815 for(i3=0;;i3++){ 816 if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1){ 817 MdiInfo[i].MdiRadInfo->SelectingItem[i3]=GetItemNumOnMouse(i,i2,mouse.x,mouse.y); 814 { 815 SetCapture(hwnd); 816 817 SetFocus(hwnd); 818 mouse.x=LOWORD(lParam); 819 mouse.y=HIWORD(lParam); 820 CursorPos_LocalToGlobal(hwnd,&mouse.x,&mouse.y); 821 822 i=GetWndNum(GetParent(hwnd)); 823 i2 = GetWndInfoNum(MdiInfo[i].path); 824 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 825 826 if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){ 827 if(((wParam&MK_CONTROL)||(wParam&MK_SHIFT))&& 828 MdiInfo[i].MdiRadInfo->SelectingItem[0]!=SELECT_WINDOW){ 829 830 //Shiftキー、Ctrlキーによる複数選択 831 for(i3=0;;i3++){ 832 if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1){ 833 MdiInfo[i].MdiRadInfo->SelectingItem[i3]=GetItemNumOnMouse(i,i2,mouse.x,mouse.y); 834 InvalidateRect(hwnd,NULL,0); 835 836 //サポートダイアログの内容をセット 837 SetSupportDlgData(i,i2); 838 break; 839 } 840 } 841 } 842 else{ 843 RadInfo.NowDragging=GetStateOfDraggingFrame(i,i2,mouse.x,mouse.y); 844 if(!RadInfo.NowDragging){ 845 SelectItemNumOnMouse(i,i2,mouse.x,mouse.y); 818 846 InvalidateRect(hwnd,NULL,0); 819 820 //サポートダイアログの内容をセット 821 SetSupportDlgData(i,i2); 822 break; 823 } 824 } 847 RadInfo.NowDragging=GetStateOfDraggingFrame(i,i2,mouse.x,mouse.y); 848 } 849 if(RadInfo.NowDragging){ 850 //アイテム選択中。サイズ、位置変更開始 851 852 if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){ 853 RadInfo.DraggingRect[0].left=LEVER_THICK; 854 RadInfo.DraggingRect[0].top=LEVER_THICK; 855 RadInfo.DraggingRect[0].right=pWindowInfo->size.cx+LEVER_THICK; 856 RadInfo.DraggingRect[0].bottom=pWindowInfo->size.cy+LEVER_THICK; 857 RadInfo.DragStartRect[0]=RadInfo.DraggingRect[0]; 858 } 859 else{ 860 i3=0; 861 while(MdiInfo[i].MdiRadInfo->SelectingItem[i3]!=-1){ 862 RadInfo.DraggingRect[i3].left=MdiInfo[i].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x; 863 RadInfo.DraggingRect[i3].top=MdiInfo[i].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y; 864 RadInfo.DraggingRect[i3].right=MdiInfo[i].MdiRadInfo->ClientPos.x+pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x+pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cx; 865 RadInfo.DraggingRect[i3].bottom=MdiInfo[i].MdiRadInfo->ClientPos.y+pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y+pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cy; 866 RadInfo.DragStartRect[i3]=RadInfo.DraggingRect[i3]; 867 i3++; 868 } 869 } 870 } 871 else{ 872 //範囲選択 873 874 RadInfo.NowDragging=SELECTING_FRAME; 875 RadInfo.OldDraggingRect[0].left=LEVER_THICK; 876 RadInfo.OldDraggingRect[0].top=LEVER_THICK; 877 RadInfo.OldDraggingRect[0].right=pWindowInfo->size.cx+LEVER_THICK; 878 RadInfo.OldDraggingRect[0].bottom=pWindowInfo->size.cy+LEVER_THICK; 879 } 880 RadInfo.DragStartPos.x=mouse.x; 881 RadInfo.DragStartPos.y=mouse.y; 882 } 883 SetCursorByState(RadInfo.NowDragging); 825 884 } 826 885 else{ 827 RadInfo.NowDragging=GetStateOfDraggingFrame(i,i2,mouse.x,mouse.y); 828 if(!RadInfo.NowDragging){ 829 SelectItemNumOnMouse(i,i2,mouse.x,mouse.y); 830 InvalidateRect(hwnd,NULL,0); 831 RadInfo.NowDragging=GetStateOfDraggingFrame(i,i2,mouse.x,mouse.y); 832 } 886 RadInfo.DraggingRect[0].left=mouse.x; 887 RadInfo.DraggingRect[0].top=mouse.y; 888 RadInfo.NowDragging=ITEM_MAKING; 889 } 890 return 0; 891 } 892 case WM_LBUTTONUP: 893 { 894 ReleaseCapture(); 895 896 SetFocus(hwnd); 897 mouse.x=(int)(short)LOWORD(lParam); 898 mouse.y=(int)(short)HIWORD(lParam); 899 CursorPos_LocalToGlobal(hwnd,&mouse.x,&mouse.y); 900 901 hParent=GetParent(hwnd); 902 i=GetWndNum(hParent); 903 i2 = GetWndInfoNum(MdiInfo[i].path); 904 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 905 906 if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){ 833 907 if(RadInfo.NowDragging){ 834 //アイテム選択中。サイズ、位置変更開始 908 if(RadInfo.DragStartPos.x==mouse.x&&RadInfo.DragStartPos.y==mouse.y){ 909 RadInfo.NowDragging=0; 910 InvalidateRect(hwnd,NULL,0); 911 ResetState_EditMenu(); 912 return 0; 913 } 835 914 836 915 if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){ 837 RadInfo.DraggingRect[0].left=LEVER_THICK; 838 RadInfo.DraggingRect[0].top=LEVER_THICK; 839 RadInfo.DraggingRect[0].right=ProjectInfo.pWindowInfo[i2].size.cx+LEVER_THICK; 840 RadInfo.DraggingRect[0].bottom=ProjectInfo.pWindowInfo[i2].size.cy+LEVER_THICK; 841 RadInfo.DragStartRect[0]=RadInfo.DraggingRect[0]; 916 if(RadInfo.NowDragging==SELECTING_FRAME){ 917 SetItemNumOnFrame(i,i2,&RadInfo.DraggingRect[0]); 918 InvalidateRect(hwnd,NULL,1); 919 } 920 else{ 921 //ウィンドウ枠の調整完了 922 PointAndSize.size=pWindowInfo->size; 923 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize); 924 pWindowInfo->size.cx=RadInfo.DraggingRect[0].right-LEVER_THICK; 925 pWindowInfo->size.cy=RadInfo.DraggingRect[0].bottom-LEVER_THICK; 926 DrawRadWindow(i,pWindowInfo); 927 InvalidateRect(hwnd,NULL,1); 928 929 GetClientRect(hwnd,&rect); 930 ResetScrollbarOfRadEditor(i,rect.right,rect.bottom); 931 } 842 932 } 843 933 else{ 844 934 i3=0; 845 935 while(MdiInfo[i].MdiRadInfo->SelectingItem[i3]!=-1){ 846 RadInfo.DraggingRect[i3].left=MdiInfo[i].MdiRadInfo->ClientPos.x+ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x; 847 RadInfo.DraggingRect[i3].top=MdiInfo[i].MdiRadInfo->ClientPos.y+ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y; 848 RadInfo.DraggingRect[i3].right=MdiInfo[i].MdiRadInfo->ClientPos.x+ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x+ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cx; 849 RadInfo.DraggingRect[i3].bottom=MdiInfo[i].MdiRadInfo->ClientPos.y+ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y+ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cy; 850 RadInfo.DragStartRect[i3]=RadInfo.DraggingRect[i3]; 936 //アイテム枠の調整完了 937 PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos; 938 PointAndSize.size=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size; 939 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize); 940 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x=RadInfo.DraggingRect[i3].left-MdiInfo[i].MdiRadInfo->ClientPos.x; 941 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y=RadInfo.DraggingRect[i3].top-MdiInfo[i].MdiRadInfo->ClientPos.y; 942 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cx=RadInfo.DraggingRect[i3].right-RadInfo.DraggingRect[i3].left; 943 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cy=RadInfo.DraggingRect[i3].bottom-RadInfo.DraggingRect[i3].top; 944 DrawRadWindow(i,pWindowInfo); 851 945 i3++; 852 946 } 853 947 } 854 } 855 else{ 856 //範囲選択 857 858 RadInfo.NowDragging=SELECTING_FRAME; 859 RadInfo.OldDraggingRect[0].left=LEVER_THICK; 860 RadInfo.OldDraggingRect[0].top=LEVER_THICK; 861 RadInfo.OldDraggingRect[0].right=ProjectInfo.pWindowInfo[i2].size.cx+LEVER_THICK; 862 RadInfo.OldDraggingRect[0].bottom=ProjectInfo.pWindowInfo[i2].size.cy+LEVER_THICK; 863 } 864 RadInfo.DragStartPos.x=mouse.x; 865 RadInfo.DragStartPos.y=mouse.y; 948 949 SetStatusText(NULL); 950 951 //サポートダイアログの内容をセット 952 SetSupportDlgData(i,i2); 953 } 866 954 } 867 SetCursorByState(RadInfo.NowDragging); 955 else if(RadInfo.NowDragging==ITEM_MAKING){ 956 if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_BUTTON){ 957 //ボタン コントロール作成 958 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){ 959 RadInfo.DraggingRect[0].left-=44; 960 RadInfo.DraggingRect[0].right=mouse.x+44; 961 RadInfo.DraggingRect[0].top-=10; 962 RadInfo.DraggingRect[0].bottom=mouse.y+11; 963 } 964 else{ 965 RadInfo.DraggingRect[0].right=mouse.x; 966 RadInfo.DraggingRect[0].bottom=mouse.y; 967 } 968 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect); 969 pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x; 970 pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y; 971 size.cx=rect.right-rect.left; 972 size.cy=rect.bottom-rect.top; 973 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"CommandButton","Button",WS_CHILD|WS_VISIBLE,0,CT_BUTTON,0,0,1); 974 } 975 if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_CHECKBOX){ 976 //チェック ボックス作成 977 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){ 978 RadInfo.DraggingRect[0].left-=33; 979 RadInfo.DraggingRect[0].right=mouse.x+34; 980 RadInfo.DraggingRect[0].top-=7; 981 RadInfo.DraggingRect[0].bottom=mouse.y+8; 982 } 983 else{ 984 RadInfo.DraggingRect[0].right=mouse.x; 985 RadInfo.DraggingRect[0].bottom=mouse.y; 986 } 987 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect); 988 pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x; 989 pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y; 990 size.cx=rect.right-rect.left; 991 size.cy=rect.bottom-rect.top; 992 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"CheckBox","Check",WS_CHILD|WS_VISIBLE|BS_AUTOCHECKBOX,0,CT_CHECKBOX,0,0,1); 993 } 994 if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_COMBOBOX){ 995 //コンボ ボックス作成 996 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){ 997 RadInfo.DraggingRect[0].left-=42; 998 RadInfo.DraggingRect[0].right=mouse.x+42; 999 RadInfo.DraggingRect[0].top-=42; 1000 RadInfo.DraggingRect[0].bottom=mouse.y+42; 1001 } 1002 else{ 1003 RadInfo.DraggingRect[0].right=mouse.x; 1004 RadInfo.DraggingRect[0].bottom=mouse.y; 1005 } 1006 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect); 1007 pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x; 1008 pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y; 1009 size.cx=rect.right-rect.left; 1010 size.cy=rect.bottom-rect.top; 1011 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"ComboBox","",WS_CHILD|WS_VISIBLE|CBS_DROPDOWN|CBS_SORT|WS_VSCROLL,0,CT_COMBOBOX,0,0,1); 1012 } 1013 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_EDIT){ 1014 //エディット コントロール作成 1015 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){ 1016 RadInfo.DraggingRect[0].left-=35; 1017 RadInfo.DraggingRect[0].right=mouse.x+35; 1018 RadInfo.DraggingRect[0].top-=10; 1019 RadInfo.DraggingRect[0].bottom=mouse.y+11; 1020 } 1021 else{ 1022 RadInfo.DraggingRect[0].right=mouse.x; 1023 RadInfo.DraggingRect[0].bottom=mouse.y; 1024 } 1025 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect); 1026 pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x; 1027 pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y; 1028 size.cx=rect.right-rect.left; 1029 size.cy=rect.bottom-rect.top; 1030 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"EditBox","",WS_CHILD|WS_VISIBLE,WS_EX_CLIENTEDGE,CT_EDIT,0,0,1); 1031 } 1032 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_GROUPBOX){ 1033 //グループ ボックス作成 1034 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){ 1035 RadInfo.DraggingRect[0].left-=42; 1036 RadInfo.DraggingRect[0].right=mouse.x+42; 1037 RadInfo.DraggingRect[0].top-=30; 1038 RadInfo.DraggingRect[0].bottom=mouse.y+30; 1039 } 1040 else{ 1041 RadInfo.DraggingRect[0].right=mouse.x; 1042 RadInfo.DraggingRect[0].bottom=mouse.y; 1043 } 1044 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect); 1045 pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x; 1046 pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y; 1047 size.cx=rect.right-rect.left; 1048 size.cy=rect.bottom-rect.top; 1049 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"GroupBox","Group",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,0,CT_GROUPBOX,0,0,1); 1050 } 1051 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_HSCROLLBAR){ 1052 //水平スクロールバー作成 1053 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){ 1054 RadInfo.DraggingRect[0].left-=35; 1055 RadInfo.DraggingRect[0].right=mouse.x+35; 1056 RadInfo.DraggingRect[0].top-=8; 1057 RadInfo.DraggingRect[0].bottom=mouse.y+9; 1058 } 1059 else{ 1060 RadInfo.DraggingRect[0].right=mouse.x; 1061 RadInfo.DraggingRect[0].bottom=mouse.y; 1062 } 1063 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect); 1064 pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x; 1065 pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y; 1066 size.cx=rect.right-rect.left; 1067 size.cy=rect.bottom-rect.top; 1068 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"HScrollBar","",WS_CHILD|WS_VISIBLE|SBS_HORZ,0,CT_HSCROLLBAR,0,0,1); 1069 } 1070 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_IMAGEBOX){ 1071 //イメージ ボックス作成 1072 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){ 1073 RadInfo.DraggingRect[0].left-=16; 1074 RadInfo.DraggingRect[0].right=mouse.x+16; 1075 RadInfo.DraggingRect[0].top-=16; 1076 RadInfo.DraggingRect[0].bottom=mouse.y+16; 1077 } 1078 else{ 1079 RadInfo.DraggingRect[0].right=mouse.x; 1080 RadInfo.DraggingRect[0].bottom=mouse.y; 1081 } 1082 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect); 1083 pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x; 1084 pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y; 1085 size.cx=rect.right-rect.left; 1086 size.cy=rect.bottom-rect.top; 1087 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"ImageBox","",WS_CHILD|WS_VISIBLE|SS_BLACKFRAME,0,CT_IMAGEBOX,IMGTYPE_FILE,0,1); 1088 } 1089 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_LISTBOX){ 1090 //リスト ボックス作成 1091 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){ 1092 RadInfo.DraggingRect[0].left-=42; 1093 RadInfo.DraggingRect[0].right=mouse.x+42; 1094 RadInfo.DraggingRect[0].top-=30; 1095 RadInfo.DraggingRect[0].bottom=mouse.y+30; 1096 } 1097 else{ 1098 RadInfo.DraggingRect[0].right=mouse.x; 1099 RadInfo.DraggingRect[0].bottom=mouse.y; 1100 } 1101 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect); 1102 pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x; 1103 pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y; 1104 size.cx=rect.right-rect.left; 1105 size.cy=rect.bottom-rect.top; 1106 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"ListBox","",WS_CHILD|WS_VISIBLE|WS_VSCROLL|LBS_SORT|LBS_NOTIFY,WS_EX_CLIENTEDGE,CT_LISTBOX,0,0,1); 1107 } 1108 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_LISTVIEW){ 1109 //リスト ビュー作成 1110 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){ 1111 RadInfo.DraggingRect[0].left-=52; 1112 RadInfo.DraggingRect[0].right=mouse.x+53; 1113 RadInfo.DraggingRect[0].top-=37; 1114 RadInfo.DraggingRect[0].bottom=mouse.y+38; 1115 } 1116 else{ 1117 RadInfo.DraggingRect[0].right=mouse.x; 1118 RadInfo.DraggingRect[0].bottom=mouse.y; 1119 } 1120 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect); 1121 pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x; 1122 pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y; 1123 size.cx=rect.right-rect.left; 1124 size.cy=rect.bottom-rect.top; 1125 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"ListView","",WS_CHILD|WS_VISIBLE,WS_EX_CLIENTEDGE,CT_LISTVIEW,0,0,1); 1126 } 1127 if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_PROGRESSBAR){ 1128 //プロバレス バー作成 1129 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){ 1130 RadInfo.DraggingRect[0].left-=70; 1131 RadInfo.DraggingRect[0].right=mouse.x+70; 1132 RadInfo.DraggingRect[0].top-=10; 1133 RadInfo.DraggingRect[0].bottom=mouse.y+11; 1134 } 1135 else{ 1136 RadInfo.DraggingRect[0].right=mouse.x; 1137 RadInfo.DraggingRect[0].bottom=mouse.y; 1138 } 1139 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; 1142 size.cx=rect.right-rect.left; 1143 size.cy=rect.bottom-rect.top; 1144 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"ProgressBar","",WS_CHILD|WS_VISIBLE,WS_EX_STATICEDGE,CT_PROGRESSBAR,0,0,1); 1145 } 1146 if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_RADIOBUTTON){ 1147 //ラジオ ボタン作成 1148 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){ 1149 RadInfo.DraggingRect[0].left-=31; 1150 RadInfo.DraggingRect[0].right=mouse.x+32; 1151 RadInfo.DraggingRect[0].top-=7; 1152 RadInfo.DraggingRect[0].bottom=mouse.y+8; 1153 } 1154 else{ 1155 RadInfo.DraggingRect[0].right=mouse.x; 1156 RadInfo.DraggingRect[0].bottom=mouse.y; 1157 } 1158 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect); 1159 pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x; 1160 pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y; 1161 size.cx=rect.right-rect.left; 1162 size.cy=rect.bottom-rect.top; 1163 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"RadioButton","radio",WS_CHILD|WS_VISIBLE|BS_AUTORADIOBUTTON,0,CT_RADIOBUTTON,0,0,1); 1164 } 1165 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_STATIC){ 1166 //スタティック コントロール作成 1167 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){ 1168 RadInfo.DraggingRect[0].left-=25; 1169 RadInfo.DraggingRect[0].right=mouse.x+25; 1170 RadInfo.DraggingRect[0].top-=6; 1171 RadInfo.DraggingRect[0].bottom=mouse.y+6; 1172 } 1173 else{ 1174 RadInfo.DraggingRect[0].right=mouse.x; 1175 RadInfo.DraggingRect[0].bottom=mouse.y; 1176 } 1177 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect); 1178 pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x; 1179 pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y; 1180 size.cx=rect.right-rect.left; 1181 size.cy=rect.bottom-rect.top; 1182 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"Static","Text",WS_CHILD|WS_VISIBLE,0,CT_STATIC,0,0,1); 1183 } 1184 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_TRACKBAR){ 1185 //トラック バー作成 1186 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){ 1187 RadInfo.DraggingRect[0].left-=87; 1188 RadInfo.DraggingRect[0].right=mouse.x+88; 1189 RadInfo.DraggingRect[0].top-=11; 1190 RadInfo.DraggingRect[0].bottom=mouse.y+12; 1191 } 1192 else{ 1193 RadInfo.DraggingRect[0].right=mouse.x; 1194 RadInfo.DraggingRect[0].bottom=mouse.y; 1195 } 1196 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect); 1197 pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x; 1198 pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y; 1199 size.cx=rect.right-rect.left; 1200 size.cy=rect.bottom-rect.top; 1201 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"TrackBar","",WS_CHILD|WS_VISIBLE|TBS_BOTH|TBS_NOTICKS,0,CT_TRACKBAR,0,0,1); 1202 } 1203 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_TREEVIEW){ 1204 //ツリー ビュー作成 1205 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){ 1206 RadInfo.DraggingRect[0].left-=52; 1207 RadInfo.DraggingRect[0].right=mouse.x+53; 1208 RadInfo.DraggingRect[0].top-=37; 1209 RadInfo.DraggingRect[0].bottom=mouse.y+38; 1210 } 1211 else{ 1212 RadInfo.DraggingRect[0].right=mouse.x; 1213 RadInfo.DraggingRect[0].bottom=mouse.y; 1214 } 1215 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect); 1216 pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x; 1217 pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y; 1218 size.cx=rect.right-rect.left; 1219 size.cy=rect.bottom-rect.top; 1220 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"TreeView","",WS_CHILD|WS_VISIBLE,WS_EX_CLIENTEDGE,CT_TREEVIEW,0,0,1); 1221 } 1222 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_UPDOWN){ 1223 //アップ ダウン コントロール作成 1224 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){ 1225 RadInfo.DraggingRect[0].left-=8; 1226 RadInfo.DraggingRect[0].right=mouse.x+8; 1227 RadInfo.DraggingRect[0].top-=10; 1228 RadInfo.DraggingRect[0].bottom=mouse.y+11; 1229 } 1230 else{ 1231 RadInfo.DraggingRect[0].right=mouse.x; 1232 RadInfo.DraggingRect[0].bottom=mouse.y; 1233 } 1234 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect); 1235 pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x; 1236 pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y; 1237 size.cx=rect.right-rect.left; 1238 size.cy=rect.bottom-rect.top; 1239 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"UpDown","",WS_CHILD|WS_VISIBLE,0,CT_UPDOWN,0,0,1); 1240 } 1241 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_VSCROLLBAR){ 1242 //垂直スクロールバー作成 1243 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){ 1244 RadInfo.DraggingRect[0].left-=9; 1245 RadInfo.DraggingRect[0].right=mouse.x+9; 1246 RadInfo.DraggingRect[0].top-=30; 1247 RadInfo.DraggingRect[0].bottom=mouse.y+30; 1248 } 1249 else{ 1250 RadInfo.DraggingRect[0].right=mouse.x; 1251 RadInfo.DraggingRect[0].bottom=mouse.y; 1252 } 1253 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect); 1254 pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x; 1255 pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y; 1256 size.cx=rect.right-rect.left; 1257 size.cy=rect.bottom-rect.top; 1258 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"VScrollBar","",WS_CHILD|WS_VISIBLE|SBS_VERT,0,CT_VSCROLLBAR,0,0,1); 1259 } 1260 SendMessage(GetWindow(MdiInfo[i].MdiRadInfo->hTools,GW_CHILD),WM_COMMAND,IDC_TOOL_MOUSE,0); 1261 SendMessage(GetWindow(GetWindow(MdiInfo[i].MdiRadInfo->hTools,GW_CHILD),GW_CHILD),TB_CHECKBUTTON,IDC_TOOL_MOUSE,TRUE); 1262 ChangePropertyWindow(i,i2); 1263 1264 //複数選択を解除 1265 MdiInfo[i].MdiRadInfo->SelectingItem[1]=-1; 1266 } 1267 1268 RadInfo.NowDragging=0; 1269 1270 ResetState_EditMenu(); 1271 return 0; 868 1272 } 869 else{870 RadInfo.DraggingRect[0].left=mouse.x;871 RadInfo.DraggingRect[0].top=mouse.y;872 RadInfo.NowDragging=ITEM_MAKING;873 }874 return 0;875 case WM_LBUTTONUP:876 ReleaseCapture();877 878 SetFocus(hwnd);879 mouse.x=(int)(short)LOWORD(lParam);880 mouse.y=(int)(short)HIWORD(lParam);881 CursorPos_LocalToGlobal(hwnd,&mouse.x,&mouse.y);882 883 hParent=GetParent(hwnd);884 i=GetWndNum(hParent);885 i2=GetWndInfoNum(MdiInfo[i].path);886 887 if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){888 if(RadInfo.NowDragging){889 if(RadInfo.DragStartPos.x==mouse.x&&RadInfo.DragStartPos.y==mouse.y){890 RadInfo.NowDragging=0;891 InvalidateRect(hwnd,NULL,0);892 ResetState_EditMenu();893 return 0;894 }895 896 if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){897 if(RadInfo.NowDragging==SELECTING_FRAME){898 SetItemNumOnFrame(i,i2,&RadInfo.DraggingRect[0]);899 InvalidateRect(hwnd,NULL,1);900 }901 else{902 //ウィンドウ枠の調整完了903 PointAndSize.size=ProjectInfo.pWindowInfo[i2].size;904 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);905 ProjectInfo.pWindowInfo[i2].size.cx=RadInfo.DraggingRect[0].right-LEVER_THICK;906 ProjectInfo.pWindowInfo[i2].size.cy=RadInfo.DraggingRect[0].bottom-LEVER_THICK;907 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);908 InvalidateRect(hwnd,NULL,1);909 910 GetClientRect(hwnd,&rect);911 ResetScrollbarOfRadEditor(i,rect.right,rect.bottom);912 }913 }914 else{915 i3=0;916 while(MdiInfo[i].MdiRadInfo->SelectingItem[i3]!=-1){917 //アイテム枠の調整完了918 PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos;919 PointAndSize.size=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size;920 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize);921 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x=RadInfo.DraggingRect[i3].left-MdiInfo[i].MdiRadInfo->ClientPos.x;922 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y=RadInfo.DraggingRect[i3].top-MdiInfo[i].MdiRadInfo->ClientPos.y;923 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cx=RadInfo.DraggingRect[i3].right-RadInfo.DraggingRect[i3].left;924 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cy=RadInfo.DraggingRect[i3].bottom-RadInfo.DraggingRect[i3].top;925 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);926 i3++;927 }928 }929 930 SetStatusText(NULL);931 932 //サポートダイアログの内容をセット933 SetSupportDlgData(i,i2);934 }935 }936 else if(RadInfo.NowDragging==ITEM_MAKING){937 if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_BUTTON){938 //ボタン コントロール作成939 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){940 RadInfo.DraggingRect[0].left-=44;941 RadInfo.DraggingRect[0].right=mouse.x+44;942 RadInfo.DraggingRect[0].top-=10;943 RadInfo.DraggingRect[0].bottom=mouse.y+11;944 }945 else{946 RadInfo.DraggingRect[0].right=mouse.x;947 RadInfo.DraggingRect[0].bottom=mouse.y;948 }949 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);950 pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;951 pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;952 size.cx=rect.right-rect.left;953 size.cy=rect.bottom-rect.top;954 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"CommandButton","Button",WS_CHILD|WS_VISIBLE,0,CT_BUTTON,0,0,1);955 }956 if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_CHECKBOX){957 //チェック ボックス作成958 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){959 RadInfo.DraggingRect[0].left-=33;960 RadInfo.DraggingRect[0].right=mouse.x+34;961 RadInfo.DraggingRect[0].top-=7;962 RadInfo.DraggingRect[0].bottom=mouse.y+8;963 }964 else{965 RadInfo.DraggingRect[0].right=mouse.x;966 RadInfo.DraggingRect[0].bottom=mouse.y;967 }968 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);969 pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;970 pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;971 size.cx=rect.right-rect.left;972 size.cy=rect.bottom-rect.top;973 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"CheckBox","Check",WS_CHILD|WS_VISIBLE|BS_AUTOCHECKBOX,0,CT_CHECKBOX,0,0,1);974 }975 if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_COMBOBOX){976 //コンボ ボックス作成977 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){978 RadInfo.DraggingRect[0].left-=42;979 RadInfo.DraggingRect[0].right=mouse.x+42;980 RadInfo.DraggingRect[0].top-=42;981 RadInfo.DraggingRect[0].bottom=mouse.y+42;982 }983 else{984 RadInfo.DraggingRect[0].right=mouse.x;985 RadInfo.DraggingRect[0].bottom=mouse.y;986 }987 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);988 pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;989 pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;990 size.cx=rect.right-rect.left;991 size.cy=rect.bottom-rect.top;992 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"ComboBox","",WS_CHILD|WS_VISIBLE|CBS_DROPDOWN|CBS_SORT|WS_VSCROLL,0,CT_COMBOBOX,0,0,1);993 }994 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_EDIT){995 //エディット コントロール作成996 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){997 RadInfo.DraggingRect[0].left-=35;998 RadInfo.DraggingRect[0].right=mouse.x+35;999 RadInfo.DraggingRect[0].top-=10;1000 RadInfo.DraggingRect[0].bottom=mouse.y+11;1001 }1002 else{1003 RadInfo.DraggingRect[0].right=mouse.x;1004 RadInfo.DraggingRect[0].bottom=mouse.y;1005 }1006 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);1007 pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;1008 pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;1009 size.cx=rect.right-rect.left;1010 size.cy=rect.bottom-rect.top;1011 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"EditBox","",WS_CHILD|WS_VISIBLE,WS_EX_CLIENTEDGE,CT_EDIT,0,0,1);1012 }1013 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_GROUPBOX){1014 //グループ ボックス作成1015 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){1016 RadInfo.DraggingRect[0].left-=42;1017 RadInfo.DraggingRect[0].right=mouse.x+42;1018 RadInfo.DraggingRect[0].top-=30;1019 RadInfo.DraggingRect[0].bottom=mouse.y+30;1020 }1021 else{1022 RadInfo.DraggingRect[0].right=mouse.x;1023 RadInfo.DraggingRect[0].bottom=mouse.y;1024 }1025 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);1026 pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;1027 pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;1028 size.cx=rect.right-rect.left;1029 size.cy=rect.bottom-rect.top;1030 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"GroupBox","Group",WS_CHILD|WS_VISIBLE|BS_GROUPBOX,0,CT_GROUPBOX,0,0,1);1031 }1032 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_HSCROLLBAR){1033 //水平スクロールバー作成1034 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){1035 RadInfo.DraggingRect[0].left-=35;1036 RadInfo.DraggingRect[0].right=mouse.x+35;1037 RadInfo.DraggingRect[0].top-=8;1038 RadInfo.DraggingRect[0].bottom=mouse.y+9;1039 }1040 else{1041 RadInfo.DraggingRect[0].right=mouse.x;1042 RadInfo.DraggingRect[0].bottom=mouse.y;1043 }1044 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);1045 pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;1046 pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;1047 size.cx=rect.right-rect.left;1048 size.cy=rect.bottom-rect.top;1049 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"HScrollBar","",WS_CHILD|WS_VISIBLE|SBS_HORZ,0,CT_HSCROLLBAR,0,0,1);1050 }1051 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_IMAGEBOX){1052 //イメージ ボックス作成1053 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){1054 RadInfo.DraggingRect[0].left-=16;1055 RadInfo.DraggingRect[0].right=mouse.x+16;1056 RadInfo.DraggingRect[0].top-=16;1057 RadInfo.DraggingRect[0].bottom=mouse.y+16;1058 }1059 else{1060 RadInfo.DraggingRect[0].right=mouse.x;1061 RadInfo.DraggingRect[0].bottom=mouse.y;1062 }1063 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);1064 pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;1065 pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;1066 size.cx=rect.right-rect.left;1067 size.cy=rect.bottom-rect.top;1068 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"ImageBox","",WS_CHILD|WS_VISIBLE|SS_BLACKFRAME,0,CT_IMAGEBOX,IMGTYPE_FILE,0,1);1069 }1070 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_LISTBOX){1071 //リスト ボックス作成1072 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){1073 RadInfo.DraggingRect[0].left-=42;1074 RadInfo.DraggingRect[0].right=mouse.x+42;1075 RadInfo.DraggingRect[0].top-=30;1076 RadInfo.DraggingRect[0].bottom=mouse.y+30;1077 }1078 else{1079 RadInfo.DraggingRect[0].right=mouse.x;1080 RadInfo.DraggingRect[0].bottom=mouse.y;1081 }1082 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);1083 pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;1084 pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;1085 size.cx=rect.right-rect.left;1086 size.cy=rect.bottom-rect.top;1087 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"ListBox","",WS_CHILD|WS_VISIBLE|WS_VSCROLL|LBS_SORT|LBS_NOTIFY,WS_EX_CLIENTEDGE,CT_LISTBOX,0,0,1);1088 }1089 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_LISTVIEW){1090 //リスト ビュー作成1091 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){1092 RadInfo.DraggingRect[0].left-=52;1093 RadInfo.DraggingRect[0].right=mouse.x+53;1094 RadInfo.DraggingRect[0].top-=37;1095 RadInfo.DraggingRect[0].bottom=mouse.y+38;1096 }1097 else{1098 RadInfo.DraggingRect[0].right=mouse.x;1099 RadInfo.DraggingRect[0].bottom=mouse.y;1100 }1101 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);1102 pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;1103 pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;1104 size.cx=rect.right-rect.left;1105 size.cy=rect.bottom-rect.top;1106 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"ListView","",WS_CHILD|WS_VISIBLE,WS_EX_CLIENTEDGE,CT_LISTVIEW,0,0,1);1107 }1108 if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_PROGRESSBAR){1109 //プロバレス バー作成1110 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){1111 RadInfo.DraggingRect[0].left-=70;1112 RadInfo.DraggingRect[0].right=mouse.x+70;1113 RadInfo.DraggingRect[0].top-=10;1114 RadInfo.DraggingRect[0].bottom=mouse.y+11;1115 }1116 else{1117 RadInfo.DraggingRect[0].right=mouse.x;1118 RadInfo.DraggingRect[0].bottom=mouse.y;1119 }1120 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);1121 pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;1122 pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;1123 size.cx=rect.right-rect.left;1124 size.cy=rect.bottom-rect.top;1125 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"ProgressBar","",WS_CHILD|WS_VISIBLE,WS_EX_STATICEDGE,CT_PROGRESSBAR,0,0,1);1126 }1127 if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_RADIOBUTTON){1128 //ラジオ ボタン作成1129 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){1130 RadInfo.DraggingRect[0].left-=31;1131 RadInfo.DraggingRect[0].right=mouse.x+32;1132 RadInfo.DraggingRect[0].top-=7;1133 RadInfo.DraggingRect[0].bottom=mouse.y+8;1134 }1135 else{1136 RadInfo.DraggingRect[0].right=mouse.x;1137 RadInfo.DraggingRect[0].bottom=mouse.y;1138 }1139 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;1142 size.cx=rect.right-rect.left;1143 size.cy=rect.bottom-rect.top;1144 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"RadioButton","radio",WS_CHILD|WS_VISIBLE|BS_AUTORADIOBUTTON,0,CT_RADIOBUTTON,0,0,1);1145 }1146 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_STATIC){1147 //スタティック コントロール作成1148 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){1149 RadInfo.DraggingRect[0].left-=25;1150 RadInfo.DraggingRect[0].right=mouse.x+25;1151 RadInfo.DraggingRect[0].top-=6;1152 RadInfo.DraggingRect[0].bottom=mouse.y+6;1153 }1154 else{1155 RadInfo.DraggingRect[0].right=mouse.x;1156 RadInfo.DraggingRect[0].bottom=mouse.y;1157 }1158 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);1159 pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;1160 pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;1161 size.cx=rect.right-rect.left;1162 size.cy=rect.bottom-rect.top;1163 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"Static","Text",WS_CHILD|WS_VISIBLE,0,CT_STATIC,0,0,1);1164 }1165 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_TRACKBAR){1166 //トラック バー作成1167 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){1168 RadInfo.DraggingRect[0].left-=87;1169 RadInfo.DraggingRect[0].right=mouse.x+88;1170 RadInfo.DraggingRect[0].top-=11;1171 RadInfo.DraggingRect[0].bottom=mouse.y+12;1172 }1173 else{1174 RadInfo.DraggingRect[0].right=mouse.x;1175 RadInfo.DraggingRect[0].bottom=mouse.y;1176 }1177 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);1178 pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;1179 pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;1180 size.cx=rect.right-rect.left;1181 size.cy=rect.bottom-rect.top;1182 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"TrackBar","",WS_CHILD|WS_VISIBLE|TBS_BOTH|TBS_NOTICKS,0,CT_TRACKBAR,0,0,1);1183 }1184 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_TREEVIEW){1185 //ツリー ビュー作成1186 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){1187 RadInfo.DraggingRect[0].left-=52;1188 RadInfo.DraggingRect[0].right=mouse.x+53;1189 RadInfo.DraggingRect[0].top-=37;1190 RadInfo.DraggingRect[0].bottom=mouse.y+38;1191 }1192 else{1193 RadInfo.DraggingRect[0].right=mouse.x;1194 RadInfo.DraggingRect[0].bottom=mouse.y;1195 }1196 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);1197 pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;1198 pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;1199 size.cx=rect.right-rect.left;1200 size.cy=rect.bottom-rect.top;1201 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"TreeView","",WS_CHILD|WS_VISIBLE,WS_EX_CLIENTEDGE,CT_TREEVIEW,0,0,1);1202 }1203 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_UPDOWN){1204 //アップ ダウン コントロール作成1205 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){1206 RadInfo.DraggingRect[0].left-=8;1207 RadInfo.DraggingRect[0].right=mouse.x+8;1208 RadInfo.DraggingRect[0].top-=10;1209 RadInfo.DraggingRect[0].bottom=mouse.y+11;1210 }1211 else{1212 RadInfo.DraggingRect[0].right=mouse.x;1213 RadInfo.DraggingRect[0].bottom=mouse.y;1214 }1215 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);1216 pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;1217 pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;1218 size.cx=rect.right-rect.left;1219 size.cy=rect.bottom-rect.top;1220 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"UpDown","",WS_CHILD|WS_VISIBLE,0,CT_UPDOWN,0,0,1);1221 }1222 else if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_VSCROLLBAR){1223 //垂直スクロールバー作成1224 if(RadInfo.DraggingRect[0].left==mouse.x&&RadInfo.DraggingRect[0].top==mouse.y){1225 RadInfo.DraggingRect[0].left-=9;1226 RadInfo.DraggingRect[0].right=mouse.x+9;1227 RadInfo.DraggingRect[0].top-=30;1228 RadInfo.DraggingRect[0].bottom=mouse.y+30;1229 }1230 else{1231 RadInfo.DraggingRect[0].right=mouse.x;1232 RadInfo.DraggingRect[0].bottom=mouse.y;1233 }1234 RectNaturalFormat(&RadInfo.DraggingRect[0],&rect);1235 pos.x=rect.left-MdiInfo[i].MdiRadInfo->ClientPos.x;1236 pos.y=rect.top-MdiInfo[i].MdiRadInfo->ClientPos.y;1237 size.cx=rect.right-rect.left;1238 size.cy=rect.bottom-rect.top;1239 MdiInfo[i].MdiRadInfo->SelectingItem[0]=InsertDlgItem(i,i2,-1,&pos,&size,"VScrollBar","",WS_CHILD|WS_VISIBLE|SBS_VERT,0,CT_VSCROLLBAR,0,0,1);1240 }1241 SendMessage(GetWindow(MdiInfo[i].MdiRadInfo->hTools,GW_CHILD),WM_COMMAND,IDC_TOOL_MOUSE,0);1242 SendMessage(GetWindow(GetWindow(MdiInfo[i].MdiRadInfo->hTools,GW_CHILD),GW_CHILD),TB_CHECKBUTTON,IDC_TOOL_MOUSE,TRUE);1243 ChangePropertyWindow(i,i2);1244 1245 //複数選択を解除1246 MdiInfo[i].MdiRadInfo->SelectingItem[1]=-1;1247 }1248 1249 RadInfo.NowDragging=0;1250 1251 ResetState_EditMenu();1252 return 0;1253 1273 case WM_MOUSEMOVE: 1254 1274 mouse.x=(int)(short)LOWORD(lParam); … … 1258 1278 hParent=GetParent(hwnd); 1259 1279 i=GetWndNum(hParent); 1260 i2 =GetWndInfoNum(MdiInfo[i].path);1280 i2 = GetWndInfoNum(MdiInfo[i].path); 1261 1281 1262 1282 if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){ … … 1414 1434 return 0; 1415 1435 case WM_LBUTTONDBLCLK: 1416 mouse.x=LOWORD(lParam); 1417 mouse.y=HIWORD(lParam); 1418 CursorPos_LocalToGlobal(hwnd,&mouse.x,&mouse.y); 1419 1420 hParent=GetParent(hwnd); 1421 i=GetWndNum(hParent); 1422 i2=GetWndInfoNum(MdiInfo[i].path); 1423 if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){ 1424 if(MdiInfo[i].MdiRadInfo->SelectingItem[0]!=SELECT_WINDOW){ 1425 temp2[0]=0; 1426 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_BUTTON|| 1427 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_CHECKBOX|| 1428 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_IMAGEBOX|| 1429 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_RADIOBUTTON|| 1430 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_STATIC){ 1431 sprintf(temporary,"%s_%s_Click",ProjectInfo.pWindowInfo[i2].name,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 1432 } 1433 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_COMBOBOX) 1434 sprintf(temporary,"%s_%s_EditChange",ProjectInfo.pWindowInfo[i2].name,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 1435 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_EDIT) 1436 sprintf(temporary,"%s_%s_Change",ProjectInfo.pWindowInfo[i2].name,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 1437 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_LISTBOX) 1438 sprintf(temporary,"%s_%s_SelChange",ProjectInfo.pWindowInfo[i2].name,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 1439 else temporary[0]=0; 1440 if(temporary[0]) SelectProcedureOfMessageCall(i2,temporary,temp2); 1436 { 1437 mouse.x=LOWORD(lParam); 1438 mouse.y=HIWORD(lParam); 1439 CursorPos_LocalToGlobal(hwnd,&mouse.x,&mouse.y); 1440 1441 hParent=GetParent(hwnd); 1442 i=GetWndNum(hParent); 1443 i2=GetWndInfoNum(MdiInfo[i].path); 1444 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 1445 if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){ 1446 if(MdiInfo[i].MdiRadInfo->SelectingItem[0]!=SELECT_WINDOW){ 1447 temp2[0]=0; 1448 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_BUTTON|| 1449 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_CHECKBOX|| 1450 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_IMAGEBOX|| 1451 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_RADIOBUTTON|| 1452 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_STATIC){ 1453 sprintf(temporary,"%s_%s_Click",pWindowInfo->name,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 1454 } 1455 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_COMBOBOX) 1456 sprintf(temporary,"%s_%s_EditChange",pWindowInfo->name,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 1457 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_EDIT) 1458 sprintf(temporary,"%s_%s_Change",pWindowInfo->name,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 1459 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_LISTBOX) 1460 sprintf(temporary,"%s_%s_SelChange",pWindowInfo->name,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 1461 else temporary[0]=0; 1462 if(temporary[0]) SelectProcedureOfMessageCall(i2,temporary,temp2); 1463 } 1441 1464 } 1465 return 0; 1442 1466 } 1443 return 0;1444 1467 case WM_KEYDOWN: 1445 hParent=GetParent(hwnd); 1446 i=GetWndNum(hParent); 1447 i2=GetWndInfoNum(MdiInfo[i].path); 1448 if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){ 1449 if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){ 1450 PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pos; 1451 PointAndSize.size=ProjectInfo.pWindowInfo[i2].size; 1452 if(GetKeyState(VK_SHIFT)&0x8000){ 1453 if(wParam==VK_RIGHT||wParam==VK_LEFT||wParam==VK_DOWN||wParam==VK_UP) 1454 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize); 1455 1456 if(wParam==VK_RIGHT) 1457 ProjectInfo.pWindowInfo[i2].size.cx++; 1458 else if(wParam==VK_LEFT) 1459 ProjectInfo.pWindowInfo[i2].size.cx--; 1460 else if(wParam==VK_DOWN) 1461 ProjectInfo.pWindowInfo[i2].size.cy++; 1462 else if(wParam==VK_UP) 1463 ProjectInfo.pWindowInfo[i2].size.cy--; 1464 1465 if(wParam==VK_RIGHT||wParam==VK_LEFT||wParam==VK_DOWN||wParam==VK_UP){ 1466 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 1467 1468 { 1469 hParent=GetParent(hwnd); 1470 i=GetWndNum(hParent); 1471 i2=GetWndInfoNum(MdiInfo[i].path); 1472 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 1473 if(MdiInfo[i].MdiRadInfo->ButtonSelect==IDC_TOOL_MOUSE){ 1474 if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){ 1475 PointAndSize.pos=pWindowInfo->pos; 1476 PointAndSize.size=pWindowInfo->size; 1477 if(GetKeyState(VK_SHIFT)&0x8000){ 1478 if(wParam==VK_RIGHT||wParam==VK_LEFT||wParam==VK_DOWN||wParam==VK_UP) 1479 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize); 1480 1481 if(wParam==VK_RIGHT) 1482 pWindowInfo->size.cx++; 1483 else if(wParam==VK_LEFT) 1484 pWindowInfo->size.cx--; 1485 else if(wParam==VK_DOWN) 1486 pWindowInfo->size.cy++; 1487 else if(wParam==VK_UP) 1488 pWindowInfo->size.cy--; 1489 1490 if(wParam==VK_RIGHT||wParam==VK_LEFT||wParam==VK_DOWN||wParam==VK_UP){ 1491 DrawRadWindow(i,pWindowInfo); 1492 1493 SetStatusText(NULL); 1494 1495 //サポートダイアログの内容をセット 1496 SetSupportDlgData(i,i2); 1497 } 1498 } 1499 } 1500 else{ 1501 PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].pos; 1502 PointAndSize.size=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size; 1503 if(wParam==VK_RIGHT){ 1504 if(GetKeyState(VK_SHIFT)&0x8000){ 1505 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize); 1506 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx++; 1507 } 1508 else{ 1509 for(i3=0;;i3++){ 1510 if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break; 1511 PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos; 1512 PointAndSize.size=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size; 1513 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize); 1514 1515 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x++; 1516 } 1517 } 1518 DrawRadWindow(i,pWindowInfo); 1468 1519 SetStatusText(NULL); 1469 1520 … … 1471 1522 SetSupportDlgData(i,i2); 1472 1523 } 1524 else if(wParam==VK_LEFT){ 1525 if(GetKeyState(VK_SHIFT)&0x8000){ 1526 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize); 1527 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx--; 1528 } 1529 else{ 1530 for(i3=0;;i3++){ 1531 if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break; 1532 PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos; 1533 PointAndSize.size=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size; 1534 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize); 1535 1536 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x--; 1537 } 1538 } 1539 DrawRadWindow(i,pWindowInfo); 1540 SetStatusText(NULL); 1541 1542 //サポートダイアログの内容をセット 1543 SetSupportDlgData(i,i2); 1544 } 1545 else if(wParam==VK_UP){ 1546 if(GetKeyState(VK_SHIFT)&0x8000){ 1547 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize); 1548 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cy--; 1549 } 1550 else{ 1551 for(i3=0;;i3++){ 1552 if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break; 1553 PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos; 1554 PointAndSize.size=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size; 1555 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize); 1556 1557 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y--; 1558 } 1559 } 1560 DrawRadWindow(i,pWindowInfo); 1561 SetStatusText(NULL); 1562 1563 //サポートダイアログの内容をセット 1564 SetSupportDlgData(i,i2); 1565 } 1566 else if(wParam==VK_DOWN){ 1567 if(GetKeyState(VK_SHIFT)&0x8000){ 1568 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize); 1569 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cy++; 1570 } 1571 else{ 1572 for(i3=0;;i3++){ 1573 if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break; 1574 PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos; 1575 PointAndSize.size=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size; 1576 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize); 1577 1578 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y++; 1579 } 1580 } 1581 DrawRadWindow(i,pWindowInfo); 1582 SetStatusText(NULL); 1583 1584 //サポートダイアログの内容をセット 1585 SetSupportDlgData(i,i2); 1586 } 1587 else if(wParam==VK_DELETE) 1588 SendMessage(hwnd,WM_COMMAND,IDM_RAD_ITEM_DELETE,0); 1473 1589 } 1474 1590 } 1475 else{ 1476 PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].pos; 1477 PointAndSize.size=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size; 1478 if(wParam==VK_RIGHT){ 1479 if(GetKeyState(VK_SHIFT)&0x8000){ 1480 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize); 1481 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx++; 1482 } 1483 else{ 1484 for(i3=0;;i3++){ 1485 if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break; 1486 PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos; 1487 PointAndSize.size=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size; 1488 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize); 1489 1490 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x++; 1491 } 1492 } 1493 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 1494 SetStatusText(NULL); 1495 1496 //サポートダイアログの内容をセット 1497 SetSupportDlgData(i,i2); 1498 } 1499 else if(wParam==VK_LEFT){ 1500 if(GetKeyState(VK_SHIFT)&0x8000){ 1501 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize); 1502 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx--; 1503 } 1504 else{ 1505 for(i3=0;;i3++){ 1506 if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break; 1507 PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos; 1508 PointAndSize.size=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size; 1509 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize); 1510 1511 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x--; 1512 } 1513 } 1514 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 1515 SetStatusText(NULL); 1516 1517 //サポートダイアログの内容をセット 1518 SetSupportDlgData(i,i2); 1519 } 1520 else if(wParam==VK_UP){ 1521 if(GetKeyState(VK_SHIFT)&0x8000){ 1522 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize); 1523 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cy--; 1524 } 1525 else{ 1526 for(i3=0;;i3++){ 1527 if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break; 1528 PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos; 1529 PointAndSize.size=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size; 1530 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize); 1531 1532 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y--; 1533 } 1534 } 1535 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 1536 SetStatusText(NULL); 1537 1538 //サポートダイアログの内容をセット 1539 SetSupportDlgData(i,i2); 1540 } 1541 else if(wParam==VK_DOWN){ 1542 if(GetKeyState(VK_SHIFT)&0x8000){ 1543 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize); 1544 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cy++; 1545 } 1546 else{ 1547 for(i3=0;;i3++){ 1548 if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break; 1549 PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos; 1550 PointAndSize.size=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size; 1551 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize); 1552 1553 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y++; 1554 } 1555 } 1556 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 1557 SetStatusText(NULL); 1558 1559 //サポートダイアログの内容をセット 1560 SetSupportDlgData(i,i2); 1561 } 1562 else if(wParam==VK_DELETE) 1563 SendMessage(hwnd,WM_COMMAND,IDM_RAD_ITEM_DELETE,0); 1564 } 1591 return 0; 1565 1592 } 1566 return 0;1567 1593 case WM_SETFOCUS: 1568 1594 i=GetWndNum(GetParent(hwnd)); -
trunk/ab5.0/abdev/abdev/RadSupport.cpp
r475 r609 38 38 extern PROJECTINFO ProjectInfo; 39 39 static HWND hWnd; 40 WINDOW_INFO *pWindowInfo;41 40 HWND hChild; 42 41 HFONT *lphFont; … … 52 51 } 53 52 54 pWindowInfo=&ProjectInfo.pWindowInfo[WndInfoNum];53 WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum]; 55 54 56 55 if(pWindowInfo->style&WS_CHILD){ … … 187 186 hSupport=MdiInfo[WndNum].MdiRadInfo->hSupport; 188 187 188 WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum]; 189 189 190 if(RadInfo.NowDragging>=FRAME_CHANGEPOS_START&&RadInfo.NowDragging<=FRAME_CHANGEPOS_END&& 190 191 (!(MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]!=-1&&MdiInfo[WndNum].MdiRadInfo->SelectingItem[1]!=-1))){ … … 212 213 SetDlgItemText(hSupport,IDC_YPOS,""); 213 214 214 sprintf(temporary,"%d", ProjectInfo.pWindowInfo[WndInfoNum].size.cx);215 sprintf(temporary,"%d",pWindowInfo->size.cx); 215 216 SetDlgItemText(hSupport,IDC_WIDTH,temporary); 216 217 217 sprintf(temporary,"%d", ProjectInfo.pWindowInfo[WndInfoNum].size.cy);218 sprintf(temporary,"%d",pWindowInfo->size.cy); 218 219 SetDlgItemText(hSupport,IDC_HEIGHT,temporary); 219 220 } … … 239 240 EnableWindow(GetDlgItem(hSupport,IDC_SPIN4),1); 240 241 241 sprintf(temporary,"%d", ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].pos.x);242 sprintf(temporary,"%d",pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].pos.x); 242 243 SetDlgItemText(hSupport,IDC_XPOS,temporary); 243 244 244 sprintf(temporary,"%d", ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].pos.y);245 sprintf(temporary,"%d",pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].pos.y); 245 246 SetDlgItemText(hSupport,IDC_YPOS,temporary); 246 247 247 sprintf(temporary,"%d", ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].size.cx);248 sprintf(temporary,"%d",pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].size.cx); 248 249 SetDlgItemText(hSupport,IDC_WIDTH,temporary); 249 250 250 sprintf(temporary,"%d", ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].size.cy);251 sprintf(temporary,"%d",pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].size.cy); 251 252 SetDlgItemText(hSupport,IDC_HEIGHT,temporary); 252 253 } … … 260 261 extern MDIINFO MdiInfo[MAX_WNDNUM]; 261 262 static BOOL bTimer; 262 int i,i 2,i3;263 int i,i3; 263 264 char temporary[255]; 264 265 POINTANDSIZE PointAndSize; … … 305 306 306 307 i=GetWndNum(GetParent(hwnd)); 307 i2=GetWndInfoNum(MdiInfo[i].path);308 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 308 309 309 310 for(i3=0;;i3++){ 310 311 if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break; 311 PointAndSize.pos= ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos;312 PointAndSize.size= ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size;312 PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos; 313 PointAndSize.size=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size; 313 314 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[i3],(DWORD)&PointAndSize); 314 315 } … … 318 319 for(i3=0;;i3++){ 319 320 if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break; 320 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x=atol(temporary);321 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.x=atol(temporary); 321 322 } 322 323 } … … 326 327 for(i3=0;;i3++){ 327 328 if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break; 328 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y=atol(temporary);329 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].pos.y=atol(temporary); 329 330 } 330 331 } … … 333 334 if(temporary[0]){ 334 335 if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW) 335 ProjectInfo.pWindowInfo[i2].size.cx=atol(temporary);336 pWindowInfo->size.cx=atol(temporary); 336 337 else{ 337 338 for(i3=0;;i3++){ 338 339 if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break; 339 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cx=atol(temporary);340 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cx=atol(temporary); 340 341 } 341 342 } … … 345 346 if(temporary[0]){ 346 347 if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW) 347 ProjectInfo.pWindowInfo[i2].size.cy=atol(temporary);348 pWindowInfo->size.cy=atol(temporary); 348 349 else{ 349 350 for(i3=0;;i3++){ 350 351 if(MdiInfo[i].MdiRadInfo->SelectingItem[i3]==-1) break; 351 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cy=atol(temporary);352 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[i3]].size.cy=atol(temporary); 352 353 } 353 354 } … … 355 356 356 357 //描画 357 DrawRadWindow(i, &ProjectInfo.pWindowInfo[i2]);358 DrawRadWindow(i,pWindowInfo); 358 359 359 360 //スクロールバーをリセット -
trunk/ab5.0/abdev/abdev/RadToolsAndPropertyProc.cpp
r475 r609 356 356 extern MDIINFO MdiInfo[MAX_WNDNUM]; 357 357 extern PROJECTINFO ProjectInfo; 358 int i,i 2,i3;358 int i,i3; 359 359 char temporary[MAX_PATH],temp2[MAX_PATH]; 360 360 switch(message){ 361 361 case WM_INITDIALOG: 362 SetPosCenter(hwnd); 363 i=GetWndNum(GetWindow(hClient,GW_CHILD)); 364 i2=GetWndInfoNum(MdiInfo[i].path); 365 sprintf(temporary,"h%s",ProjectInfo.pWindowInfo[i2].name); 366 sprintf(temp2,"%sProc",ProjectInfo.pWindowInfo[i2].name); 367 if(lstrcmp(temporary,ProjectInfo.pWindowInfo[i2].HandleName)==0&& 368 lstrcmp(temp2,ProjectInfo.pWindowInfo[i2].CallBackName)==0){ 369 SendDlgItemMessage(hwnd,IDC_AUTOSET,BM_SETCHECK,BST_CHECKED,0); 370 SendMessage(hwnd,WM_COMMAND,IDC_AUTOSET,0); 371 } 372 SetDlgItemText(hwnd,IDC_WINDOWNAME,ProjectInfo.pWindowInfo[i2].name); 373 SetDlgItemText(hwnd,IDC_WINDOWHANDLE,ProjectInfo.pWindowInfo[i2].HandleName); 374 SetDlgItemText(hwnd,IDC_WINDOWPROC,ProjectInfo.pWindowInfo[i2].CallBackName); 375 break; 362 { 363 SetPosCenter(hwnd); 364 i=GetWndNum(GetWindow(hClient,GW_CHILD)); 365 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 366 sprintf(temporary,"h%s",pWindowInfo->name); 367 sprintf(temp2,"%sProc",pWindowInfo->name); 368 if(lstrcmp(temporary,pWindowInfo->HandleName)==0&& 369 lstrcmp(temp2,pWindowInfo->CallBackName)==0){ 370 SendDlgItemMessage(hwnd,IDC_AUTOSET,BM_SETCHECK,BST_CHECKED,0); 371 SendMessage(hwnd,WM_COMMAND,IDC_AUTOSET,0); 372 } 373 SetDlgItemText(hwnd,IDC_WINDOWNAME,pWindowInfo->name); 374 SetDlgItemText(hwnd,IDC_WINDOWHANDLE,pWindowInfo->HandleName); 375 SetDlgItemText(hwnd,IDC_WINDOWPROC,pWindowInfo->CallBackName); 376 break; 377 } 376 378 case WM_COMMAND: 377 379 switch(LOWORD(wParam)){ 378 380 case IDOK: 379 if(GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWNAME))==0){ 380 //MsgBox "ウィンドウ識別名を入力して下さい。" 381 MessageBox(hOwner,STRING_WINDOW_RENAME_MUST_WINDOWNAME,APPLICATION_NAME,MB_OK|MB_ICONEXCLAMATION); 382 break; 383 } 384 if(GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWHANDLE))==0){ 385 //MsgBox "ハンドル名を入力して下さい。" 386 MessageBox(hOwner,STRING_WINDOW_RENAME_MUST_HANDLENAME,APPLICATION_NAME,MB_OK|MB_ICONEXCLAMATION); 387 break; 388 } 389 if(GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWPROC))==0){ 390 //MsgBox "プロシージャ名を入力して下さい。" 391 MessageBox(hOwner,STRING_WINDOW_RENAME_MUST_PROCEDURENAME,APPLICATION_NAME,MB_OK|MB_ICONEXCLAMATION); 392 break; 393 } 394 395 i=GetWndNum(GetWindow(hClient,GW_CHILD)); 396 i2=GetWndInfoNum(MdiInfo[i].path); 397 398 RAD_UNDOSTATE_NAME names,NoticeNames; 399 i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWNAME))+1; 400 names.name=(char *)HeapAlloc(hHeap,0,i3); 401 GetDlgItemText(hwnd,IDC_WINDOWNAME,names.name,i3); 402 403 i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWHANDLE))+1; 404 names.HandleName=(char *)HeapAlloc(hHeap,0,i3); 405 GetDlgItemText(hwnd,IDC_WINDOWHANDLE,names.HandleName,i3); 406 407 i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWPROC))+1; 408 names.CallBackName=(char *)HeapAlloc(hHeap,0,i3); 409 GetDlgItemText(hwnd,IDC_WINDOWPROC,names.CallBackName,i3); 410 411 if(lstrcmp(names.name,ProjectInfo.pWindowInfo[i2].name)==0&& 412 lstrcmp(names.HandleName,ProjectInfo.pWindowInfo[i2].HandleName)==0&& 413 lstrcmp(names.CallBackName,ProjectInfo.pWindowInfo[i2].CallBackName)==0){ 414 HeapDefaultFree(names.name); 415 HeapDefaultFree(names.HandleName); 416 HeapDefaultFree(names.CallBackName); 417 SendMessage(hwnd,WM_COMMAND,IDCANCEL,0); 381 { 382 if(GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWNAME))==0){ 383 //MsgBox "ウィンドウ識別名を入力して下さい。" 384 MessageBox(hOwner,STRING_WINDOW_RENAME_MUST_WINDOWNAME,APPLICATION_NAME,MB_OK|MB_ICONEXCLAMATION); 385 break; 386 } 387 if(GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWHANDLE))==0){ 388 //MsgBox "ハンドル名を入力して下さい。" 389 MessageBox(hOwner,STRING_WINDOW_RENAME_MUST_HANDLENAME,APPLICATION_NAME,MB_OK|MB_ICONEXCLAMATION); 390 break; 391 } 392 if(GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWPROC))==0){ 393 //MsgBox "プロシージャ名を入力して下さい。" 394 MessageBox(hOwner,STRING_WINDOW_RENAME_MUST_PROCEDURENAME,APPLICATION_NAME,MB_OK|MB_ICONEXCLAMATION); 395 break; 396 } 397 398 i=GetWndNum(GetWindow(hClient,GW_CHILD)); 399 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 400 401 RAD_UNDOSTATE_NAME names,NoticeNames; 402 i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWNAME))+1; 403 names.name=(char *)HeapAlloc(hHeap,0,i3); 404 GetDlgItemText(hwnd,IDC_WINDOWNAME,names.name,i3); 405 406 i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWHANDLE))+1; 407 names.HandleName=(char *)HeapAlloc(hHeap,0,i3); 408 GetDlgItemText(hwnd,IDC_WINDOWHANDLE,names.HandleName,i3); 409 410 i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWPROC))+1; 411 names.CallBackName=(char *)HeapAlloc(hHeap,0,i3); 412 GetDlgItemText(hwnd,IDC_WINDOWPROC,names.CallBackName,i3); 413 414 if(lstrcmp(names.name,pWindowInfo->name)==0&& 415 lstrcmp(names.HandleName,pWindowInfo->HandleName)==0&& 416 lstrcmp(names.CallBackName,pWindowInfo->CallBackName)==0){ 417 HeapDefaultFree(names.name); 418 HeapDefaultFree(names.HandleName); 419 HeapDefaultFree(names.CallBackName); 420 SendMessage(hwnd,WM_COMMAND,IDCANCEL,0); 421 return 1; 422 } 423 424 //MsgBox "これらのウィンドウ識別名を変更すると、ソースコード内の識別子は手動で変換する必要があります。変更しますか?" 425 if(IDCANCEL==MessageBox(hwnd,STRING_WINDOW_RENAME_CHECK,APPLICATION_NAME,MB_OKCANCEL|MB_ICONEXCLAMATION)) return 1; 426 427 //変更情報を更新 428 NoticeNames.name=pWindowInfo->name; 429 NoticeNames.HandleName=pWindowInfo->HandleName; 430 NoticeNames.CallBackName=pWindowInfo->CallBackName; 431 Rad_NoticeChanging(i,RAD_UNDO_NAME,SELECT_WINDOW,(DWORD)&NoticeNames); 432 433 HeapDefaultFree(pWindowInfo->name); 434 pWindowInfo->name=names.name; 435 GlobalFree(MdiInfo[i].path); 436 MdiInfo[i].path=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(names.name)); 437 lstrcpy(MdiInfo[i].path,names.name); 438 439 HeapDefaultFree(pWindowInfo->HandleName); 440 pWindowInfo->HandleName=names.HandleName; 441 442 HeapDefaultFree(pWindowInfo->CallBackName); 443 pWindowInfo->CallBackName=names.CallBackName; 444 445 EndDialog(hwnd,1); 418 446 return 1; 419 447 } 420 421 //MsgBox "これらのウィンドウ識別名を変更すると、ソースコード内の識別子は手動で変換する必要があります。変更しますか?"422 if(IDCANCEL==MessageBox(hwnd,STRING_WINDOW_RENAME_CHECK,APPLICATION_NAME,MB_OKCANCEL|MB_ICONEXCLAMATION)) return 1;423 424 //変更情報を更新425 NoticeNames.name=ProjectInfo.pWindowInfo[i2].name;426 NoticeNames.HandleName=ProjectInfo.pWindowInfo[i2].HandleName;427 NoticeNames.CallBackName=ProjectInfo.pWindowInfo[i2].CallBackName;428 Rad_NoticeChanging(i,RAD_UNDO_NAME,SELECT_WINDOW,(DWORD)&NoticeNames);429 430 HeapDefaultFree(ProjectInfo.pWindowInfo[i2].name);431 ProjectInfo.pWindowInfo[i2].name=names.name;432 GlobalFree(MdiInfo[i].path);433 MdiInfo[i].path=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(names.name));434 lstrcpy(MdiInfo[i].path,names.name);435 436 HeapDefaultFree(ProjectInfo.pWindowInfo[i2].HandleName);437 ProjectInfo.pWindowInfo[i2].HandleName=names.HandleName;438 439 HeapDefaultFree(ProjectInfo.pWindowInfo[i2].CallBackName);440 ProjectInfo.pWindowInfo[i2].CallBackName=names.CallBackName;441 442 EndDialog(hwnd,1);443 return 1;444 448 case IDCANCEL: 445 449 EndDialog(hwnd,0); … … 477 481 extern MDIINFO MdiInfo[MAX_WNDNUM]; 478 482 extern PROJECTINFO ProjectInfo; 479 int i ,i2;483 int i; 480 484 481 485 switch(message){ 482 486 case WM_INITDIALOG: 483 SetPosCenter(hwnd); 484 i=GetWndNum(GetWindow(hClient,GW_CHILD)); 485 i2=GetWndInfoNum(MdiInfo[i].path); 486 if(ProjectInfo.pWindowInfo[i2].ExStyle&WS_EX_TOPMOST) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOPMOST,BM_SETCHECK,BST_CHECKED,0); 487 if(ProjectInfo.pWindowInfo[i2].ExStyle&WS_EX_ACCEPTFILES) SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_SETCHECK,BST_CHECKED,0); 488 if(ProjectInfo.pWindowInfo[i2].ExStyle&WS_EX_TRANSPARENT) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_SETCHECK,BST_CHECKED,0); 489 if(ProjectInfo.pWindowInfo[i2].ExStyle&WS_EX_TOOLWINDOW) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOOLWINDOW,BM_SETCHECK,BST_CHECKED,0); 490 if(ProjectInfo.pWindowInfo[i2].ExStyle&WS_EX_CLIENTEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_SETCHECK,BST_CHECKED,0); 491 if(ProjectInfo.pWindowInfo[i2].ExStyle&WS_EX_STATICEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_SETCHECK,BST_CHECKED,0); 492 if(ProjectInfo.pWindowInfo[i2].ExStyle&WS_EX_NOPARENTNOTIFY) SendDlgItemMessage(hwnd,IDC_EXSTYLE_NOPARENTNOTIFY,BM_SETCHECK,BST_CHECKED,0); 493 if(ProjectInfo.pWindowInfo[i2].ExStyle&WS_EX_CONTEXTHELP) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTEXTHELP,BM_SETCHECK,BST_CHECKED,0); 494 if(ProjectInfo.pWindowInfo[i2].ExStyle&WS_EX_CONTROLPARENT) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTROLPARENT,BM_SETCHECK,BST_CHECKED,0); 495 break; 487 { 488 SetPosCenter(hwnd); 489 i=GetWndNum(GetWindow(hClient,GW_CHILD)); 490 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 491 if(pWindowInfo->ExStyle&WS_EX_TOPMOST) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOPMOST,BM_SETCHECK,BST_CHECKED,0); 492 if(pWindowInfo->ExStyle&WS_EX_ACCEPTFILES) SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_SETCHECK,BST_CHECKED,0); 493 if(pWindowInfo->ExStyle&WS_EX_TRANSPARENT) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_SETCHECK,BST_CHECKED,0); 494 if(pWindowInfo->ExStyle&WS_EX_TOOLWINDOW) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOOLWINDOW,BM_SETCHECK,BST_CHECKED,0); 495 if(pWindowInfo->ExStyle&WS_EX_CLIENTEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_SETCHECK,BST_CHECKED,0); 496 if(pWindowInfo->ExStyle&WS_EX_STATICEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_SETCHECK,BST_CHECKED,0); 497 if(pWindowInfo->ExStyle&WS_EX_NOPARENTNOTIFY) SendDlgItemMessage(hwnd,IDC_EXSTYLE_NOPARENTNOTIFY,BM_SETCHECK,BST_CHECKED,0); 498 if(pWindowInfo->ExStyle&WS_EX_CONTEXTHELP) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTEXTHELP,BM_SETCHECK,BST_CHECKED,0); 499 if(pWindowInfo->ExStyle&WS_EX_CONTROLPARENT) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTROLPARENT,BM_SETCHECK,BST_CHECKED,0); 500 break; 501 } 496 502 case WM_COMMAND: 497 503 switch(LOWORD(wParam)){ 498 504 case IDOK: 499 i=GetWndNum(GetWindow(hClient,GW_CHILD)); 500 i2=GetWndInfoNum(MdiInfo[i].path); 501 502 DWORD style; 503 style=0; 504 if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOPMOST,BM_GETCHECK,0,0)) 505 style|=WS_EX_TOPMOST; 506 if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_GETCHECK,0,0)) 507 style|=WS_EX_ACCEPTFILES; 508 if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_GETCHECK,0,0)) 509 style|=WS_EX_TRANSPARENT; 510 if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOOLWINDOW,BM_GETCHECK,0,0)) 511 style|=WS_EX_TOOLWINDOW; 512 if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_GETCHECK,0,0)) 513 style|=WS_EX_CLIENTEDGE; 514 if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_GETCHECK,0,0)) 515 style|=WS_EX_STATICEDGE; 516 if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_NOPARENTNOTIFY,BM_GETCHECK,0,0)) 517 style|=WS_EX_NOPARENTNOTIFY; 518 if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTEXTHELP,BM_GETCHECK,0,0)) 519 style|=WS_EX_CONTEXTHELP; 520 if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTROLPARENT,BM_GETCHECK,0,0)) 521 style|=WS_EX_CONTROLPARENT; 522 523 if(style==ProjectInfo.pWindowInfo[i2].ExStyle){ 524 SendMessage(hwnd,WM_COMMAND,IDCANCEL,0); 505 { 506 i=GetWndNum(GetWindow(hClient,GW_CHILD)); 507 508 DWORD style; 509 style=0; 510 if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOPMOST,BM_GETCHECK,0,0)) 511 style|=WS_EX_TOPMOST; 512 if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_GETCHECK,0,0)) 513 style|=WS_EX_ACCEPTFILES; 514 if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_GETCHECK,0,0)) 515 style|=WS_EX_TRANSPARENT; 516 if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOOLWINDOW,BM_GETCHECK,0,0)) 517 style|=WS_EX_TOOLWINDOW; 518 if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_GETCHECK,0,0)) 519 style|=WS_EX_CLIENTEDGE; 520 if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_GETCHECK,0,0)) 521 style|=WS_EX_STATICEDGE; 522 if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_NOPARENTNOTIFY,BM_GETCHECK,0,0)) 523 style|=WS_EX_NOPARENTNOTIFY; 524 if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTEXTHELP,BM_GETCHECK,0,0)) 525 style|=WS_EX_CONTEXTHELP; 526 if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTROLPARENT,BM_GETCHECK,0,0)) 527 style|=WS_EX_CONTROLPARENT; 528 529 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 530 531 if(style==pWindowInfo->ExStyle){ 532 SendMessage(hwnd,WM_COMMAND,IDCANCEL,0); 533 return 1; 534 } 535 536 //変更情報 537 Rad_NoticeChanging(i,RAD_UNDO_EXSTYLE,SELECT_WINDOW,pWindowInfo->ExStyle); 538 539 pWindowInfo->ExStyle=style; 540 EndDialog(hwnd,1); 525 541 return 1; 526 542 } 527 528 //変更情報529 Rad_NoticeChanging(i,RAD_UNDO_EXSTYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].ExStyle);530 531 ProjectInfo.pWindowInfo[i2].ExStyle=style;532 EndDialog(hwnd,1);533 return 1;534 543 case IDCANCEL: 535 544 EndDialog(hwnd,0); … … 544 553 extern MDIINFO MdiInfo[MAX_WNDNUM]; 545 554 extern PROJECTINFO ProjectInfo; 546 int i,i 2,i3,i4;555 int i,i3,i4; 547 556 static BOOL bInitial; 548 557 549 558 switch(message){ 550 559 case WM_INITDIALOG: 551 bInitial=1; 552 i=GetWndNum(GetParent(GetParent(hwnd))); 553 i2=GetWndInfoNum(MdiInfo[i].path); 554 555 SetDlgItemText(hwnd,IDC_WINDOWNAME,ProjectInfo.pWindowInfo[i2].name); 556 SetDlgItemText(hwnd,IDC_HANDLE,ProjectInfo.pWindowInfo[i2].HandleName); 557 SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[i2].caption); 558 559 //"3D FACE(標準)" 560 SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_BGCOLOR1); 561 //"色指定" 562 SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_BGCOLOR2); 563 564 for(i3=0;i3<ProjectInfo.res.NumberOfBitmapRes;i3++) 565 SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_ADDSTRING,0,(long)ProjectInfo.res.pBitmapResInfo[i3].IdName); 566 if(ProjectInfo.pWindowInfo[i2].type==WNDTYPE_MODALDLG|| 567 ProjectInfo.pWindowInfo[i2].type==WNDTYPE_MODELESSDLG){ 568 SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,0,0); 569 EnableWindow(GetDlgItem(hwnd,IDC_BGCOLOR),0); 570 } 571 else{ 572 if(ProjectInfo.pWindowInfo[i2].bgColor==COLOR_3DFACE){ 573 //3DFACE 560 { 561 bInitial=1; 562 i=GetWndNum(GetParent(GetParent(hwnd))); 563 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 564 565 SetDlgItemText(hwnd,IDC_WINDOWNAME,pWindowInfo->name); 566 SetDlgItemText(hwnd,IDC_HANDLE,pWindowInfo->HandleName); 567 SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->caption); 568 569 //"3D FACE(標準)" 570 SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_BGCOLOR1); 571 //"色指定" 572 SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_BGCOLOR2); 573 574 for(i3=0;i3<ProjectInfo.res.NumberOfBitmapRes;i3++) 575 SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_ADDSTRING,0,(long)ProjectInfo.res.pBitmapResInfo[i3].IdName); 576 if(pWindowInfo->type==WNDTYPE_MODALDLG|| 577 pWindowInfo->type==WNDTYPE_MODELESSDLG){ 574 578 SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,0,0); 579 EnableWindow(GetDlgItem(hwnd,IDC_BGCOLOR),0); 575 580 } 576 else if(ProjectInfo.pWindowInfo[i2].bgColor<=0){ 577 //色指定 578 SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,1,0); 581 else{ 582 if(pWindowInfo->bgColor==COLOR_3DFACE){ 583 //3DFACE 584 SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,0,0); 585 } 586 else if(pWindowInfo->bgColor<=0){ 587 //色指定 588 SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,1,0); 589 } 590 else if(pWindowInfo->bgColor>=0x1000){ 591 //ビットマップ指定 592 SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,2+pWindowInfo->bgColor-0x1000,0); 593 } 579 594 } 580 else if(ProjectInfo.pWindowInfo[i2].bgColor>=0x1000){ 581 //ビットマップ指定 582 SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,2+ProjectInfo.pWindowInfo[i2].bgColor-0x1000,0); 595 596 597 //////////// 598 // メニュー 599 //////////// 600 601 //"なし" 602 SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_ADDSTRING,0,(long)STRING_NONE_); 603 604 for(i3=0,i4=0;i3<ProjectInfo.NumberOfMenu;i3++){ 605 if(pWindowInfo->MenuID){ 606 if(lstrcmpi(ProjectInfo.pMenuInfo[i3].IdName,pWindowInfo->MenuID)==0) 607 i4=i3+1; 608 } 609 SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_ADDSTRING,0,(long)ProjectInfo.pMenuInfo[i3].IdName); 583 610 } 584 } 585 586 587 //////////// 588 // メニュー 589 //////////// 590 591 //"なし" 592 SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_ADDSTRING,0,(long)STRING_NONE_); 593 594 for(i3=0,i4=0;i3<ProjectInfo.NumberOfMenu;i3++){ 595 if(ProjectInfo.pWindowInfo[i2].MenuID){ 596 if(lstrcmpi(ProjectInfo.pMenuInfo[i3].IdName,ProjectInfo.pWindowInfo[i2].MenuID)==0) 611 if(i4==0&&pWindowInfo->MenuID){ 612 //メニューが存在しない場合、無効にする 613 HeapDefaultFree(pWindowInfo->MenuID); 614 pWindowInfo->MenuID=0; 615 DrawRadWindow(i,pWindowInfo); 616 } 617 SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_SETCURSEL,i4,0); 618 619 620 //////////// 621 // アイコン 622 //////////// 623 624 //"Windowsロゴ(標準)" 625 SendDlgItemMessage(hwnd,IDC_ICONRES,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_ICONDEFAULT); 626 627 for(i3=0,i4=0;i3<ProjectInfo.res.NumberOfIconRes;i3++){ 628 SendDlgItemMessage(hwnd,IDC_ICONRES,CB_ADDSTRING,0,(long)ProjectInfo.res.pIconResInfo[i3].IdName); 629 630 if(lstrcmp(pWindowInfo->IconResName,ProjectInfo.res.pIconResInfo[i3].IdName)==0) 597 631 i4=i3+1; 598 632 } 599 SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_ADDSTRING,0,(long)ProjectInfo.pMenuInfo[i3].IdName); 600 } 601 if(i4==0&&ProjectInfo.pWindowInfo[i2].MenuID){ 602 //メニューが存在しない場合、無効にする 603 HeapDefaultFree(ProjectInfo.pWindowInfo[i2].MenuID); 604 ProjectInfo.pWindowInfo[i2].MenuID=0; 605 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 606 } 607 SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_SETCURSEL,i4,0); 608 609 610 //////////// 611 // アイコン 612 //////////// 613 614 //"Windowsロゴ(標準)" 615 SendDlgItemMessage(hwnd,IDC_ICONRES,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_ICONDEFAULT); 616 617 for(i3=0,i4=0;i3<ProjectInfo.res.NumberOfIconRes;i3++){ 618 SendDlgItemMessage(hwnd,IDC_ICONRES,CB_ADDSTRING,0,(long)ProjectInfo.res.pIconResInfo[i3].IdName); 619 620 if(lstrcmp(ProjectInfo.pWindowInfo[i2].IconResName,ProjectInfo.res.pIconResInfo[i3].IdName)==0) 621 i4=i3+1; 622 } 623 if(i4==0&&ProjectInfo.pWindowInfo[i2].IconResName){ 624 //アイコンが存在しない場合、無効にする 625 HeapDefaultFree(ProjectInfo.pWindowInfo[i2].IconResName); 626 ProjectInfo.pWindowInfo[i2].IconResName=0; 627 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 628 } 629 SendDlgItemMessage(hwnd,IDC_ICONRES,CB_SETCURSEL,i4,0); 630 631 632 //////////// 633 // スタイル 634 //////////// 635 636 //"オーバーラップ" 637 SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_OVERLAPPED); 638 //"ポップアップ" 639 SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_POPUP); 640 //"チャイルド" 641 SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_CHILD); 642 643 if(ProjectInfo.pWindowInfo[i2].style&WS_POPUP) SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_SETCURSEL,1,0); 644 else if(ProjectInfo.pWindowInfo[i2].style&WS_CHILD) SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_SETCURSEL,2,0); 645 else SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_SETCURSEL,0,0); 646 647 //"枠なし" 648 SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_FRAME_NONE); 649 //"細枠" 650 SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_FRAME_THICK); 651 //"サイズ変更枠" 652 SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_FRAME_BORDER); 653 654 //WS_CAPTION(WS_BORDER含む)を考慮してWS_THICKFRAMEを最初に比較する 655 if(ProjectInfo.pWindowInfo[i2].style&WS_THICKFRAME) SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_SETCURSEL,2,0); 656 else if(ProjectInfo.pWindowInfo[i2].style&WS_BORDER) SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_SETCURSEL,1,0); 657 else SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_SETCURSEL,0,0); 658 659 if(ProjectInfo.pWindowInfo[i2].style&WS_CAPTION) SendDlgItemMessage(hwnd,IDC_STYLE_CAPTION,BM_SETCHECK,BST_CHECKED,0); 660 if(ProjectInfo.pWindowInfo[i2].style&WS_SYSMENU) SendDlgItemMessage(hwnd,IDC_STYLE_SYSMENU,BM_SETCHECK,BST_CHECKED,0); 661 if(ProjectInfo.pWindowInfo[i2].style&WS_MINIMIZEBOX) SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZEBOX,BM_SETCHECK,BST_CHECKED,0); 662 if(ProjectInfo.pWindowInfo[i2].style&WS_MAXIMIZEBOX) SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZEBOX,BM_SETCHECK,BST_CHECKED,0); 663 if(ProjectInfo.pWindowInfo[i2].style&WS_MINIMIZE) SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZE,BM_SETCHECK,BST_CHECKED,0); 664 if(ProjectInfo.pWindowInfo[i2].style&WS_MAXIMIZE) SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZE,BM_SETCHECK,BST_CHECKED,0); 665 if(ProjectInfo.pWindowInfo[i2].style&WS_HSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLLBAR,BM_SETCHECK,BST_CHECKED,0); 666 if(ProjectInfo.pWindowInfo[i2].style&WS_VSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLLBAR,BM_SETCHECK,BST_CHECKED,0); 667 if(ProjectInfo.pWindowInfo[i2].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 668 if(ProjectInfo.pWindowInfo[i2].style&WS_CLIPSIBLINGS) SendDlgItemMessage(hwnd,IDC_STYLE_CLIPSIBLINGS,BM_SETCHECK,BST_CHECKED,0); 669 if(ProjectInfo.pWindowInfo[i2].style&WS_CLIPCHILDREN) SendDlgItemMessage(hwnd,IDC_STYLE_CLIPCHILDREN,BM_SETCHECK,BST_CHECKED,0); 670 if(ProjectInfo.pWindowInfo[i2].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 671 672 SetDlgItemText(hwnd,IDC_SETFONT,ProjectInfo.pWindowInfo[i2].LogFont.lfFaceName); 673 674 RadProperty_Window_Window_StylingOrder(hwnd,&ProjectInfo.pWindowInfo[i2].style); 675 676 677 ////////// 678 //タイプ 679 switch(ProjectInfo.pWindowInfo[i2].type){ 680 case WNDTYPE_DEFAULT: 681 SendDlgItemMessage(hwnd,IDC_DEFWINDOW,BM_SETCHECK,BST_CHECKED,0); 682 break; 683 case WNDTYPE_MODALDLG: 684 SendDlgItemMessage(hwnd,IDC_MODALDLG,BM_SETCHECK,BST_CHECKED,0); 685 break; 686 case WNDTYPE_MODELESSDLG: 687 SendDlgItemMessage(hwnd,IDC_MODELESSDLG,BM_SETCHECK,BST_CHECKED,0); 688 break; 689 } 690 691 692 bInitial=0; 693 break; 633 if(i4==0&&pWindowInfo->IconResName){ 634 //アイコンが存在しない場合、無効にする 635 HeapDefaultFree(pWindowInfo->IconResName); 636 pWindowInfo->IconResName=0; 637 DrawRadWindow(i,pWindowInfo); 638 } 639 SendDlgItemMessage(hwnd,IDC_ICONRES,CB_SETCURSEL,i4,0); 640 641 642 //////////// 643 // スタイル 644 //////////// 645 646 //"オーバーラップ" 647 SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_OVERLAPPED); 648 //"ポップアップ" 649 SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_POPUP); 650 //"チャイルド" 651 SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_CHILD); 652 653 if(pWindowInfo->style&WS_POPUP) SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_SETCURSEL,1,0); 654 else if(pWindowInfo->style&WS_CHILD) SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_SETCURSEL,2,0); 655 else SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_SETCURSEL,0,0); 656 657 //"枠なし" 658 SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_FRAME_NONE); 659 //"細枠" 660 SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_FRAME_THICK); 661 //"サイズ変更枠" 662 SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_FRAME_BORDER); 663 664 //WS_CAPTION(WS_BORDER含む)を考慮してWS_THICKFRAMEを最初に比較する 665 if(pWindowInfo->style&WS_THICKFRAME) SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_SETCURSEL,2,0); 666 else if(pWindowInfo->style&WS_BORDER) SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_SETCURSEL,1,0); 667 else SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_SETCURSEL,0,0); 668 669 if(pWindowInfo->style&WS_CAPTION) SendDlgItemMessage(hwnd,IDC_STYLE_CAPTION,BM_SETCHECK,BST_CHECKED,0); 670 if(pWindowInfo->style&WS_SYSMENU) SendDlgItemMessage(hwnd,IDC_STYLE_SYSMENU,BM_SETCHECK,BST_CHECKED,0); 671 if(pWindowInfo->style&WS_MINIMIZEBOX) SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZEBOX,BM_SETCHECK,BST_CHECKED,0); 672 if(pWindowInfo->style&WS_MAXIMIZEBOX) SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZEBOX,BM_SETCHECK,BST_CHECKED,0); 673 if(pWindowInfo->style&WS_MINIMIZE) SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZE,BM_SETCHECK,BST_CHECKED,0); 674 if(pWindowInfo->style&WS_MAXIMIZE) SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZE,BM_SETCHECK,BST_CHECKED,0); 675 if(pWindowInfo->style&WS_HSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLLBAR,BM_SETCHECK,BST_CHECKED,0); 676 if(pWindowInfo->style&WS_VSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLLBAR,BM_SETCHECK,BST_CHECKED,0); 677 if(pWindowInfo->style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 678 if(pWindowInfo->style&WS_CLIPSIBLINGS) SendDlgItemMessage(hwnd,IDC_STYLE_CLIPSIBLINGS,BM_SETCHECK,BST_CHECKED,0); 679 if(pWindowInfo->style&WS_CLIPCHILDREN) SendDlgItemMessage(hwnd,IDC_STYLE_CLIPCHILDREN,BM_SETCHECK,BST_CHECKED,0); 680 if(pWindowInfo->style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 681 682 SetDlgItemText(hwnd,IDC_SETFONT,pWindowInfo->LogFont.lfFaceName); 683 684 RadProperty_Window_Window_StylingOrder(hwnd,&pWindowInfo->style); 685 686 687 ////////// 688 //タイプ 689 switch(pWindowInfo->type){ 690 case WNDTYPE_DEFAULT: 691 SendDlgItemMessage(hwnd,IDC_DEFWINDOW,BM_SETCHECK,BST_CHECKED,0); 692 break; 693 case WNDTYPE_MODALDLG: 694 SendDlgItemMessage(hwnd,IDC_MODALDLG,BM_SETCHECK,BST_CHECKED,0); 695 break; 696 case WNDTYPE_MODELESSDLG: 697 SendDlgItemMessage(hwnd,IDC_MODELESSDLG,BM_SETCHECK,BST_CHECKED,0); 698 break; 699 } 700 701 702 bInitial=0; 703 break; 704 } 694 705 case WM_COMMAND: 695 706 switch(LOWORD(wParam)){ 696 707 case IDC_RENAMEWINDOW: 697 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_WINDOW_RENAME),hwnd,(DLGPROC)DlgRadProperty_Window_Rename)) return 1; 698 i=GetWndNum(GetParent(GetParent(hwnd))); 699 i2=GetWndInfoNum(MdiInfo[i].path); 700 SetDlgItemText(hwnd,IDC_WINDOWNAME,ProjectInfo.pWindowInfo[i2].name); 701 SetDlgItemText(hwnd,IDC_HANDLE,ProjectInfo.pWindowInfo[i2].HandleName); 702 return 1; 708 { 709 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_WINDOW_RENAME),hwnd,(DLGPROC)DlgRadProperty_Window_Rename)) return 1; 710 i=GetWndNum(GetParent(GetParent(hwnd))); 711 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 712 SetDlgItemText(hwnd,IDC_WINDOWNAME,pWindowInfo->name); 713 SetDlgItemText(hwnd,IDC_HANDLE,pWindowInfo->HandleName); 714 return 1; 715 } 703 716 case IDC_RENAMECAPTION: 704 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_RENAMECAPTION),hwnd,(DLGPROC)DlgRadProperty_Item_RenameCaption)) return 1; 705 i=GetWndNum(GetParent(GetParent(hwnd))); 706 i2=GetWndInfoNum(MdiInfo[i].path); 707 SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[i2].caption); 708 return 1; 717 { 718 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_RENAMECAPTION),hwnd,(DLGPROC)DlgRadProperty_Item_RenameCaption)) return 1; 719 i=GetWndNum(GetParent(GetParent(hwnd))); 720 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 721 SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->caption); 722 return 1; 723 } 709 724 case IDC_SETFONT: 710 i=GetWndNum(GetParent(GetParent(hwnd))); 711 i2=GetWndInfoNum(MdiInfo[i].path); 712 LOGFONT lf; 713 lf=ProjectInfo.pWindowInfo[i2].LogFont; 714 if(!SetFontDialog(hwnd,&ProjectInfo.pWindowInfo[i2].LogFont,0)) return 1; 715 716 //変更情報 717 Rad_NoticeChanging(i,RAD_UNDO_FONT,SELECT_WINDOW,(DWORD)&lf); 718 719 SetDlgItemText(hwnd,IDC_SETFONT,ProjectInfo.pWindowInfo[i2].LogFont.lfFaceName); 720 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 721 return 1; 725 { 726 i=GetWndNum(GetParent(GetParent(hwnd))); 727 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 728 LOGFONT lf; 729 lf=pWindowInfo->LogFont; 730 if(!SetFontDialog(hwnd,&pWindowInfo->LogFont,0)) return 1; 731 732 //変更情報 733 Rad_NoticeChanging(i,RAD_UNDO_FONT,SELECT_WINDOW,(DWORD)&lf); 734 735 SetDlgItemText(hwnd,IDC_SETFONT,pWindowInfo->LogFont.lfFaceName); 736 DrawRadWindow(i,pWindowInfo); 737 return 1; 738 } 722 739 case IDC_BGCOLOR: 723 740 if(HIWORD(wParam)==CBN_SELCHANGE){ 724 741 i=GetWndNum(GetParent(GetParent(hwnd))); 725 i2=GetWndInfoNum(MdiInfo[i].path);742 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 726 743 727 744 i3=SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_GETCURSEL,0,0); … … 730 747 731 748 //変更情報 732 Rad_NoticeChanging(i,RAD_UNDO_BGCOLOR,SELECT_WINDOW, ProjectInfo.pWindowInfo[i2].bgColor);733 734 ProjectInfo.pWindowInfo[i2].bgColor=COLOR_3DFACE;749 Rad_NoticeChanging(i,RAD_UNDO_BGCOLOR,SELECT_WINDOW,pWindowInfo->bgColor); 750 751 pWindowInfo->bgColor=COLOR_3DFACE; 735 752 } 736 753 else if(i3==1){ … … 756 773 cc.lStructSize=sizeof(CHOOSECOLOR); 757 774 cc.hwndOwner=hwnd; 758 if( ProjectInfo.pWindowInfo[i2].bgColor<=0)759 cc.rgbResult=- ProjectInfo.pWindowInfo[i2].bgColor;775 if(pWindowInfo->bgColor<=0) 776 cc.rgbResult=-pWindowInfo->bgColor; 760 777 else cc.rgbResult=RGB(255,255,255); 761 778 cc.lpCustColors=CusColors; … … 763 780 if(!ChooseColor(&cc)){ 764 781 //キャンセル動作 765 if( ProjectInfo.pWindowInfo[i2].bgColor==COLOR_3DFACE){782 if(pWindowInfo->bgColor==COLOR_3DFACE){ 766 783 //3DFACE 767 784 SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,0,0); 768 785 } 769 else if( ProjectInfo.pWindowInfo[i2].bgColor<=0){786 else if(pWindowInfo->bgColor<=0){ 770 787 //色指定 771 788 SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,1,0); 772 789 } 773 else if( ProjectInfo.pWindowInfo[i2].bgColor>=0x1000){790 else if(pWindowInfo->bgColor>=0x1000){ 774 791 //ビットマップ指定 775 SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,2+ ProjectInfo.pWindowInfo[i2].bgColor-0x1000,0);792 SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,2+pWindowInfo->bgColor-0x1000,0); 776 793 } 777 794 return 1; … … 779 796 780 797 //変更情報 781 Rad_NoticeChanging(i,RAD_UNDO_BGCOLOR,SELECT_WINDOW, ProjectInfo.pWindowInfo[i2].bgColor);782 783 ProjectInfo.pWindowInfo[i2].bgColor=-(int)cc.rgbResult;798 Rad_NoticeChanging(i,RAD_UNDO_BGCOLOR,SELECT_WINDOW,pWindowInfo->bgColor); 799 800 pWindowInfo->bgColor=-(int)cc.rgbResult; 784 801 } 785 802 else{ … … 788 805 789 806 //変更情報 790 Rad_NoticeChanging(i,RAD_UNDO_BGCOLOR,SELECT_WINDOW, ProjectInfo.pWindowInfo[i2].bgColor);791 792 ProjectInfo.pWindowInfo[i2].bgColor=0x1000+i3;793 } 794 DrawRadWindow(i, &ProjectInfo.pWindowInfo[i2]);807 Rad_NoticeChanging(i,RAD_UNDO_BGCOLOR,SELECT_WINDOW,pWindowInfo->bgColor); 808 809 pWindowInfo->bgColor=0x1000+i3; 810 } 811 DrawRadWindow(i,pWindowInfo); 795 812 return 1; 796 813 } … … 799 816 if(HIWORD(wParam)==CBN_SELCHANGE){ 800 817 i=GetWndNum(GetParent(GetParent(hwnd))); 801 i2=GetWndInfoNum(MdiInfo[i].path);818 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 802 819 803 820 //変更情報 804 Rad_NoticeChanging(i,RAD_UNDO_WINDOWMENU,SELECT_WINDOW,(long) ProjectInfo.pWindowInfo[i2].MenuID);821 Rad_NoticeChanging(i,RAD_UNDO_WINDOWMENU,SELECT_WINDOW,(long)pWindowInfo->MenuID); 805 822 806 823 i3=SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_GETCURSEL,0,0); 807 if( ProjectInfo.pWindowInfo[i2].MenuID)808 HeapDefaultFree( ProjectInfo.pWindowInfo[i2].MenuID);809 if(i3==0) ProjectInfo.pWindowInfo[i2].MenuID=0;824 if(pWindowInfo->MenuID) 825 HeapDefaultFree(pWindowInfo->MenuID); 826 if(i3==0) pWindowInfo->MenuID=0; 810 827 else{ 811 ProjectInfo.pWindowInfo[i2].MenuID=(char *)HeapAlloc(hHeap,0,SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_GETLBTEXTLEN,i3,0)+1);812 SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_GETLBTEXT,i3,(long) ProjectInfo.pWindowInfo[i2].MenuID);813 } 814 DrawRadWindow(i, &ProjectInfo.pWindowInfo[i2]);828 pWindowInfo->MenuID=(char *)HeapAlloc(hHeap,0,SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_GETLBTEXTLEN,i3,0)+1); 829 SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_GETLBTEXT,i3,(long)pWindowInfo->MenuID); 830 } 831 DrawRadWindow(i,pWindowInfo); 815 832 return 1; 816 833 } … … 819 836 if(HIWORD(wParam)==CBN_SELCHANGE){ 820 837 i=GetWndNum(GetParent(GetParent(hwnd))); 821 i2=GetWndInfoNum(MdiInfo[i].path);838 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 822 839 823 840 //変更情報 824 Rad_NoticeChanging(i,RAD_UNDO_ICONRES,SELECT_WINDOW,(long) ProjectInfo.pWindowInfo[i2].IconResName);841 Rad_NoticeChanging(i,RAD_UNDO_ICONRES,SELECT_WINDOW,(long)pWindowInfo->IconResName); 825 842 826 843 i3=SendDlgItemMessage(hwnd,IDC_ICONRES,CB_GETCURSEL,0,0); 827 if( ProjectInfo.pWindowInfo[i2].IconResName)828 HeapDefaultFree( ProjectInfo.pWindowInfo[i2].IconResName);829 if(i3==0) ProjectInfo.pWindowInfo[i2].IconResName=0;844 if(pWindowInfo->IconResName) 845 HeapDefaultFree(pWindowInfo->IconResName); 846 if(i3==0) pWindowInfo->IconResName=0; 830 847 else{ 831 ProjectInfo.pWindowInfo[i2].IconResName=(char *)HeapAlloc(hHeap,0,SendDlgItemMessage(hwnd,IDC_ICONRES,CB_GETLBTEXTLEN,i3,0)+1);832 SendDlgItemMessage(hwnd,IDC_ICONRES,CB_GETLBTEXT,i3,(long) ProjectInfo.pWindowInfo[i2].IconResName);833 } 834 DrawRadWindow(i, &ProjectInfo.pWindowInfo[i2]);848 pWindowInfo->IconResName=(char *)HeapAlloc(hHeap,0,SendDlgItemMessage(hwnd,IDC_ICONRES,CB_GETLBTEXTLEN,i3,0)+1); 849 SendDlgItemMessage(hwnd,IDC_ICONRES,CB_GETLBTEXT,i3,(long)pWindowInfo->IconResName); 850 } 851 DrawRadWindow(i,pWindowInfo); 835 852 return 1; 836 853 } … … 840 857 if(HIWORD(wParam)==CBN_SELCHANGE){ 841 858 i=GetWndNum(GetParent(GetParent(hwnd))); 842 i2=GetWndInfoNum(MdiInfo[i].path);859 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 843 860 844 861 //変更情報 845 Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW, ProjectInfo.pWindowInfo[i2].style);862 Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style); 846 863 847 864 i3=SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_GETCURSEL,0,0); 848 ProjectInfo.pWindowInfo[i2].style&=0x3FFFFFFF;849 if(i3==1) ProjectInfo.pWindowInfo[i2].style|=WS_POPUP;850 else if(i3==2) ProjectInfo.pWindowInfo[i2].style|=WS_CHILD;851 RadProperty_Window_Window_StylingOrder(hwnd,& ProjectInfo.pWindowInfo[i2].style);852 DrawRadWindow(i, &ProjectInfo.pWindowInfo[i2]);865 pWindowInfo->style&=0x3FFFFFFF; 866 if(i3==1) pWindowInfo->style|=WS_POPUP; 867 else if(i3==2) pWindowInfo->style|=WS_CHILD; 868 RadProperty_Window_Window_StylingOrder(hwnd,&pWindowInfo->style); 869 DrawRadWindow(i,pWindowInfo); 853 870 return 1; 854 871 } … … 857 874 if(HIWORD(wParam)==CBN_SELCHANGE){ 858 875 i=GetWndNum(GetParent(GetParent(hwnd))); 859 i2=GetWndInfoNum(MdiInfo[i].path);876 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 860 877 861 878 //変更情報 862 Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW, ProjectInfo.pWindowInfo[i2].style);879 Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style); 863 880 864 881 i3=SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_GETCURSEL,0,0); 865 ProjectInfo.pWindowInfo[i2].style&=~(WS_BORDER|WS_THICKFRAME);866 if(i3==1) ProjectInfo.pWindowInfo[i2].style|=WS_BORDER;882 pWindowInfo->style&=~(WS_BORDER|WS_THICKFRAME); 883 if(i3==1) pWindowInfo->style|=WS_BORDER; 867 884 else if(i3==2){ 868 ProjectInfo.pWindowInfo[i2].style|=WS_BORDER;869 ProjectInfo.pWindowInfo[i2].style|=WS_THICKFRAME;870 } 871 RadProperty_Window_Border_StylingOrder(hwnd,& ProjectInfo.pWindowInfo[i2].style);872 DrawRadWindow(i, &ProjectInfo.pWindowInfo[i2]);885 pWindowInfo->style|=WS_BORDER; 886 pWindowInfo->style|=WS_THICKFRAME; 887 } 888 RadProperty_Window_Border_StylingOrder(hwnd,&pWindowInfo->style); 889 DrawRadWindow(i,pWindowInfo); 873 890 return 1; 874 891 } … … 878 895 if(HIWORD(wParam)==BN_CLICKED){ 879 896 i=GetWndNum(GetParent(GetParent(hwnd))); 880 i2=GetWndInfoNum(MdiInfo[i].path);897 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 881 898 882 899 //変更情報 883 Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW, ProjectInfo.pWindowInfo[i2].style);900 Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style); 884 901 885 902 if(SendDlgItemMessage(hwnd,IDC_STYLE_CAPTION,BM_GETCHECK,0,0)) 886 ProjectInfo.pWindowInfo[i2].style|=WS_CAPTION;903 pWindowInfo->style|=WS_CAPTION; 887 904 else 888 ProjectInfo.pWindowInfo[i2].style&=~WS_CAPTION;889 RadProperty_Window_Caption_StylingOrder(hwnd,& ProjectInfo.pWindowInfo[i2].style);890 DrawRadWindow(i, &ProjectInfo.pWindowInfo[i2]);905 pWindowInfo->style&=~WS_CAPTION; 906 RadProperty_Window_Caption_StylingOrder(hwnd,&pWindowInfo->style); 907 DrawRadWindow(i,pWindowInfo); 891 908 return 1; 892 909 } … … 895 912 if(HIWORD(wParam)==BN_CLICKED){ 896 913 i=GetWndNum(GetParent(GetParent(hwnd))); 897 i2=GetWndInfoNum(MdiInfo[i].path);914 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 898 915 899 916 //変更情報 900 Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW, ProjectInfo.pWindowInfo[i2].style);917 Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style); 901 918 902 919 if(SendDlgItemMessage(hwnd,IDC_STYLE_SYSMENU,BM_GETCHECK,0,0)) 903 ProjectInfo.pWindowInfo[i2].style|=WS_SYSMENU;920 pWindowInfo->style|=WS_SYSMENU; 904 921 else 905 ProjectInfo.pWindowInfo[i2].style&=~WS_SYSMENU;906 DrawRadWindow(i, &ProjectInfo.pWindowInfo[i2]);922 pWindowInfo->style&=~WS_SYSMENU; 923 DrawRadWindow(i,pWindowInfo); 907 924 return 1; 908 925 } … … 911 928 if(HIWORD(wParam)==BN_CLICKED){ 912 929 i=GetWndNum(GetParent(GetParent(hwnd))); 913 i2=GetWndInfoNum(MdiInfo[i].path);930 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 914 931 915 932 //変更情報 916 Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW, ProjectInfo.pWindowInfo[i2].style);933 Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style); 917 934 918 935 if(SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZEBOX,BM_GETCHECK,0,0)) 919 ProjectInfo.pWindowInfo[i2].style|=WS_MINIMIZEBOX;936 pWindowInfo->style|=WS_MINIMIZEBOX; 920 937 else 921 ProjectInfo.pWindowInfo[i2].style&=~WS_MINIMIZEBOX;922 DrawRadWindow(i, &ProjectInfo.pWindowInfo[i2]);938 pWindowInfo->style&=~WS_MINIMIZEBOX; 939 DrawRadWindow(i,pWindowInfo); 923 940 return 1; 924 941 } … … 927 944 if(HIWORD(wParam)==BN_CLICKED){ 928 945 i=GetWndNum(GetParent(GetParent(hwnd))); 929 i2=GetWndInfoNum(MdiInfo[i].path);946 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 930 947 931 948 //変更情報 932 Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW, ProjectInfo.pWindowInfo[i2].style);949 Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style); 933 950 934 951 if(SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZEBOX,BM_GETCHECK,0,0)) 935 ProjectInfo.pWindowInfo[i2].style|=WS_MAXIMIZEBOX;952 pWindowInfo->style|=WS_MAXIMIZEBOX; 936 953 else 937 ProjectInfo.pWindowInfo[i2].style&=~WS_MAXIMIZEBOX;938 DrawRadWindow(i, &ProjectInfo.pWindowInfo[i2]);954 pWindowInfo->style&=~WS_MAXIMIZEBOX; 955 DrawRadWindow(i,pWindowInfo); 939 956 return 1; 940 957 } … … 943 960 if(HIWORD(wParam)==BN_CLICKED){ 944 961 i=GetWndNum(GetParent(GetParent(hwnd))); 945 i2=GetWndInfoNum(MdiInfo[i].path);962 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 946 963 947 964 //変更情報 948 Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW, ProjectInfo.pWindowInfo[i2].style);965 Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style); 949 966 950 967 if(SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZE,BM_GETCHECK,0,0)) 951 ProjectInfo.pWindowInfo[i2].style|=WS_MINIMIZE;968 pWindowInfo->style|=WS_MINIMIZE; 952 969 else 953 ProjectInfo.pWindowInfo[i2].style&=~WS_MINIMIZE;954 DrawRadWindow(i, &ProjectInfo.pWindowInfo[i2]);970 pWindowInfo->style&=~WS_MINIMIZE; 971 DrawRadWindow(i,pWindowInfo); 955 972 return 1; 956 973 } … … 959 976 if(HIWORD(wParam)==BN_CLICKED){ 960 977 i=GetWndNum(GetParent(GetParent(hwnd))); 961 i2=GetWndInfoNum(MdiInfo[i].path);978 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 962 979 963 980 //変更情報 964 Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW, ProjectInfo.pWindowInfo[i2].style);981 Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style); 965 982 966 983 if(SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZE,BM_GETCHECK,0,0)) 967 ProjectInfo.pWindowInfo[i2].style|=WS_MAXIMIZE;984 pWindowInfo->style|=WS_MAXIMIZE; 968 985 else 969 ProjectInfo.pWindowInfo[i2].style&=~WS_MAXIMIZE;970 DrawRadWindow(i, &ProjectInfo.pWindowInfo[i2]);986 pWindowInfo->style&=~WS_MAXIMIZE; 987 DrawRadWindow(i,pWindowInfo); 971 988 return 1; 972 989 } … … 974 991 if(HIWORD(wParam)==BN_CLICKED){ 975 992 i=GetWndNum(GetParent(GetParent(hwnd))); 976 i2=GetWndInfoNum(MdiInfo[i].path);993 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 977 994 978 995 //変更情報 979 Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW, ProjectInfo.pWindowInfo[i2].style);996 Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style); 980 997 981 998 if(SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLLBAR,BM_GETCHECK,0,0)) 982 ProjectInfo.pWindowInfo[i2].style|=WS_HSCROLL;999 pWindowInfo->style|=WS_HSCROLL; 983 1000 else 984 ProjectInfo.pWindowInfo[i2].style&=~WS_HSCROLL;985 DrawRadWindow(i, &ProjectInfo.pWindowInfo[i2]);1001 pWindowInfo->style&=~WS_HSCROLL; 1002 DrawRadWindow(i,pWindowInfo); 986 1003 return 1; 987 1004 } … … 989 1006 if(HIWORD(wParam)==BN_CLICKED){ 990 1007 i=GetWndNum(GetParent(GetParent(hwnd))); 991 i2=GetWndInfoNum(MdiInfo[i].path);1008 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 992 1009 993 1010 //変更情報 994 Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW, ProjectInfo.pWindowInfo[i2].style);1011 Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style); 995 1012 996 1013 if(SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLLBAR,BM_GETCHECK,0,0)) 997 ProjectInfo.pWindowInfo[i2].style|=WS_VSCROLL;1014 pWindowInfo->style|=WS_VSCROLL; 998 1015 else 999 ProjectInfo.pWindowInfo[i2].style&=~WS_VSCROLL;1000 DrawRadWindow(i, &ProjectInfo.pWindowInfo[i2]);1016 pWindowInfo->style&=~WS_VSCROLL; 1017 DrawRadWindow(i,pWindowInfo); 1001 1018 return 1; 1002 1019 } … … 1005 1022 if(HIWORD(wParam)==BN_CLICKED){ 1006 1023 i=GetWndNum(GetParent(GetParent(hwnd))); 1007 i2=GetWndInfoNum(MdiInfo[i].path);1024 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 1008 1025 1009 1026 //変更情報 1010 Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW, ProjectInfo.pWindowInfo[i2].style);1027 Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style); 1011 1028 1012 1029 if(SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_GETCHECK,0,0)) 1013 ProjectInfo.pWindowInfo[i2].style|=WS_DISABLED;1030 pWindowInfo->style|=WS_DISABLED; 1014 1031 else 1015 ProjectInfo.pWindowInfo[i2].style&=~WS_DISABLED;1016 DrawRadWindow(i, &ProjectInfo.pWindowInfo[i2]);1032 pWindowInfo->style&=~WS_DISABLED; 1033 DrawRadWindow(i,pWindowInfo); 1017 1034 return 1; 1018 1035 } … … 1021 1038 if(HIWORD(wParam)==BN_CLICKED){ 1022 1039 i=GetWndNum(GetParent(GetParent(hwnd))); 1023 i2=GetWndInfoNum(MdiInfo[i].path);1040 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 1024 1041 1025 1042 //変更情報 1026 Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW, ProjectInfo.pWindowInfo[i2].style);1043 Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style); 1027 1044 1028 1045 if(SendDlgItemMessage(hwnd,IDC_STYLE_CLIPSIBLINGS,BM_GETCHECK,0,0)) 1029 ProjectInfo.pWindowInfo[i2].style|=WS_CLIPSIBLINGS;1046 pWindowInfo->style|=WS_CLIPSIBLINGS; 1030 1047 else 1031 ProjectInfo.pWindowInfo[i2].style&=~WS_CLIPSIBLINGS;1032 DrawRadWindow(i, &ProjectInfo.pWindowInfo[i2]);1048 pWindowInfo->style&=~WS_CLIPSIBLINGS; 1049 DrawRadWindow(i,pWindowInfo); 1033 1050 return 1; 1034 1051 } … … 1037 1054 if(HIWORD(wParam)==BN_CLICKED){ 1038 1055 i=GetWndNum(GetParent(GetParent(hwnd))); 1039 i2=GetWndInfoNum(MdiInfo[i].path);1056 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 1040 1057 1041 1058 //変更情報 1042 Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW, ProjectInfo.pWindowInfo[i2].style);1059 Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style); 1043 1060 1044 1061 if(SendDlgItemMessage(hwnd,IDC_STYLE_CLIPCHILDREN,BM_GETCHECK,0,0)) 1045 ProjectInfo.pWindowInfo[i2].style|=WS_CLIPCHILDREN;1062 pWindowInfo->style|=WS_CLIPCHILDREN; 1046 1063 else 1047 ProjectInfo.pWindowInfo[i2].style&=~WS_CLIPCHILDREN;1048 DrawRadWindow(i, &ProjectInfo.pWindowInfo[i2]);1064 pWindowInfo->style&=~WS_CLIPCHILDREN; 1065 DrawRadWindow(i,pWindowInfo); 1049 1066 return 1; 1050 1067 } … … 1053 1070 if(HIWORD(wParam)==BN_CLICKED){ 1054 1071 i=GetWndNum(GetParent(GetParent(hwnd))); 1055 i2=GetWndInfoNum(MdiInfo[i].path);1072 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 1056 1073 1057 1074 //変更情報 1058 Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW, ProjectInfo.pWindowInfo[i2].style);1075 Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,pWindowInfo->style); 1059 1076 1060 1077 if(SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_GETCHECK,0,0)) 1061 ProjectInfo.pWindowInfo[i2].style|=WS_VISIBLE;1078 pWindowInfo->style|=WS_VISIBLE; 1062 1079 else 1063 ProjectInfo.pWindowInfo[i2].style&=~WS_VISIBLE;1064 DrawRadWindow(i, &ProjectInfo.pWindowInfo[i2]);1080 pWindowInfo->style&=~WS_VISIBLE; 1081 DrawRadWindow(i,pWindowInfo); 1065 1082 return 1; 1066 1083 } … … 1070 1087 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_WINDOW_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Window_ExStyle)) return 1; 1071 1088 i=GetWndNum(GetParent(GetParent(hwnd))); 1072 i2=GetWndInfoNum(MdiInfo[i].path); 1073 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 1089 DrawRadWindow(i,GetWndInfo(MdiInfo[i].path)); 1074 1090 return 1; 1075 1091 … … 1079 1095 if(HIWORD(wParam)==BN_CLICKED){ 1080 1096 i=GetWndNum(GetParent(GetParent(hwnd))); 1081 i2=GetWndInfoNum(MdiInfo[i].path);1097 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 1082 1098 1083 1099 //変更情報 1084 Rad_NoticeChanging(i,RAD_UNDO_TYPE,SELECT_WINDOW, ProjectInfo.pWindowInfo[i2].type);1100 Rad_NoticeChanging(i,RAD_UNDO_TYPE,SELECT_WINDOW,pWindowInfo->type); 1085 1101 1086 1102 if(SendDlgItemMessage(hwnd,IDC_DEFWINDOW,BM_GETCHECK,0,0)) 1087 ProjectInfo.pWindowInfo[i2].type=WNDTYPE_DEFAULT;1103 pWindowInfo->type=WNDTYPE_DEFAULT; 1088 1104 else if(SendDlgItemMessage(hwnd,IDC_MODALDLG,BM_GETCHECK,0,0)) 1089 ProjectInfo.pWindowInfo[i2].type=WNDTYPE_MODALDLG;1105 pWindowInfo->type=WNDTYPE_MODALDLG; 1090 1106 else if(SendDlgItemMessage(hwnd,IDC_MODELESSDLG,BM_GETCHECK,0,0)) 1091 ProjectInfo.pWindowInfo[i2].type=WNDTYPE_MODELESSDLG;1107 pWindowInfo->type=WNDTYPE_MODELESSDLG; 1092 1108 return 1; 1093 1109 } … … 1103 1119 extern MDIINFO MdiInfo[MAX_WNDNUM]; 1104 1120 extern PROJECTINFO ProjectInfo; 1105 int i,i 2,i3;1121 int i,i3; 1106 1122 char *temporary; 1107 1123 POINTANDSIZE PointAndSize; … … 1109 1125 switch(message){ 1110 1126 case WM_INITDIALOG: 1111 SetPosCenter(hwnd); 1112 i=GetWndNum(GetWindow(hClient,GW_CHILD)); 1113 i2=GetWndInfoNum(MdiInfo[i].path); 1114 if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW) 1115 SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[i2].caption); 1116 else 1117 SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption); 1118 break; 1127 { 1128 SetPosCenter(hwnd); 1129 i=GetWndNum(GetWindow(hClient,GW_CHILD)); 1130 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 1131 if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW) 1132 SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->caption); 1133 else 1134 SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption); 1135 break; 1136 } 1119 1137 case WM_COMMAND: 1120 1138 switch(LOWORD(wParam)){ 1121 1139 case IDOK: 1122 i=GetWndNum(GetWindow(hClient,GW_CHILD)); 1123 i2=GetWndInfoNum(MdiInfo[i].path); 1124 1125 i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_CAPTION))+1; 1126 temporary=(char *)HeapAlloc(hHeap,0,i3); 1127 GetDlgItemText(hwnd,IDC_CAPTION,temporary,i3); 1128 if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){ 1129 if(lstrcmp(temporary,ProjectInfo.pWindowInfo[i2].caption)==0){ 1130 HeapDefaultFree(temporary); 1131 SendMessage(hwnd,WM_COMMAND,IDCANCEL,0); 1132 return 1; 1133 } 1134 1135 //変更情報を更新 1136 Rad_NoticeChanging(i,RAD_UNDO_CAPTION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)ProjectInfo.pWindowInfo[i2].caption); 1137 1138 HeapDefaultFree(ProjectInfo.pWindowInfo[i2].caption); 1139 ProjectInfo.pWindowInfo[i2].caption=temporary; 1140 { 1141 i=GetWndNum(GetWindow(hClient,GW_CHILD)); 1142 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 1143 1144 i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_CAPTION))+1; 1145 temporary=(char *)HeapAlloc(hHeap,0,i3); 1146 GetDlgItemText(hwnd,IDC_CAPTION,temporary,i3); 1147 if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){ 1148 if(lstrcmp(temporary,pWindowInfo->caption)==0){ 1149 HeapDefaultFree(temporary); 1150 SendMessage(hwnd,WM_COMMAND,IDCANCEL,0); 1151 return 1; 1152 } 1153 1154 //変更情報を更新 1155 Rad_NoticeChanging(i,RAD_UNDO_CAPTION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)pWindowInfo->caption); 1156 1157 HeapDefaultFree(pWindowInfo->caption); 1158 pWindowInfo->caption=temporary; 1159 } 1160 else{ 1161 if(lstrcmp(temporary,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption)==0){ 1162 HeapDefaultFree(temporary); 1163 SendMessage(hwnd,WM_COMMAND,IDCANCEL,0); 1164 return 1; 1165 } 1166 1167 //変更情報を更新 1168 Rad_NoticeChanging(i,RAD_UNDO_CAPTION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption); 1169 1170 HeapDefaultFree(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption); 1171 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption=temporary; 1172 1173 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_STATIC){ 1174 //スタティック テキスト 1175 //テキストが表示できるようにサイズを拡大する 1176 1177 PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].pos; 1178 PointAndSize.size=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size; 1179 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize); 1180 1181 HFONT hFont,hOldFont; 1182 hFont=CreateFontIndirect(&pWindowInfo->LogFont); 1183 hOldFont=(HFONT)SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hFont); 1184 GetTextExtentPoint32(MdiInfo[i].MdiRadInfo->hMemDC,temporary,lstrlen(temporary),&PointAndSize.size); 1185 SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hOldFont); 1186 DeleteObject(hFont); 1187 1188 //テキストの終端に余裕を持たせる 1189 PointAndSize.size.cx+=5; 1190 1191 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx<PointAndSize.size.cx) 1192 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx=PointAndSize.size.cx; 1193 } 1194 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_CHECKBOX){ 1195 //チェック ボックス 1196 //テキストが表示できるようにサイズを拡大する 1197 1198 PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].pos; 1199 PointAndSize.size=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size; 1200 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize); 1201 1202 HFONT hFont,hOldFont; 1203 hFont=CreateFontIndirect(&pWindowInfo->LogFont); 1204 hOldFont=(HFONT)SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hFont); 1205 GetTextExtentPoint32(MdiInfo[i].MdiRadInfo->hMemDC,temporary,lstrlen(temporary),&PointAndSize.size); 1206 SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hOldFont); 1207 DeleteObject(hFont); 1208 1209 //テキストの終端に余裕を持たせる 1210 PointAndSize.size.cx+=21; 1211 1212 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx<PointAndSize.size.cx) 1213 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx=PointAndSize.size.cx; 1214 } 1215 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_RADIOBUTTON){ 1216 //ラジオ ボックス 1217 //テキストが表示できるようにサイズを拡大する 1218 1219 PointAndSize.pos=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].pos; 1220 PointAndSize.size=pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size; 1221 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize); 1222 1223 HFONT hFont,hOldFont; 1224 hFont=CreateFontIndirect(&pWindowInfo->LogFont); 1225 hOldFont=(HFONT)SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hFont); 1226 GetTextExtentPoint32(MdiInfo[i].MdiRadInfo->hMemDC,temporary,lstrlen(temporary),&PointAndSize.size); 1227 SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hOldFont); 1228 DeleteObject(hFont); 1229 1230 //テキストの終端に余裕を持たせる 1231 PointAndSize.size.cx+=20; 1232 1233 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx<PointAndSize.size.cx) 1234 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx=PointAndSize.size.cx; 1235 } 1236 } 1237 DrawRadWindow(i,pWindowInfo); 1238 EndDialog(hwnd,1); 1239 return 1; 1140 1240 } 1141 else{1142 if(lstrcmp(temporary,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption)==0){1143 HeapDefaultFree(temporary);1144 SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);1145 return 1;1146 }1147 1148 //変更情報を更新1149 Rad_NoticeChanging(i,RAD_UNDO_CAPTION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);1150 1151 HeapDefaultFree(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);1152 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption=temporary;1153 1154 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_STATIC){1155 //スタティック テキスト1156 //テキストが表示できるようにサイズを拡大する1157 1158 PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].pos;1159 PointAndSize.size=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size;1160 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);1161 1162 HFONT hFont,hOldFont;1163 hFont=CreateFontIndirect(&ProjectInfo.pWindowInfo[i2].LogFont);1164 hOldFont=(HFONT)SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hFont);1165 GetTextExtentPoint32(MdiInfo[i].MdiRadInfo->hMemDC,temporary,lstrlen(temporary),&PointAndSize.size);1166 SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hOldFont);1167 DeleteObject(hFont);1168 1169 //テキストの終端に余裕を持たせる1170 PointAndSize.size.cx+=5;1171 1172 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx<PointAndSize.size.cx)1173 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx=PointAndSize.size.cx;1174 }1175 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_CHECKBOX){1176 //チェック ボックス1177 //テキストが表示できるようにサイズを拡大する1178 1179 PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].pos;1180 PointAndSize.size=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size;1181 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);1182 1183 HFONT hFont,hOldFont;1184 hFont=CreateFontIndirect(&ProjectInfo.pWindowInfo[i2].LogFont);1185 hOldFont=(HFONT)SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hFont);1186 GetTextExtentPoint32(MdiInfo[i].MdiRadInfo->hMemDC,temporary,lstrlen(temporary),&PointAndSize.size);1187 SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hOldFont);1188 DeleteObject(hFont);1189 1190 //テキストの終端に余裕を持たせる1191 PointAndSize.size.cx+=21;1192 1193 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx<PointAndSize.size.cx)1194 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx=PointAndSize.size.cx;1195 }1196 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_RADIOBUTTON){1197 //ラジオ ボックス1198 //テキストが表示できるようにサイズを拡大する1199 1200 PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].pos;1201 PointAndSize.size=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size;1202 Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);1203 1204 HFONT hFont,hOldFont;1205 hFont=CreateFontIndirect(&ProjectInfo.pWindowInfo[i2].LogFont);1206 hOldFont=(HFONT)SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hFont);1207 GetTextExtentPoint32(MdiInfo[i].MdiRadInfo->hMemDC,temporary,lstrlen(temporary),&PointAndSize.size);1208 SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hOldFont);1209 DeleteObject(hFont);1210 1211 //テキストの終端に余裕を持たせる1212 PointAndSize.size.cx+=20;1213 1214 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx<PointAndSize.size.cx)1215 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx=PointAndSize.size.cx;1216 }1217 }1218 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);1219 EndDialog(hwnd,1);1220 return 1;1221 1241 case IDCANCEL: 1222 1242 EndDialog(hwnd,0); … … 1232 1252 extern MDIINFO MdiInfo[MAX_WNDNUM]; 1233 1253 extern PROJECTINFO ProjectInfo; 1234 int i,i 2,i3;1254 int i,i3; 1235 1255 char *temporary; 1236 1256 1237 1257 switch(message){ 1238 1258 case WM_INITDIALOG: 1239 SetPosCenter(hwnd); 1240 i=GetWndNum(GetWindow(hClient,GW_CHILD)); 1241 i2=GetWndInfoNum(MdiInfo[i].path); 1242 SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 1259 { 1260 SetPosCenter(hwnd); 1261 i=GetWndNum(GetWindow(hClient,GW_CHILD)); 1262 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 1263 SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 1264 } 1243 1265 break; 1244 1266 case WM_COMMAND: 1245 1267 switch(LOWORD(wParam)){ 1246 1268 case IDOK: 1247 i=GetWndNum(GetWindow(hClient,GW_CHILD)); 1248 i2=GetWndInfoNum(MdiInfo[i].path); 1249 1250 i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_IDNAME))+1; 1251 if(i3==1){ 1252 //MsgBox "ID名を入力して下さい。" 1253 MessageBox(hOwner,STRING_ITEM_RENAME_MUST_ID,APPLICATION_NAME,MB_OK|MB_ICONEXCLAMATION); 1254 break; 1255 } 1256 temporary=(char *)HeapAlloc(hHeap,0,i3); 1257 GetDlgItemText(hwnd,IDC_IDNAME,temporary,i3); 1258 if(lstrcmp(temporary,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName)==0){ 1259 HeapDefaultFree(temporary); 1260 SendMessage(hwnd,WM_COMMAND,IDCANCEL,0); 1269 { 1270 i=GetWndNum(GetWindow(hClient,GW_CHILD)); 1271 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 1272 1273 i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_IDNAME))+1; 1274 if(i3==1){ 1275 //MsgBox "ID名を入力して下さい。" 1276 MessageBox(hOwner,STRING_ITEM_RENAME_MUST_ID,APPLICATION_NAME,MB_OK|MB_ICONEXCLAMATION); 1277 break; 1278 } 1279 temporary=(char *)HeapAlloc(hHeap,0,i3); 1280 GetDlgItemText(hwnd,IDC_IDNAME,temporary,i3); 1281 if(lstrcmp(temporary,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName)==0){ 1282 HeapDefaultFree(temporary); 1283 SendMessage(hwnd,WM_COMMAND,IDCANCEL,0); 1284 return 1; 1285 } 1286 1287 //MsgBox "アイテムのID名を変更すると、ソースコード内のID名は手動で変換する必要があります。変更しますか?" 1288 if(IDCANCEL==MessageBox(hwnd,STRING_ITEM_RENAME_CHECK,APPLICATION_NAME,MB_OKCANCEL|MB_ICONEXCLAMATION)) return 1; 1289 1290 //変更情報を更新 1291 Rad_NoticeChanging(i,RAD_UNDO_NAME,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 1292 1293 HeapDefaultFree(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 1294 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName=temporary; 1295 1296 EndDialog(hwnd,1); 1261 1297 return 1; 1262 1298 } 1263 1264 //MsgBox "アイテムのID名を変更すると、ソースコード内のID名は手動で変換する必要があります。変更しますか?"1265 if(IDCANCEL==MessageBox(hwnd,STRING_ITEM_RENAME_CHECK,APPLICATION_NAME,MB_OKCANCEL|MB_ICONEXCLAMATION)) return 1;1266 1267 //変更情報を更新1268 Rad_NoticeChanging(i,RAD_UNDO_NAME,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);1269 1270 HeapDefaultFree(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);1271 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName=temporary;1272 1273 EndDialog(hwnd,1);1274 return 1;1275 1299 case IDCANCEL: 1276 1300 EndDialog(hwnd,0); … … 1286 1310 extern PROJECTINFO ProjectInfo; 1287 1311 1312 WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum]; 1313 1288 1314 switch(LOWORD(wParam)){ 1289 1315 case IDC_RENAMEID: 1290 1316 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_RENAMEID),hwnd,(DLGPROC)DlgRadProperty_Item_RenameID)) return 1; 1291 SetDlgItemText(hwnd,IDC_IDNAME, ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].IdName);1317 SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].IdName); 1292 1318 return 1; 1293 1319 case IDC_RENAMECAPTION: 1294 1320 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_RENAMECAPTION),hwnd,(DLGPROC)DlgRadProperty_Item_RenameCaption)) return 1; 1295 SetDlgItemText(hwnd,IDC_CAPTION, ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].caption);1321 SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].caption); 1296 1322 return 1; 1297 1323 case IDC_STYLE_DISABLED: 1298 1324 if(HIWORD(wParam)==BN_CLICKED){ 1299 1325 //変更情報 1300 Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0], ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style);1326 Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style); 1301 1327 1302 1328 if(SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_GETCHECK,0,0)) 1303 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style|=WS_DISABLED;1329 pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style|=WS_DISABLED; 1304 1330 else 1305 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style&=~WS_DISABLED;1306 DrawRadWindow(WndNum, &ProjectInfo.pWindowInfo[WndInfoNum]);1331 pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style&=~WS_DISABLED; 1332 DrawRadWindow(WndNum,pWindowInfo); 1307 1333 return 1; 1308 1334 } … … 1311 1337 if(HIWORD(wParam)==BN_CLICKED){ 1312 1338 //変更情報 1313 Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0], ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style);1339 Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style); 1314 1340 1315 1341 if(SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_GETCHECK,0,0)) 1316 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style|=WS_VISIBLE;1342 pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style|=WS_VISIBLE; 1317 1343 else 1318 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style&=~WS_VISIBLE;1344 pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style&=~WS_VISIBLE; 1319 1345 return 1; 1320 1346 } … … 1323 1349 if(HIWORD(wParam)==BN_CLICKED){ 1324 1350 //変更情報 1325 Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0], ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style);1351 Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style); 1326 1352 1327 1353 if(SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_GETCHECK,0,0)) 1328 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style|=WS_GROUP;1354 pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style|=WS_GROUP; 1329 1355 else 1330 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style&=~WS_GROUP;1356 pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style&=~WS_GROUP; 1331 1357 return 1; 1332 1358 } … … 1335 1361 if(HIWORD(wParam)==BN_CLICKED){ 1336 1362 //変更情報 1337 Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0], ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style);1363 Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style); 1338 1364 1339 1365 if(SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_GETCHECK,0,0)) 1340 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style|=WS_TABSTOP;1366 pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style|=WS_TABSTOP; 1341 1367 else 1342 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style&=~WS_TABSTOP;1368 pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style&=~WS_TABSTOP; 1343 1369 return 1; 1344 1370 } … … 1350 1376 extern MDIINFO MdiInfo[MAX_WNDNUM]; 1351 1377 extern PROJECTINFO ProjectInfo; 1352 int i ,i2;1378 int i; 1353 1379 1354 1380 switch(message){ 1355 1381 case WM_INITDIALOG: 1356 SetPosCenter(hwnd); 1357 i=GetWndNum(GetWindow(hClient,GW_CHILD)); 1358 i2=GetWndInfoNum(MdiInfo[i].path); 1359 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle&WS_EX_ACCEPTFILES) SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_SETCHECK,BST_CHECKED,0); 1360 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle&WS_EX_TRANSPARENT) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_SETCHECK,BST_CHECKED,0); 1361 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle&WS_EX_DLGMODALFRAME) SendDlgItemMessage(hwnd,IDC_EXSTYLE_DLGMODALFRAME,BM_SETCHECK,BST_CHECKED,0); 1362 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle&WS_EX_CLIENTEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_SETCHECK,BST_CHECKED,0); 1363 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle&WS_EX_STATICEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_SETCHECK,BST_CHECKED,0); 1364 break; 1382 { 1383 SetPosCenter(hwnd); 1384 i=GetWndNum(GetWindow(hClient,GW_CHILD)); 1385 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 1386 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle&WS_EX_ACCEPTFILES) SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_SETCHECK,BST_CHECKED,0); 1387 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle&WS_EX_TRANSPARENT) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_SETCHECK,BST_CHECKED,0); 1388 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle&WS_EX_DLGMODALFRAME) SendDlgItemMessage(hwnd,IDC_EXSTYLE_DLGMODALFRAME,BM_SETCHECK,BST_CHECKED,0); 1389 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle&WS_EX_CLIENTEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_SETCHECK,BST_CHECKED,0); 1390 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle&WS_EX_STATICEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_SETCHECK,BST_CHECKED,0); 1391 break; 1392 } 1365 1393 case WM_COMMAND: 1366 1394 switch(LOWORD(wParam)){ 1367 1395 case IDOK: 1368 i=GetWndNum(GetWindow(hClient,GW_CHILD)); 1369 i2=GetWndInfoNum(MdiInfo[i].path); 1370 1371 DWORD style; 1372 style=0; 1373 if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_GETCHECK,0,0)) 1374 style|=WS_EX_ACCEPTFILES; 1375 if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_GETCHECK,0,0)) 1376 style|=WS_EX_TRANSPARENT; 1377 if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_DLGMODALFRAME,BM_GETCHECK,0,0)) 1378 style|=WS_EX_DLGMODALFRAME; 1379 if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_GETCHECK,0,0)) 1380 style|=WS_EX_CLIENTEDGE; 1381 if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_GETCHECK,0,0)) 1382 style|=WS_EX_STATICEDGE; 1383 1384 if(style==ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle){ 1385 SendMessage(hwnd,WM_COMMAND,IDCANCEL,0); 1396 { 1397 i=GetWndNum(GetWindow(hClient,GW_CHILD)); 1398 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 1399 1400 DWORD style; 1401 style=0; 1402 if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_GETCHECK,0,0)) 1403 style|=WS_EX_ACCEPTFILES; 1404 if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_GETCHECK,0,0)) 1405 style|=WS_EX_TRANSPARENT; 1406 if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_DLGMODALFRAME,BM_GETCHECK,0,0)) 1407 style|=WS_EX_DLGMODALFRAME; 1408 if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_GETCHECK,0,0)) 1409 style|=WS_EX_CLIENTEDGE; 1410 if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_GETCHECK,0,0)) 1411 style|=WS_EX_STATICEDGE; 1412 1413 if(style==pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle){ 1414 SendMessage(hwnd,WM_COMMAND,IDCANCEL,0); 1415 return 1; 1416 } 1417 1418 //変更情報 1419 Rad_NoticeChanging(i,RAD_UNDO_EXSTYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle); 1420 1421 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle=style; 1422 EndDialog(hwnd,1); 1386 1423 return 1; 1387 1424 } 1388 1389 //変更情報1390 Rad_NoticeChanging(i,RAD_UNDO_EXSTYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle);1391 1392 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle=style;1393 EndDialog(hwnd,1);1394 return 1;1395 1425 case IDCANCEL: 1396 1426 EndDialog(hwnd,0); … … 1414 1444 switch(message){ 1415 1445 case WM_INITDIALOG: 1416 bInitial=1; 1417 i=GetWndNum(GetParent(GetParent(hwnd))); 1418 i2=GetWndInfoNum(MdiInfo[i].path); 1419 1420 SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 1421 SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption); 1422 1423 1424 //////////// 1425 //スタイル 1426 1427 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 1428 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 1429 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0); 1430 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0); 1431 1432 if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_OWNERDRAW)==BS_OWNERDRAW) SendDlgItemMessage(hwnd,IDC_BS_OWNERDRAW,BM_SETCHECK,BST_CHECKED,0); 1433 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_DEFPUSHBUTTON) SendDlgItemMessage(hwnd,IDC_BS_DEFPUSHBUTTON,BM_SETCHECK,BST_CHECKED,0); 1434 1435 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_ICON) SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_CHECKED,0); 1436 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BITMAP) SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_CHECKED,0); 1437 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_MULTILINE) SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_SETCHECK,BST_CHECKED,0); 1438 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_NOTIFY) SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_SETCHECK,BST_CHECKED,0); 1439 1440 1441 ////////////////// 1442 // 水平方向の配置 1443 ////////////////// 1444 1445 //"デフォルト" 1446 SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT); 1447 //"左端" 1448 SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_LEFT); 1449 //"右端" 1450 SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_RIGHT); 1451 //"中央" 1452 SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_CENTER); 1453 1454 //ビットを考慮してBS_CENTERを最初に比較する 1455 if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_CENTER)==BS_CENTER) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,3,0); 1456 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_LEFT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,1,0); 1457 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_RIGHT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,2,0); 1458 else SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,0,0); 1459 1460 1461 ////////////////// 1462 // 垂直方向の配置 1463 ////////////////// 1464 1465 //"デフォルト" 1466 SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT); 1467 //"上端" 1468 SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_TOP); 1469 //"下端" 1470 SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_BOTTOM); 1471 //"中央" 1472 SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_CENTER); 1473 1474 //ビットを考慮してBS_VCENTERを最初に比較する 1475 if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_VCENTER)==BS_VCENTER) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,3,0); 1476 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_TOP) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,1,0); 1477 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BOTTOM) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,2,0); 1478 else SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,0,0); 1479 1480 1481 bInitial=0; 1482 break; 1446 { 1447 bInitial=1; 1448 i=GetWndNum(GetParent(GetParent(hwnd))); 1449 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 1450 1451 SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 1452 SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption); 1453 1454 1455 //////////// 1456 //スタイル 1457 1458 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 1459 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 1460 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0); 1461 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0); 1462 1463 if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_OWNERDRAW)==BS_OWNERDRAW) SendDlgItemMessage(hwnd,IDC_BS_OWNERDRAW,BM_SETCHECK,BST_CHECKED,0); 1464 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_DEFPUSHBUTTON) SendDlgItemMessage(hwnd,IDC_BS_DEFPUSHBUTTON,BM_SETCHECK,BST_CHECKED,0); 1465 1466 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_ICON) SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_CHECKED,0); 1467 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BITMAP) SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_CHECKED,0); 1468 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_MULTILINE) SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_SETCHECK,BST_CHECKED,0); 1469 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_NOTIFY) SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_SETCHECK,BST_CHECKED,0); 1470 1471 1472 ////////////////// 1473 // 水平方向の配置 1474 ////////////////// 1475 1476 //"デフォルト" 1477 SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT); 1478 //"左端" 1479 SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_LEFT); 1480 //"右端" 1481 SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_RIGHT); 1482 //"中央" 1483 SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_CENTER); 1484 1485 //ビットを考慮してBS_CENTERを最初に比較する 1486 if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_CENTER)==BS_CENTER) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,3,0); 1487 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_LEFT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,1,0); 1488 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_RIGHT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,2,0); 1489 else SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,0,0); 1490 1491 1492 ////////////////// 1493 // 垂直方向の配置 1494 ////////////////// 1495 1496 //"デフォルト" 1497 SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT); 1498 //"上端" 1499 SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_TOP); 1500 //"下端" 1501 SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_BOTTOM); 1502 //"中央" 1503 SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_CENTER); 1504 1505 //ビットを考慮してBS_VCENTERを最初に比較する 1506 if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_VCENTER)==BS_VCENTER) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,3,0); 1507 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_TOP) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,1,0); 1508 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BOTTOM) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,2,0); 1509 else SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,0,0); 1510 1511 1512 bInitial=0; 1513 break; 1514 } 1483 1515 case WM_COMMAND: 1484 1485 i=GetWndNum(GetParent(GetParent(hwnd))); 1486 if(i==-1) return 1; 1487 i2=GetWndInfoNum(MdiInfo[i].path); 1488 1489 //共通スタイル 1490 if(bInitial==0){ 1491 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1; 1492 } 1493 1494 switch(LOWORD(wParam)){ 1495 case IDC_BS_DEFPUSHBUTTON: 1496 if(HIWORD(wParam)==BN_CLICKED){ 1497 //変更情報 1498 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1499 1500 if(SendDlgItemMessage(hwnd,IDC_BS_DEFPUSHBUTTON,BM_GETCHECK,0,0)){ 1501 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_OWNERDRAW; 1502 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_DEFPUSHBUTTON; 1503 SendDlgItemMessage(hwnd,IDC_BS_OWNERDRAW,BM_SETCHECK,BST_UNCHECKED,0); 1504 } 1505 else 1506 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_DEFPUSHBUTTON; 1507 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 1516 { 1517 i=GetWndNum(GetParent(GetParent(hwnd))); 1518 if(i==-1) return 1; 1519 i2=GetWndInfoNum(MdiInfo[i].path); 1520 WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[i2]; 1521 1522 //共通スタイル 1523 if(bInitial==0){ 1524 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1; 1525 } 1526 1527 switch(LOWORD(wParam)){ 1528 case IDC_BS_DEFPUSHBUTTON: 1529 if(HIWORD(wParam)==BN_CLICKED){ 1530 //変更情報 1531 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1532 1533 if(SendDlgItemMessage(hwnd,IDC_BS_DEFPUSHBUTTON,BM_GETCHECK,0,0)){ 1534 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_OWNERDRAW; 1535 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_DEFPUSHBUTTON; 1536 SendDlgItemMessage(hwnd,IDC_BS_OWNERDRAW,BM_SETCHECK,BST_UNCHECKED,0); 1537 } 1538 else 1539 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_DEFPUSHBUTTON; 1540 DrawRadWindow(i,pWindowInfo); 1541 return 1; 1542 } 1543 break; 1544 case IDC_BS_OWNERDRAW: 1545 if(HIWORD(wParam)==BN_CLICKED){ 1546 //変更情報 1547 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1548 1549 if(SendDlgItemMessage(hwnd,IDC_BS_OWNERDRAW,BM_GETCHECK,0,0)){ 1550 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_DEFPUSHBUTTON; 1551 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_OWNERDRAW; 1552 SendDlgItemMessage(hwnd,IDC_BS_DEFPUSHBUTTON,BM_SETCHECK,BST_UNCHECKED,0); 1553 } 1554 else 1555 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_OWNERDRAW; 1556 DrawRadWindow(i,pWindowInfo); 1557 return 1; 1558 } 1559 break; 1560 case IDC_BS_ICON: 1561 if(HIWORD(wParam)==BN_CLICKED){ 1562 //変更情報 1563 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1564 1565 if(SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_GETCHECK,0,0)){ 1566 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_ICON; 1567 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP; 1568 SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_UNCHECKED,0); 1569 } 1570 else 1571 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON; 1572 DrawRadWindow(i,pWindowInfo); 1573 return 1; 1574 } 1575 break; 1576 case IDC_BS_BITMAP: 1577 if(HIWORD(wParam)==BN_CLICKED){ 1578 //変更情報 1579 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1580 1581 if(SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_GETCHECK,0,0)){ 1582 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BITMAP; 1583 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON; 1584 SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_UNCHECKED,0); 1585 } 1586 else 1587 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP; 1588 DrawRadWindow(i,pWindowInfo); 1589 return 1; 1590 } 1591 break; 1592 case IDC_BS_MULTILINE: 1593 if(HIWORD(wParam)==BN_CLICKED){ 1594 //変更情報 1595 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1596 1597 if(SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_GETCHECK,0,0)) 1598 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_MULTILINE; 1599 else 1600 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_MULTILINE; 1601 DrawRadWindow(i,pWindowInfo); 1602 return 1; 1603 } 1604 break; 1605 case IDC_BS_NOTIFY: 1606 if(HIWORD(wParam)==BN_CLICKED){ 1607 //変更情報 1608 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1609 1610 if(SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_GETCHECK,0,0)) 1611 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_NOTIFY; 1612 else 1613 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_NOTIFY; 1614 return 1; 1615 } 1616 break; 1617 1618 case IDC_BS_HPOS: 1619 if(HIWORD(wParam)==CBN_SELCHANGE){ 1620 //変更情報 1621 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1622 1623 i3=SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_GETCURSEL,0,0); 1624 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_LEFT|BS_RIGHT|BS_CENTER); 1625 if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_LEFT; 1626 else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_RIGHT; 1627 else if(i3==3) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_CENTER; 1628 DrawRadWindow(i,pWindowInfo); 1629 return 1; 1630 } 1631 break; 1632 case IDC_BS_VPOS: 1633 if(HIWORD(wParam)==CBN_SELCHANGE){ 1634 //変更情報 1635 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1636 1637 i3=SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_GETCURSEL,0,0); 1638 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_TOP|BS_BOTTOM|BS_VCENTER); 1639 if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_TOP; 1640 else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BOTTOM; 1641 else if(i3==3) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_VCENTER; 1642 DrawRadWindow(i,pWindowInfo); 1643 return 1; 1644 } 1645 break; 1646 1647 case IDC_EXSTYLE: 1648 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1; 1649 DrawRadWindow(i,pWindowInfo); 1508 1650 return 1; 1509 } 1510 break; 1511 case IDC_BS_OWNERDRAW: 1512 if(HIWORD(wParam)==BN_CLICKED){ 1513 //変更情報 1514 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1515 1516 if(SendDlgItemMessage(hwnd,IDC_BS_OWNERDRAW,BM_GETCHECK,0,0)){ 1517 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_DEFPUSHBUTTON; 1518 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_OWNERDRAW; 1519 SendDlgItemMessage(hwnd,IDC_BS_DEFPUSHBUTTON,BM_SETCHECK,BST_UNCHECKED,0); 1520 } 1521 else 1522 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_OWNERDRAW; 1523 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 1524 return 1; 1525 } 1526 break; 1527 case IDC_BS_ICON: 1528 if(HIWORD(wParam)==BN_CLICKED){ 1529 //変更情報 1530 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1531 1532 if(SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_GETCHECK,0,0)){ 1533 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_ICON; 1534 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP; 1535 SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_UNCHECKED,0); 1536 } 1537 else 1538 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON; 1539 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 1540 return 1; 1541 } 1542 break; 1543 case IDC_BS_BITMAP: 1544 if(HIWORD(wParam)==BN_CLICKED){ 1545 //変更情報 1546 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1547 1548 if(SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_GETCHECK,0,0)){ 1549 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BITMAP; 1550 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON; 1551 SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_UNCHECKED,0); 1552 } 1553 else 1554 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP; 1555 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 1556 return 1; 1557 } 1558 break; 1559 case IDC_BS_MULTILINE: 1560 if(HIWORD(wParam)==BN_CLICKED){ 1561 //変更情報 1562 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1563 1564 if(SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_GETCHECK,0,0)) 1565 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_MULTILINE; 1566 else 1567 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_MULTILINE; 1568 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 1569 return 1; 1570 } 1571 break; 1572 case IDC_BS_NOTIFY: 1573 if(HIWORD(wParam)==BN_CLICKED){ 1574 //変更情報 1575 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1576 1577 if(SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_GETCHECK,0,0)) 1578 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_NOTIFY; 1579 else 1580 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_NOTIFY; 1581 return 1; 1582 } 1583 break; 1584 1585 case IDC_BS_HPOS: 1586 if(HIWORD(wParam)==CBN_SELCHANGE){ 1587 //変更情報 1588 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1589 1590 i3=SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_GETCURSEL,0,0); 1591 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_LEFT|BS_RIGHT|BS_CENTER); 1592 if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_LEFT; 1593 else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_RIGHT; 1594 else if(i3==3) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_CENTER; 1595 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 1596 return 1; 1597 } 1598 break; 1599 case IDC_BS_VPOS: 1600 if(HIWORD(wParam)==CBN_SELCHANGE){ 1601 //変更情報 1602 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1603 1604 i3=SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_GETCURSEL,0,0); 1605 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_TOP|BS_BOTTOM|BS_VCENTER); 1606 if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_TOP; 1607 else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BOTTOM; 1608 else if(i3==3) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_VCENTER; 1609 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 1610 return 1; 1611 } 1612 break; 1613 1614 case IDC_EXSTYLE: 1615 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1; 1616 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 1617 return 1; 1618 } 1619 break; 1651 } 1652 break; 1653 } 1620 1654 } 1621 1655 return 0; … … 1633 1667 switch(message){ 1634 1668 case WM_INITDIALOG: 1635 bInitial=1; 1636 i=GetWndNum(GetParent(GetParent(hwnd))); 1637 i2=GetWndInfoNum(MdiInfo[i].path); 1638 1639 SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 1640 SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption); 1641 1642 1643 //////////// 1644 //スタイル 1645 1646 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 1647 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 1648 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0); 1649 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0); 1650 1651 if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_AUTOCHECKBOX)==BS_AUTOCHECKBOX) SendDlgItemMessage(hwnd,IDC_BS_AUTO,BM_SETCHECK,BST_CHECKED,0); 1652 if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_AUTO3STATE)==BS_AUTO3STATE){ 1653 SendDlgItemMessage(hwnd,IDC_BS_AUTO,BM_SETCHECK,BST_CHECKED,0); 1654 SendDlgItemMessage(hwnd,IDC_BS_3STATE,BM_SETCHECK,BST_CHECKED,0); 1655 } 1656 if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_3STATE)==BS_3STATE) SendDlgItemMessage(hwnd,IDC_BS_3STATE,BM_SETCHECK,BST_CHECKED,0); 1657 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_PUSHLIKE) SendDlgItemMessage(hwnd,IDC_BS_PUSHLIKE,BM_SETCHECK,BST_CHECKED,0); 1658 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_LEFTTEXT) SendDlgItemMessage(hwnd,IDC_BS_LEFTTEXT,BM_SETCHECK,BST_CHECKED,0); 1659 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_ICON) SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_CHECKED,0); 1660 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BITMAP) SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_CHECKED,0); 1661 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_MULTILINE) SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_SETCHECK,BST_CHECKED,0); 1662 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_NOTIFY) SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_SETCHECK,BST_CHECKED,0); 1663 1664 1665 ////////////////// 1666 // 水平方向の配置 1667 ////////////////// 1668 1669 //"デフォルト" 1670 SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT); 1671 //"左端" 1672 SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_LEFT); 1673 //"右端" 1674 SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_RIGHT); 1675 //"中央" 1676 SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_CENTER); 1677 1678 //ビットを考慮してBS_CENTERを最初に比較する 1679 if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_CENTER)==BS_CENTER) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,3,0); 1680 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_LEFT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,1,0); 1681 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_RIGHT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,2,0); 1682 else SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,0,0); 1683 1684 1685 ////////////////// 1686 // 垂直方向の配置 1687 ////////////////// 1688 1689 //"デフォルト" 1690 SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT); 1691 //"上端" 1692 SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_TOP); 1693 //"下端" 1694 SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_BOTTOM); 1695 //"中央" 1696 SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_CENTER); 1697 1698 //ビットを考慮してBS_VCENTERを最初に比較する 1699 if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_VCENTER)==BS_VCENTER) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,3,0); 1700 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_TOP) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,1,0); 1701 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BOTTOM) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,2,0); 1702 else SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,0,0); 1703 1704 1705 bInitial=0; 1706 break; 1669 { 1670 bInitial=1; 1671 i=GetWndNum(GetParent(GetParent(hwnd))); 1672 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 1673 1674 SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 1675 SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption); 1676 1677 1678 //////////// 1679 //スタイル 1680 1681 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 1682 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 1683 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0); 1684 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0); 1685 1686 if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_AUTOCHECKBOX)==BS_AUTOCHECKBOX) SendDlgItemMessage(hwnd,IDC_BS_AUTO,BM_SETCHECK,BST_CHECKED,0); 1687 if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_AUTO3STATE)==BS_AUTO3STATE){ 1688 SendDlgItemMessage(hwnd,IDC_BS_AUTO,BM_SETCHECK,BST_CHECKED,0); 1689 SendDlgItemMessage(hwnd,IDC_BS_3STATE,BM_SETCHECK,BST_CHECKED,0); 1690 } 1691 if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_3STATE)==BS_3STATE) SendDlgItemMessage(hwnd,IDC_BS_3STATE,BM_SETCHECK,BST_CHECKED,0); 1692 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_PUSHLIKE) SendDlgItemMessage(hwnd,IDC_BS_PUSHLIKE,BM_SETCHECK,BST_CHECKED,0); 1693 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_LEFTTEXT) SendDlgItemMessage(hwnd,IDC_BS_LEFTTEXT,BM_SETCHECK,BST_CHECKED,0); 1694 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_ICON) SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_CHECKED,0); 1695 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BITMAP) SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_CHECKED,0); 1696 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_MULTILINE) SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_SETCHECK,BST_CHECKED,0); 1697 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_NOTIFY) SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_SETCHECK,BST_CHECKED,0); 1698 1699 1700 ////////////////// 1701 // 水平方向の配置 1702 ////////////////// 1703 1704 //"デフォルト" 1705 SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT); 1706 //"左端" 1707 SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_LEFT); 1708 //"右端" 1709 SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_RIGHT); 1710 //"中央" 1711 SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_CENTER); 1712 1713 //ビットを考慮してBS_CENTERを最初に比較する 1714 if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_CENTER)==BS_CENTER) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,3,0); 1715 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_LEFT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,1,0); 1716 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_RIGHT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,2,0); 1717 else SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,0,0); 1718 1719 1720 ////////////////// 1721 // 垂直方向の配置 1722 ////////////////// 1723 1724 //"デフォルト" 1725 SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT); 1726 //"上端" 1727 SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_TOP); 1728 //"下端" 1729 SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_BOTTOM); 1730 //"中央" 1731 SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_CENTER); 1732 1733 //ビットを考慮してBS_VCENTERを最初に比較する 1734 if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_VCENTER)==BS_VCENTER) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,3,0); 1735 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_TOP) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,1,0); 1736 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BOTTOM) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,2,0); 1737 else SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,0,0); 1738 1739 1740 bInitial=0; 1741 break; 1742 } 1707 1743 case WM_COMMAND: 1708 1709 i=GetWndNum(GetParent(GetParent(hwnd))); 1710 if(i==-1) return 1; 1711 i2=GetWndInfoNum(MdiInfo[i].path); 1712 1713 //共通スタイル 1714 if(bInitial==0){ 1715 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1; 1716 } 1717 1718 switch(LOWORD(wParam)){ 1719 case IDC_BS_AUTO: 1720 if(HIWORD(wParam)==BN_CLICKED){ 1721 //変更情報 1722 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1723 1724 if(SendDlgItemMessage(hwnd,IDC_BS_AUTO,BM_GETCHECK,0,0)){ 1725 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x04){ 1726 //3state 1727 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0; 1728 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_AUTO3STATE; 1744 { 1745 i=GetWndNum(GetParent(GetParent(hwnd))); 1746 if(i==-1) return 1; 1747 i2=GetWndInfoNum(MdiInfo[i].path); 1748 WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[i2]; 1749 1750 //共通スタイル 1751 if(bInitial==0){ 1752 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1; 1753 } 1754 1755 switch(LOWORD(wParam)){ 1756 case IDC_BS_AUTO: 1757 if(HIWORD(wParam)==BN_CLICKED){ 1758 //変更情報 1759 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1760 1761 if(SendDlgItemMessage(hwnd,IDC_BS_AUTO,BM_GETCHECK,0,0)){ 1762 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x04){ 1763 //3state 1764 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0; 1765 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_AUTO3STATE; 1766 } 1767 else{ 1768 //2state 1769 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0; 1770 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_AUTOCHECKBOX; 1771 } 1729 1772 } 1730 1773 else{ 1731 //2state 1732 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0; 1733 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_AUTOCHECKBOX; 1774 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x04){ 1775 //3state 1776 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0; 1777 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_3STATE; 1778 } 1779 else{ 1780 //2state 1781 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0; 1782 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_CHECKBOX; 1783 } 1734 1784 } 1735 } 1736 else{ 1737 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x04){ 1738 //3state 1739 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0; 1740 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_3STATE; 1785 return 1; 1786 } 1787 break; 1788 case IDC_BS_3STATE: 1789 if(HIWORD(wParam)==BN_CLICKED){ 1790 //変更情報 1791 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1792 1793 if(SendDlgItemMessage(hwnd,IDC_BS_3STATE,BM_GETCHECK,0,0)){ 1794 if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0F)==BS_CHECKBOX){ 1795 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0; 1796 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_3STATE; 1797 } 1798 else if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0F)==BS_AUTOCHECKBOX){ 1799 //自動チェック 1800 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0; 1801 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_AUTO3STATE; 1802 } 1741 1803 } 1742 1804 else{ 1743 //2state 1744 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0; 1745 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_CHECKBOX; 1805 if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0F)==BS_3STATE){ 1806 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0; 1807 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_CHECKBOX; 1808 } 1809 else if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0F)==BS_AUTO3STATE){ 1810 //自動チェック 1811 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0; 1812 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_AUTOCHECKBOX; 1813 } 1746 1814 } 1747 } 1815 return 1; 1816 } 1817 break; 1818 case IDC_BS_PUSHLIKE: 1819 if(HIWORD(wParam)==BN_CLICKED){ 1820 //変更情報 1821 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1822 1823 if(SendDlgItemMessage(hwnd,IDC_BS_PUSHLIKE,BM_GETCHECK,0,0)) 1824 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_PUSHLIKE; 1825 else 1826 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_PUSHLIKE; 1827 DrawRadWindow(i,pWindowInfo); 1828 return 1; 1829 } 1830 break; 1831 case IDC_BS_LEFTTEXT: 1832 if(HIWORD(wParam)==BN_CLICKED){ 1833 //変更情報 1834 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1835 1836 if(SendDlgItemMessage(hwnd,IDC_BS_LEFTTEXT,BM_GETCHECK,0,0)) 1837 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_LEFTTEXT; 1838 else 1839 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_LEFTTEXT; 1840 DrawRadWindow(i,pWindowInfo); 1841 return 1; 1842 } 1843 break; 1844 case IDC_BS_ICON: 1845 if(HIWORD(wParam)==BN_CLICKED){ 1846 //変更情報 1847 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1848 1849 if(SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_GETCHECK,0,0)){ 1850 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_ICON; 1851 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP; 1852 SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_UNCHECKED,0); 1853 } 1854 else 1855 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON; 1856 DrawRadWindow(i,pWindowInfo); 1857 return 1; 1858 } 1859 break; 1860 case IDC_BS_BITMAP: 1861 if(HIWORD(wParam)==BN_CLICKED){ 1862 //変更情報 1863 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1864 1865 if(SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_GETCHECK,0,0)){ 1866 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BITMAP; 1867 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON; 1868 SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_UNCHECKED,0); 1869 } 1870 else 1871 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP; 1872 DrawRadWindow(i,pWindowInfo); 1873 return 1; 1874 } 1875 break; 1876 case IDC_BS_MULTILINE: 1877 if(HIWORD(wParam)==BN_CLICKED){ 1878 //変更情報 1879 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1880 1881 if(SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_GETCHECK,0,0)) 1882 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_MULTILINE; 1883 else 1884 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_MULTILINE; 1885 DrawRadWindow(i,pWindowInfo); 1886 return 1; 1887 } 1888 break; 1889 case IDC_BS_NOTIFY: 1890 if(HIWORD(wParam)==BN_CLICKED){ 1891 //変更情報 1892 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1893 1894 if(SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_GETCHECK,0,0)) 1895 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_NOTIFY; 1896 else 1897 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_NOTIFY; 1898 return 1; 1899 } 1900 break; 1901 1902 case IDC_BS_HPOS: 1903 if(HIWORD(wParam)==CBN_SELCHANGE){ 1904 //変更情報 1905 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1906 1907 i3=SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_GETCURSEL,0,0); 1908 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_LEFT|BS_RIGHT|BS_CENTER); 1909 if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_LEFT; 1910 else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_RIGHT; 1911 else if(i3==3) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_CENTER; 1912 DrawRadWindow(i,pWindowInfo); 1913 return 1; 1914 } 1915 break; 1916 case IDC_BS_VPOS: 1917 if(HIWORD(wParam)==CBN_SELCHANGE){ 1918 //変更情報 1919 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1920 1921 i3=SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_GETCURSEL,0,0); 1922 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_TOP|BS_BOTTOM|BS_VCENTER); 1923 if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_TOP; 1924 else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BOTTOM; 1925 else if(i3==3) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_VCENTER; 1926 DrawRadWindow(i,pWindowInfo); 1927 return 1; 1928 } 1929 break; 1930 1931 case IDC_EXSTYLE: 1932 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1; 1933 DrawRadWindow(i,pWindowInfo); 1748 1934 return 1; 1749 } 1750 break; 1751 case IDC_BS_3STATE: 1752 if(HIWORD(wParam)==BN_CLICKED){ 1753 //変更情報 1754 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1755 1756 if(SendDlgItemMessage(hwnd,IDC_BS_3STATE,BM_GETCHECK,0,0)){ 1757 if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0F)==BS_CHECKBOX){ 1758 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0; 1759 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_3STATE; 1760 } 1761 else if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0F)==BS_AUTOCHECKBOX){ 1762 //自動チェック 1763 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0; 1764 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_AUTO3STATE; 1765 } 1766 } 1767 else{ 1768 if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0F)==BS_3STATE){ 1769 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0; 1770 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_CHECKBOX; 1771 } 1772 else if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0F)==BS_AUTO3STATE){ 1773 //自動チェック 1774 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0; 1775 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_AUTOCHECKBOX; 1776 } 1777 } 1778 return 1; 1779 } 1780 break; 1781 case IDC_BS_PUSHLIKE: 1782 if(HIWORD(wParam)==BN_CLICKED){ 1783 //変更情報 1784 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1785 1786 if(SendDlgItemMessage(hwnd,IDC_BS_PUSHLIKE,BM_GETCHECK,0,0)) 1787 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_PUSHLIKE; 1788 else 1789 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_PUSHLIKE; 1790 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 1791 return 1; 1792 } 1793 break; 1794 case IDC_BS_LEFTTEXT: 1795 if(HIWORD(wParam)==BN_CLICKED){ 1796 //変更情報 1797 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1798 1799 if(SendDlgItemMessage(hwnd,IDC_BS_LEFTTEXT,BM_GETCHECK,0,0)) 1800 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_LEFTTEXT; 1801 else 1802 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_LEFTTEXT; 1803 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 1804 return 1; 1805 } 1806 break; 1807 case IDC_BS_ICON: 1808 if(HIWORD(wParam)==BN_CLICKED){ 1809 //変更情報 1810 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1811 1812 if(SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_GETCHECK,0,0)){ 1813 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_ICON; 1814 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP; 1815 SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_UNCHECKED,0); 1816 } 1817 else 1818 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON; 1819 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 1820 return 1; 1821 } 1822 break; 1823 case IDC_BS_BITMAP: 1824 if(HIWORD(wParam)==BN_CLICKED){ 1825 //変更情報 1826 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1827 1828 if(SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_GETCHECK,0,0)){ 1829 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BITMAP; 1830 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON; 1831 SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_UNCHECKED,0); 1832 } 1833 else 1834 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP; 1835 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 1836 return 1; 1837 } 1838 break; 1839 case IDC_BS_MULTILINE: 1840 if(HIWORD(wParam)==BN_CLICKED){ 1841 //変更情報 1842 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1843 1844 if(SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_GETCHECK,0,0)) 1845 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_MULTILINE; 1846 else 1847 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_MULTILINE; 1848 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 1849 return 1; 1850 } 1851 break; 1852 case IDC_BS_NOTIFY: 1853 if(HIWORD(wParam)==BN_CLICKED){ 1854 //変更情報 1855 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1856 1857 if(SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_GETCHECK,0,0)) 1858 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_NOTIFY; 1859 else 1860 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_NOTIFY; 1861 return 1; 1862 } 1863 break; 1864 1865 case IDC_BS_HPOS: 1866 if(HIWORD(wParam)==CBN_SELCHANGE){ 1867 //変更情報 1868 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1869 1870 i3=SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_GETCURSEL,0,0); 1871 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_LEFT|BS_RIGHT|BS_CENTER); 1872 if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_LEFT; 1873 else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_RIGHT; 1874 else if(i3==3) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_CENTER; 1875 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 1876 return 1; 1877 } 1878 break; 1879 case IDC_BS_VPOS: 1880 if(HIWORD(wParam)==CBN_SELCHANGE){ 1881 //変更情報 1882 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1883 1884 i3=SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_GETCURSEL,0,0); 1885 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_TOP|BS_BOTTOM|BS_VCENTER); 1886 if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_TOP; 1887 else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BOTTOM; 1888 else if(i3==3) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_VCENTER; 1889 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 1890 return 1; 1891 } 1892 break; 1893 1894 case IDC_EXSTYLE: 1895 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1; 1896 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 1897 return 1; 1935 } 1898 1936 } 1899 1937 } … … 1921 1959 switch(message){ 1922 1960 case WM_INITDIALOG: 1923 bInitial=1; 1924 i=GetWndNum(GetParent(GetParent(hwnd))); 1925 i2=GetWndInfoNum(MdiInfo[i].path); 1926 1927 SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 1928 1929 1930 ///////////////////////////////// 1931 // スタイル 1932 //////////// 1933 1934 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 1935 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 1936 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0); 1937 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0); 1938 1939 //////// 1940 // 選択 1941 //////// 1942 1943 //"デフォルト" 1944 SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_ADDSTRING,0,(long)STRING_DEFAULT); 1945 //"ドロップ ダウン" 1946 SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_ADDSTRING,0,(long)STRING_COMBOBOXPROP_STYLE_DROPDOWN); 1947 //"ドロップ ダウン リスト" 1948 SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_ADDSTRING,0,(long)STRING_COMBOBOXPROP_STYLE_DROPDOWNLIST); 1949 1950 //ビットを考慮してCBS_DROPDOWNLISTを最初に比較する 1951 if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_DROPDOWNLIST)==CBS_DROPDOWNLIST) SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_SETCURSEL,2,0); 1952 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_SIMPLE) SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_SETCURSEL,0,0); 1953 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_DROPDOWN) SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_SETCURSEL,1,0); 1954 1955 1956 //////////////// 1957 // オーナー描画 1958 //////////////// 1959 1960 //"なし" 1961 SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_NONE_); 1962 //"固定" 1963 SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_OWNERDRAW_FIXED); 1964 //"可変" 1965 SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_OWNERDRAW_VARIABLE); 1966 1967 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_OWNERDRAWFIXED) SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_SETCURSEL,1,0); 1968 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_OWNERDRAWVARIABLE) SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_SETCURSEL,2,0); 1969 else SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_SETCURSEL,0,0); 1970 1971 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_HASSTRINGS) SendDlgItemMessage(hwnd,IDC_CBS_HASSTRINGS,BM_SETCHECK,BST_CHECKED,0); 1972 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_SORT) SendDlgItemMessage(hwnd,IDC_CBS_SORT,BM_SETCHECK,BST_CHECKED,0); 1973 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_NOINTEGRALHEIGHT) SendDlgItemMessage(hwnd,IDC_CBS_NOINTEGRALHEIGHT,BM_SETCHECK,BST_CHECKED,0); 1974 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_OEMCONVERT) SendDlgItemMessage(hwnd,IDC_CBS_OEMCONVERT,BM_SETCHECK,BST_CHECKED,0); 1975 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_SETCHECK,BST_CHECKED,0); 1976 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_AUTOHSCROLL) SendDlgItemMessage(hwnd,IDC_CBS_AUTOHSCROLL,BM_SETCHECK,BST_CHECKED,0); 1977 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_DISABLENOSCROLL) SendDlgItemMessage(hwnd,IDC_CBS_DISABLENOSCROLL,BM_SETCHECK,BST_CHECKED,0); 1978 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_UPPERCASE) SendDlgItemMessage(hwnd,IDC_CBS_UPPERCASE,BM_SETCHECK,BST_CHECKED,0); 1979 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_LOWERCASE) SendDlgItemMessage(hwnd,IDC_CBS_LOWERCASE,BM_SETCHECK,BST_CHECKED,0); 1980 1981 RadProperty_ComboBox_StylingOrder(hwnd,&ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 1982 1983 1984 bInitial=0; 1985 break; 1961 { 1962 bInitial=1; 1963 i=GetWndNum(GetParent(GetParent(hwnd))); 1964 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 1965 1966 SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 1967 1968 1969 ///////////////////////////////// 1970 // スタイル 1971 //////////// 1972 1973 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 1974 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 1975 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0); 1976 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0); 1977 1978 //////// 1979 // 選択 1980 //////// 1981 1982 //"デフォルト" 1983 SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_ADDSTRING,0,(long)STRING_DEFAULT); 1984 //"ドロップ ダウン" 1985 SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_ADDSTRING,0,(long)STRING_COMBOBOXPROP_STYLE_DROPDOWN); 1986 //"ドロップ ダウン リスト" 1987 SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_ADDSTRING,0,(long)STRING_COMBOBOXPROP_STYLE_DROPDOWNLIST); 1988 1989 //ビットを考慮してCBS_DROPDOWNLISTを最初に比較する 1990 if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_DROPDOWNLIST)==CBS_DROPDOWNLIST) SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_SETCURSEL,2,0); 1991 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_SIMPLE) SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_SETCURSEL,0,0); 1992 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_DROPDOWN) SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_SETCURSEL,1,0); 1993 1994 1995 //////////////// 1996 // オーナー描画 1997 //////////////// 1998 1999 //"なし" 2000 SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_NONE_); 2001 //"固定" 2002 SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_OWNERDRAW_FIXED); 2003 //"可変" 2004 SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_OWNERDRAW_VARIABLE); 2005 2006 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_OWNERDRAWFIXED) SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_SETCURSEL,1,0); 2007 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_OWNERDRAWVARIABLE) SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_SETCURSEL,2,0); 2008 else SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_SETCURSEL,0,0); 2009 2010 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_HASSTRINGS) SendDlgItemMessage(hwnd,IDC_CBS_HASSTRINGS,BM_SETCHECK,BST_CHECKED,0); 2011 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_SORT) SendDlgItemMessage(hwnd,IDC_CBS_SORT,BM_SETCHECK,BST_CHECKED,0); 2012 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_NOINTEGRALHEIGHT) SendDlgItemMessage(hwnd,IDC_CBS_NOINTEGRALHEIGHT,BM_SETCHECK,BST_CHECKED,0); 2013 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_OEMCONVERT) SendDlgItemMessage(hwnd,IDC_CBS_OEMCONVERT,BM_SETCHECK,BST_CHECKED,0); 2014 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_SETCHECK,BST_CHECKED,0); 2015 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_AUTOHSCROLL) SendDlgItemMessage(hwnd,IDC_CBS_AUTOHSCROLL,BM_SETCHECK,BST_CHECKED,0); 2016 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_DISABLENOSCROLL) SendDlgItemMessage(hwnd,IDC_CBS_DISABLENOSCROLL,BM_SETCHECK,BST_CHECKED,0); 2017 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_UPPERCASE) SendDlgItemMessage(hwnd,IDC_CBS_UPPERCASE,BM_SETCHECK,BST_CHECKED,0); 2018 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_LOWERCASE) SendDlgItemMessage(hwnd,IDC_CBS_LOWERCASE,BM_SETCHECK,BST_CHECKED,0); 2019 2020 RadProperty_ComboBox_StylingOrder(hwnd,&pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2021 2022 2023 bInitial=0; 2024 break; 2025 } 1986 2026 case WM_COMMAND: 1987 1988 i=GetWndNum(GetParent(GetParent(hwnd))); 1989 if(i==-1) return 1; 1990 i2=GetWndInfoNum(MdiInfo[i].path); 1991 1992 //共通スタイル 1993 if(bInitial==0){ 1994 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1; 1995 } 1996 1997 switch(LOWORD(wParam)){ 1998 case IDC_CBS_TYPE: 1999 if(HIWORD(wParam)==CBN_SELCHANGE){ 2000 //変更情報 2001 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2002 2003 i3=SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_GETCURSEL,0,0); 2004 //CBS_DROPDOWNLIST=CBS_SIMPLE | CBS_DROPDOWN 2005 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(CBS_DROPDOWNLIST); 2006 if(i3==0) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_SIMPLE; 2007 else if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_DROPDOWN; 2008 else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_DROPDOWNLIST; 2009 2010 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 2027 { 2028 i=GetWndNum(GetParent(GetParent(hwnd))); 2029 if(i==-1) return 1; 2030 i2=GetWndInfoNum(MdiInfo[i].path); 2031 WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[i2]; 2032 2033 //共通スタイル 2034 if(bInitial==0){ 2035 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1; 2036 } 2037 2038 switch(LOWORD(wParam)){ 2039 case IDC_CBS_TYPE: 2040 if(HIWORD(wParam)==CBN_SELCHANGE){ 2041 //変更情報 2042 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2043 2044 i3=SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_GETCURSEL,0,0); 2045 //CBS_DROPDOWNLIST=CBS_SIMPLE | CBS_DROPDOWN 2046 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(CBS_DROPDOWNLIST); 2047 if(i3==0) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_SIMPLE; 2048 else if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_DROPDOWN; 2049 else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_DROPDOWNLIST; 2050 2051 DrawRadWindow(i,pWindowInfo); 2052 return 1; 2053 } 2054 break; 2055 case IDC_CBS_OWNERDRAW: 2056 if(HIWORD(wParam)==CBN_SELCHANGE){ 2057 //変更情報 2058 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2059 2060 i3=SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_GETCURSEL,0,0); 2061 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(CBS_OWNERDRAWFIXED|CBS_OWNERDRAWVARIABLE); 2062 if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_OWNERDRAWFIXED; 2063 else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_OWNERDRAWVARIABLE; 2064 2065 RadProperty_ComboBox_StylingOrder(hwnd,&pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2066 return 1; 2067 } 2068 break; 2069 2070 case IDC_CBS_HASSTRINGS: 2071 if(HIWORD(wParam)==BN_CLICKED){ 2072 //変更情報 2073 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2074 2075 if(SendDlgItemMessage(hwnd,IDC_CBS_HASSTRINGS,BM_GETCHECK,0,0)) 2076 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_HASSTRINGS; 2077 else 2078 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_HASSTRINGS; 2079 return 1; 2080 } 2081 break; 2082 case IDC_CBS_SORT: 2083 if(HIWORD(wParam)==BN_CLICKED){ 2084 //変更情報 2085 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2086 2087 if(SendDlgItemMessage(hwnd,IDC_CBS_SORT,BM_GETCHECK,0,0)) 2088 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_SORT; 2089 else 2090 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_SORT; 2091 return 1; 2092 } 2093 break; 2094 case IDC_CBS_NOINTEGRALHEIGHT: 2095 if(HIWORD(wParam)==BN_CLICKED){ 2096 //変更情報 2097 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2098 2099 if(SendDlgItemMessage(hwnd,IDC_CBS_NOINTEGRALHEIGHT,BM_GETCHECK,0,0)) 2100 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_NOINTEGRALHEIGHT; 2101 else 2102 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_NOINTEGRALHEIGHT; 2103 return 1; 2104 } 2105 break; 2106 case IDC_CBS_OEMCONVERT: 2107 if(HIWORD(wParam)==BN_CLICKED){ 2108 //変更情報 2109 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2110 2111 if(SendDlgItemMessage(hwnd,IDC_CBS_OEMCONVERT,BM_GETCHECK,0,0)) 2112 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_OEMCONVERT; 2113 else 2114 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_OEMCONVERT; 2115 return 1; 2116 } 2117 break; 2118 case IDC_STYLE_VSCROLL: 2119 if(HIWORD(wParam)==BN_CLICKED){ 2120 //変更情報 2121 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2122 2123 if(SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_GETCHECK,0,0)) 2124 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=WS_VSCROLL; 2125 else 2126 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~WS_VSCROLL; 2127 DrawRadWindow(i,pWindowInfo); 2128 return 1; 2129 } 2130 break; 2131 case IDC_CBS_AUTOHSCROLL: 2132 if(HIWORD(wParam)==BN_CLICKED){ 2133 //変更情報 2134 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2135 2136 if(SendDlgItemMessage(hwnd,IDC_CBS_AUTOHSCROLL,BM_GETCHECK,0,0)) 2137 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_AUTOHSCROLL; 2138 else 2139 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_AUTOHSCROLL; 2140 return 1; 2141 } 2142 break; 2143 case IDC_CBS_DISABLENOSCROLL: 2144 if(HIWORD(wParam)==BN_CLICKED){ 2145 //変更情報 2146 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2147 2148 if(SendDlgItemMessage(hwnd,IDC_CBS_DISABLENOSCROLL,BM_GETCHECK,0,0)) 2149 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_DISABLENOSCROLL; 2150 else 2151 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_DISABLENOSCROLL; 2152 DrawRadWindow(i,pWindowInfo); 2153 return 1; 2154 } 2155 break; 2156 case IDC_CBS_UPPERCASE: 2157 if(HIWORD(wParam)==BN_CLICKED){ 2158 //変更情報 2159 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2160 2161 if(SendDlgItemMessage(hwnd,IDC_CBS_UPPERCASE,BM_GETCHECK,0,0)) 2162 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_UPPERCASE; 2163 else 2164 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_UPPERCASE; 2165 return 1; 2166 } 2167 break; 2168 case IDC_CBS_LOWERCASE: 2169 if(HIWORD(wParam)==BN_CLICKED){ 2170 //変更情報 2171 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2172 2173 if(SendDlgItemMessage(hwnd,IDC_CBS_LOWERCASE,BM_GETCHECK,0,0)) 2174 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_LOWERCASE; 2175 else 2176 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_LOWERCASE; 2177 return 1; 2178 } 2179 break; 2180 2181 case IDC_EXSTYLE: 2182 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1; 2183 DrawRadWindow(i,pWindowInfo); 2011 2184 return 1; 2012 } 2013 break; 2014 case IDC_CBS_OWNERDRAW: 2015 if(HIWORD(wParam)==CBN_SELCHANGE){ 2016 //変更情報 2017 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2018 2019 i3=SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_GETCURSEL,0,0); 2020 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(CBS_OWNERDRAWFIXED|CBS_OWNERDRAWVARIABLE); 2021 if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_OWNERDRAWFIXED; 2022 else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_OWNERDRAWVARIABLE; 2023 2024 RadProperty_ComboBox_StylingOrder(hwnd,&ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2025 return 1; 2026 } 2027 break; 2028 2029 case IDC_CBS_HASSTRINGS: 2030 if(HIWORD(wParam)==BN_CLICKED){ 2031 //変更情報 2032 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2033 2034 if(SendDlgItemMessage(hwnd,IDC_CBS_HASSTRINGS,BM_GETCHECK,0,0)) 2035 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_HASSTRINGS; 2036 else 2037 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_HASSTRINGS; 2038 return 1; 2039 } 2040 break; 2041 case IDC_CBS_SORT: 2042 if(HIWORD(wParam)==BN_CLICKED){ 2043 //変更情報 2044 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2045 2046 if(SendDlgItemMessage(hwnd,IDC_CBS_SORT,BM_GETCHECK,0,0)) 2047 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_SORT; 2048 else 2049 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_SORT; 2050 return 1; 2051 } 2052 break; 2053 case IDC_CBS_NOINTEGRALHEIGHT: 2054 if(HIWORD(wParam)==BN_CLICKED){ 2055 //変更情報 2056 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2057 2058 if(SendDlgItemMessage(hwnd,IDC_CBS_NOINTEGRALHEIGHT,BM_GETCHECK,0,0)) 2059 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_NOINTEGRALHEIGHT; 2060 else 2061 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_NOINTEGRALHEIGHT; 2062 return 1; 2063 } 2064 break; 2065 case IDC_CBS_OEMCONVERT: 2066 if(HIWORD(wParam)==BN_CLICKED){ 2067 //変更情報 2068 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2069 2070 if(SendDlgItemMessage(hwnd,IDC_CBS_OEMCONVERT,BM_GETCHECK,0,0)) 2071 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_OEMCONVERT; 2072 else 2073 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_OEMCONVERT; 2074 return 1; 2075 } 2076 break; 2077 case IDC_STYLE_VSCROLL: 2078 if(HIWORD(wParam)==BN_CLICKED){ 2079 //変更情報 2080 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2081 2082 if(SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_GETCHECK,0,0)) 2083 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=WS_VSCROLL; 2084 else 2085 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~WS_VSCROLL; 2086 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 2087 return 1; 2088 } 2089 break; 2090 case IDC_CBS_AUTOHSCROLL: 2091 if(HIWORD(wParam)==BN_CLICKED){ 2092 //変更情報 2093 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2094 2095 if(SendDlgItemMessage(hwnd,IDC_CBS_AUTOHSCROLL,BM_GETCHECK,0,0)) 2096 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_AUTOHSCROLL; 2097 else 2098 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_AUTOHSCROLL; 2099 return 1; 2100 } 2101 break; 2102 case IDC_CBS_DISABLENOSCROLL: 2103 if(HIWORD(wParam)==BN_CLICKED){ 2104 //変更情報 2105 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2106 2107 if(SendDlgItemMessage(hwnd,IDC_CBS_DISABLENOSCROLL,BM_GETCHECK,0,0)) 2108 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_DISABLENOSCROLL; 2109 else 2110 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_DISABLENOSCROLL; 2111 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 2112 return 1; 2113 } 2114 break; 2115 case IDC_CBS_UPPERCASE: 2116 if(HIWORD(wParam)==BN_CLICKED){ 2117 //変更情報 2118 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2119 2120 if(SendDlgItemMessage(hwnd,IDC_CBS_UPPERCASE,BM_GETCHECK,0,0)) 2121 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_UPPERCASE; 2122 else 2123 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_UPPERCASE; 2124 return 1; 2125 } 2126 break; 2127 case IDC_CBS_LOWERCASE: 2128 if(HIWORD(wParam)==BN_CLICKED){ 2129 //変更情報 2130 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2131 2132 if(SendDlgItemMessage(hwnd,IDC_CBS_LOWERCASE,BM_GETCHECK,0,0)) 2133 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_LOWERCASE; 2134 else 2135 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_LOWERCASE; 2136 return 1; 2137 } 2138 break; 2139 2140 case IDC_EXSTYLE: 2141 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1; 2142 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 2143 return 1; 2144 } 2145 break; 2185 } 2186 break; 2187 } 2146 2188 } 2147 2189 return 0; … … 2182 2224 switch(message){ 2183 2225 case WM_INITDIALOG: 2184 bInitial=1; 2185 i=GetWndNum(GetParent(GetParent(hwnd))); 2186 i2=GetWndInfoNum(MdiInfo[i].path); 2187 2188 SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 2189 SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption); 2190 2191 2192 //////////// 2193 // スタイル 2194 //////////// 2195 2196 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 2197 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 2198 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0); 2199 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0); 2200 2201 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_MULTILINE) SendDlgItemMessage(hwnd,IDC_ES_MULTILINE,BM_SETCHECK,BST_CHECKED,0); 2202 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_NUMBER) SendDlgItemMessage(hwnd,IDC_ES_NUMBER,BM_SETCHECK,BST_CHECKED,0); 2203 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_HSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLL,BM_SETCHECK,BST_CHECKED,0); 2204 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_AUTOHSCROLL) SendDlgItemMessage(hwnd,IDC_ES_AUTOHSCROLL,BM_SETCHECK,BST_CHECKED,0); 2205 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_SETCHECK,BST_CHECKED,0); 2206 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_AUTOVSCROLL) SendDlgItemMessage(hwnd,IDC_ES_AUTOVSCROLL,BM_SETCHECK,BST_CHECKED,0); 2207 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_PASSWORD) SendDlgItemMessage(hwnd,IDC_ES_PASSWORD,BM_SETCHECK,BST_CHECKED,0); 2208 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_NOHIDESEL) SendDlgItemMessage(hwnd,IDC_ES_NOHIDESEL,BM_SETCHECK,BST_CHECKED,0); 2209 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_OEMCONVERT) SendDlgItemMessage(hwnd,IDC_ES_OEMCONVERT,BM_SETCHECK,BST_CHECKED,0); 2210 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_WANTRETURN) SendDlgItemMessage(hwnd,IDC_ES_WANTRETURN,BM_SETCHECK,BST_CHECKED,0); 2211 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_UPPERCASE) SendDlgItemMessage(hwnd,IDC_ES_UPPERCASE,BM_SETCHECK,BST_CHECKED,0); 2212 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_LOWERCASE) SendDlgItemMessage(hwnd,IDC_ES_LOWERCASE,BM_SETCHECK,BST_CHECKED,0); 2213 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_READONLY) SendDlgItemMessage(hwnd,IDC_ES_READONLY,BM_SETCHECK,BST_CHECKED,0); 2214 2215 2216 ////////////////// 2217 // テキストの配置 2218 ////////////////// 2219 2220 //"左端" 2221 SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_ADDSTRING,0,(long)STRING_LEFT); 2222 //"中央" 2223 SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_ADDSTRING,0,(long)STRING_CENTER); 2224 //"右端" 2225 SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_ADDSTRING,0,(long)STRING_RIGHT); 2226 2227 //ビットを考慮してES_LEFTを最後に検討する 2228 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_CENTER) SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_SETCURSEL,1,0); 2229 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_RIGHT) SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_SETCURSEL,2,0); 2230 else SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_SETCURSEL,0,0); 2231 2232 RadProperty_Edit_StylingOrder(hwnd,&ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2233 2234 2235 bInitial=0; 2236 break; 2226 { 2227 bInitial=1; 2228 i=GetWndNum(GetParent(GetParent(hwnd))); 2229 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 2230 2231 SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 2232 SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption); 2233 2234 2235 //////////// 2236 // スタイル 2237 //////////// 2238 2239 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 2240 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 2241 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0); 2242 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0); 2243 2244 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_MULTILINE) SendDlgItemMessage(hwnd,IDC_ES_MULTILINE,BM_SETCHECK,BST_CHECKED,0); 2245 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_NUMBER) SendDlgItemMessage(hwnd,IDC_ES_NUMBER,BM_SETCHECK,BST_CHECKED,0); 2246 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_HSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLL,BM_SETCHECK,BST_CHECKED,0); 2247 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_AUTOHSCROLL) SendDlgItemMessage(hwnd,IDC_ES_AUTOHSCROLL,BM_SETCHECK,BST_CHECKED,0); 2248 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_SETCHECK,BST_CHECKED,0); 2249 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_AUTOVSCROLL) SendDlgItemMessage(hwnd,IDC_ES_AUTOVSCROLL,BM_SETCHECK,BST_CHECKED,0); 2250 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_PASSWORD) SendDlgItemMessage(hwnd,IDC_ES_PASSWORD,BM_SETCHECK,BST_CHECKED,0); 2251 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_NOHIDESEL) SendDlgItemMessage(hwnd,IDC_ES_NOHIDESEL,BM_SETCHECK,BST_CHECKED,0); 2252 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_OEMCONVERT) SendDlgItemMessage(hwnd,IDC_ES_OEMCONVERT,BM_SETCHECK,BST_CHECKED,0); 2253 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_WANTRETURN) SendDlgItemMessage(hwnd,IDC_ES_WANTRETURN,BM_SETCHECK,BST_CHECKED,0); 2254 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_UPPERCASE) SendDlgItemMessage(hwnd,IDC_ES_UPPERCASE,BM_SETCHECK,BST_CHECKED,0); 2255 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_LOWERCASE) SendDlgItemMessage(hwnd,IDC_ES_LOWERCASE,BM_SETCHECK,BST_CHECKED,0); 2256 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_READONLY) SendDlgItemMessage(hwnd,IDC_ES_READONLY,BM_SETCHECK,BST_CHECKED,0); 2257 2258 2259 ////////////////// 2260 // テキストの配置 2261 ////////////////// 2262 2263 //"左端" 2264 SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_ADDSTRING,0,(long)STRING_LEFT); 2265 //"中央" 2266 SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_ADDSTRING,0,(long)STRING_CENTER); 2267 //"右端" 2268 SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_ADDSTRING,0,(long)STRING_RIGHT); 2269 2270 //ビットを考慮してES_LEFTを最後に検討する 2271 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_CENTER) SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_SETCURSEL,1,0); 2272 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_RIGHT) SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_SETCURSEL,2,0); 2273 else SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_SETCURSEL,0,0); 2274 2275 RadProperty_Edit_StylingOrder(hwnd,&pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2276 2277 2278 bInitial=0; 2279 break; 2280 } 2237 2281 case WM_COMMAND: 2238 2239 i=GetWndNum(GetParent(GetParent(hwnd))); 2240 if(i==-1) return 1; 2241 i2=GetWndInfoNum(MdiInfo[i].path); 2242 2243 //共通スタイル 2244 if(bInitial==0){ 2245 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1; 2246 } 2247 2248 switch(LOWORD(wParam)){ 2249 case IDC_ES_MULTILINE: 2250 if(HIWORD(wParam)==BN_CLICKED){ 2251 //変更情報 2252 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2253 2254 if(SendDlgItemMessage(hwnd,IDC_ES_MULTILINE,BM_GETCHECK,0,0)) 2255 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_MULTILINE; 2256 else 2257 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_MULTILINE; 2258 RadProperty_Edit_StylingOrder(hwnd,&ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2259 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 2282 { 2283 i=GetWndNum(GetParent(GetParent(hwnd))); 2284 if(i==-1) return 1; 2285 i2=GetWndInfoNum(MdiInfo[i].path); 2286 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 2287 2288 //共通スタイル 2289 if(bInitial==0){ 2290 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1; 2291 } 2292 2293 switch(LOWORD(wParam)){ 2294 case IDC_ES_MULTILINE: 2295 if(HIWORD(wParam)==BN_CLICKED){ 2296 //変更情報 2297 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2298 2299 if(SendDlgItemMessage(hwnd,IDC_ES_MULTILINE,BM_GETCHECK,0,0)) 2300 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_MULTILINE; 2301 else 2302 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_MULTILINE; 2303 RadProperty_Edit_StylingOrder(hwnd,&pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2304 DrawRadWindow(i,pWindowInfo); 2305 return 1; 2306 } 2307 break; 2308 case IDC_ES_NUMBER: 2309 if(HIWORD(wParam)==BN_CLICKED){ 2310 //変更情報 2311 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2312 2313 if(SendDlgItemMessage(hwnd,IDC_ES_NUMBER,BM_GETCHECK,0,0)) 2314 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_NUMBER; 2315 else 2316 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_NUMBER; 2317 return 1; 2318 } 2319 break; 2320 case IDC_STYLE_HSCROLL: 2321 if(HIWORD(wParam)==BN_CLICKED){ 2322 //変更情報 2323 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2324 2325 if(SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLL,BM_GETCHECK,0,0)) 2326 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=WS_HSCROLL; 2327 else 2328 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~WS_HSCROLL; 2329 DrawRadWindow(i,pWindowInfo); 2330 return 1; 2331 } 2332 break; 2333 case IDC_ES_AUTOHSCROLL: 2334 if(HIWORD(wParam)==BN_CLICKED){ 2335 //変更情報 2336 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2337 2338 if(SendDlgItemMessage(hwnd,IDC_ES_AUTOHSCROLL,BM_GETCHECK,0,0)) 2339 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_AUTOHSCROLL; 2340 else 2341 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_AUTOHSCROLL; 2342 DrawRadWindow(i,pWindowInfo); 2343 return 1; 2344 } 2345 break; 2346 case IDC_STYLE_VSCROLL: 2347 if(HIWORD(wParam)==BN_CLICKED){ 2348 //変更情報 2349 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2350 2351 if(SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_GETCHECK,0,0)) 2352 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=WS_VSCROLL; 2353 else 2354 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~WS_VSCROLL; 2355 DrawRadWindow(i,pWindowInfo); 2356 return 1; 2357 } 2358 break; 2359 case IDC_ES_AUTOVSCROLL: 2360 if(HIWORD(wParam)==BN_CLICKED){ 2361 //変更情報 2362 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2363 2364 if(SendDlgItemMessage(hwnd,IDC_ES_AUTOVSCROLL,BM_GETCHECK,0,0)) 2365 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_AUTOVSCROLL; 2366 else 2367 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_AUTOVSCROLL; 2368 DrawRadWindow(i,pWindowInfo); 2369 return 1; 2370 } 2371 break; 2372 case IDC_ES_PASSWORD: 2373 if(HIWORD(wParam)==BN_CLICKED){ 2374 //変更情報 2375 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2376 2377 if(SendDlgItemMessage(hwnd,IDC_ES_PASSWORD,BM_GETCHECK,0,0)) 2378 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_PASSWORD; 2379 else 2380 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_PASSWORD; 2381 DrawRadWindow(i,pWindowInfo); 2382 return 1; 2383 } 2384 break; 2385 case IDC_ES_NOHIDESEL: 2386 if(HIWORD(wParam)==BN_CLICKED){ 2387 //変更情報 2388 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2389 2390 if(SendDlgItemMessage(hwnd,IDC_ES_NOHIDESEL,BM_GETCHECK,0,0)) 2391 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_NOHIDESEL; 2392 else 2393 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_NOHIDESEL; 2394 DrawRadWindow(i,pWindowInfo); 2395 return 1; 2396 } 2397 break; 2398 case IDC_ES_OEMCONVERT: 2399 if(HIWORD(wParam)==BN_CLICKED){ 2400 //変更情報 2401 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2402 2403 if(SendDlgItemMessage(hwnd,IDC_ES_OEMCONVERT,BM_GETCHECK,0,0)) 2404 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_OEMCONVERT; 2405 else 2406 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_OEMCONVERT; 2407 DrawRadWindow(i,pWindowInfo); 2408 return 1; 2409 } 2410 break; 2411 case IDC_ES_WANTRETURN: 2412 if(HIWORD(wParam)==BN_CLICKED){ 2413 //変更情報 2414 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2415 2416 if(SendDlgItemMessage(hwnd,IDC_ES_WANTRETURN,BM_GETCHECK,0,0)) 2417 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_WANTRETURN; 2418 else 2419 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_WANTRETURN; 2420 DrawRadWindow(i,pWindowInfo); 2421 return 1; 2422 } 2423 break; 2424 case IDC_ES_UPPERCASE: 2425 if(HIWORD(wParam)==BN_CLICKED){ 2426 //変更情報 2427 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2428 2429 if(SendDlgItemMessage(hwnd,IDC_ES_UPPERCASE,BM_GETCHECK,0,0)){ 2430 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_LOWERCASE; 2431 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_UPPERCASE; 2432 SendDlgItemMessage(hwnd,IDC_ES_LOWERCASE,BM_SETCHECK,BST_UNCHECKED,0); 2433 } 2434 else 2435 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_UPPERCASE; 2436 DrawRadWindow(i,pWindowInfo); 2437 return 1; 2438 } 2439 break; 2440 case IDC_ES_LOWERCASE: 2441 if(HIWORD(wParam)==BN_CLICKED){ 2442 //変更情報 2443 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2444 2445 if(SendDlgItemMessage(hwnd,IDC_ES_LOWERCASE,BM_GETCHECK,0,0)){ 2446 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_UPPERCASE; 2447 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_LOWERCASE; 2448 SendDlgItemMessage(hwnd,IDC_ES_UPPERCASE,BM_SETCHECK,BST_UNCHECKED,0); 2449 } 2450 else 2451 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_LOWERCASE; 2452 DrawRadWindow(i,pWindowInfo); 2453 return 1; 2454 } 2455 break; 2456 case IDC_ES_READONLY: 2457 if(HIWORD(wParam)==BN_CLICKED){ 2458 //変更情報 2459 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2460 2461 if(SendDlgItemMessage(hwnd,IDC_ES_READONLY,BM_GETCHECK,0,0)) 2462 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_READONLY; 2463 else 2464 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_READONLY; 2465 DrawRadWindow(i,pWindowInfo); 2466 return 1; 2467 } 2468 break; 2469 2470 case IDC_ES_TEXTPOS: 2471 if(HIWORD(wParam)==CBN_SELCHANGE){ 2472 //変更情報 2473 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2474 2475 i3=SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_GETCURSEL,0,0); 2476 //ES_LEFT=0 2477 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(ES_CENTER|ES_RIGHT); 2478 if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_CENTER; 2479 else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_RIGHT; 2480 DrawRadWindow(i,pWindowInfo); 2481 return 1; 2482 } 2483 break; 2484 2485 case IDC_EXSTYLE: 2486 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1; 2487 DrawRadWindow(i,pWindowInfo); 2260 2488 return 1; 2261 } 2262 break; 2263 case IDC_ES_NUMBER: 2264 if(HIWORD(wParam)==BN_CLICKED){ 2265 //変更情報 2266 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2267 2268 if(SendDlgItemMessage(hwnd,IDC_ES_NUMBER,BM_GETCHECK,0,0)) 2269 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_NUMBER; 2270 else 2271 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_NUMBER; 2272 return 1; 2273 } 2274 break; 2275 case IDC_STYLE_HSCROLL: 2276 if(HIWORD(wParam)==BN_CLICKED){ 2277 //変更情報 2278 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2279 2280 if(SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLL,BM_GETCHECK,0,0)) 2281 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=WS_HSCROLL; 2282 else 2283 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~WS_HSCROLL; 2284 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 2285 return 1; 2286 } 2287 break; 2288 case IDC_ES_AUTOHSCROLL: 2289 if(HIWORD(wParam)==BN_CLICKED){ 2290 //変更情報 2291 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2292 2293 if(SendDlgItemMessage(hwnd,IDC_ES_AUTOHSCROLL,BM_GETCHECK,0,0)) 2294 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_AUTOHSCROLL; 2295 else 2296 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_AUTOHSCROLL; 2297 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 2298 return 1; 2299 } 2300 break; 2301 case IDC_STYLE_VSCROLL: 2302 if(HIWORD(wParam)==BN_CLICKED){ 2303 //変更情報 2304 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2305 2306 if(SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_GETCHECK,0,0)) 2307 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=WS_VSCROLL; 2308 else 2309 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~WS_VSCROLL; 2310 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 2311 return 1; 2312 } 2313 break; 2314 case IDC_ES_AUTOVSCROLL: 2315 if(HIWORD(wParam)==BN_CLICKED){ 2316 //変更情報 2317 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2318 2319 if(SendDlgItemMessage(hwnd,IDC_ES_AUTOVSCROLL,BM_GETCHECK,0,0)) 2320 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_AUTOVSCROLL; 2321 else 2322 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_AUTOVSCROLL; 2323 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 2324 return 1; 2325 } 2326 break; 2327 case IDC_ES_PASSWORD: 2328 if(HIWORD(wParam)==BN_CLICKED){ 2329 //変更情報 2330 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2331 2332 if(SendDlgItemMessage(hwnd,IDC_ES_PASSWORD,BM_GETCHECK,0,0)) 2333 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_PASSWORD; 2334 else 2335 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_PASSWORD; 2336 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 2337 return 1; 2338 } 2339 break; 2340 case IDC_ES_NOHIDESEL: 2341 if(HIWORD(wParam)==BN_CLICKED){ 2342 //変更情報 2343 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2344 2345 if(SendDlgItemMessage(hwnd,IDC_ES_NOHIDESEL,BM_GETCHECK,0,0)) 2346 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_NOHIDESEL; 2347 else 2348 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_NOHIDESEL; 2349 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 2350 return 1; 2351 } 2352 break; 2353 case IDC_ES_OEMCONVERT: 2354 if(HIWORD(wParam)==BN_CLICKED){ 2355 //変更情報 2356 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2357 2358 if(SendDlgItemMessage(hwnd,IDC_ES_OEMCONVERT,BM_GETCHECK,0,0)) 2359 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_OEMCONVERT; 2360 else 2361 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_OEMCONVERT; 2362 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 2363 return 1; 2364 } 2365 break; 2366 case IDC_ES_WANTRETURN: 2367 if(HIWORD(wParam)==BN_CLICKED){ 2368 //変更情報 2369 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2370 2371 if(SendDlgItemMessage(hwnd,IDC_ES_WANTRETURN,BM_GETCHECK,0,0)) 2372 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_WANTRETURN; 2373 else 2374 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_WANTRETURN; 2375 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 2376 return 1; 2377 } 2378 break; 2379 case IDC_ES_UPPERCASE: 2380 if(HIWORD(wParam)==BN_CLICKED){ 2381 //変更情報 2382 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2383 2384 if(SendDlgItemMessage(hwnd,IDC_ES_UPPERCASE,BM_GETCHECK,0,0)){ 2385 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_LOWERCASE; 2386 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_UPPERCASE; 2387 SendDlgItemMessage(hwnd,IDC_ES_LOWERCASE,BM_SETCHECK,BST_UNCHECKED,0); 2388 } 2389 else 2390 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_UPPERCASE; 2391 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 2392 return 1; 2393 } 2394 break; 2395 case IDC_ES_LOWERCASE: 2396 if(HIWORD(wParam)==BN_CLICKED){ 2397 //変更情報 2398 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2399 2400 if(SendDlgItemMessage(hwnd,IDC_ES_LOWERCASE,BM_GETCHECK,0,0)){ 2401 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_UPPERCASE; 2402 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_LOWERCASE; 2403 SendDlgItemMessage(hwnd,IDC_ES_UPPERCASE,BM_SETCHECK,BST_UNCHECKED,0); 2404 } 2405 else 2406 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_LOWERCASE; 2407 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 2408 return 1; 2409 } 2410 break; 2411 case IDC_ES_READONLY: 2412 if(HIWORD(wParam)==BN_CLICKED){ 2413 //変更情報 2414 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2415 2416 if(SendDlgItemMessage(hwnd,IDC_ES_READONLY,BM_GETCHECK,0,0)) 2417 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_READONLY; 2418 else 2419 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_READONLY; 2420 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 2421 return 1; 2422 } 2423 break; 2424 2425 case IDC_ES_TEXTPOS: 2426 if(HIWORD(wParam)==CBN_SELCHANGE){ 2427 //変更情報 2428 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2429 2430 i3=SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_GETCURSEL,0,0); 2431 //ES_LEFT=0 2432 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(ES_CENTER|ES_RIGHT); 2433 if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_CENTER; 2434 else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_RIGHT; 2435 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 2436 return 1; 2437 } 2438 break; 2439 2440 case IDC_EXSTYLE: 2441 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1; 2442 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 2443 return 1; 2444 } 2445 break; 2489 } 2490 break; 2491 } 2446 2492 } 2447 2493 return 0; … … 2460 2506 switch(message){ 2461 2507 case WM_INITDIALOG: 2462 bInitial=1; 2463 i=GetWndNum(GetParent(GetParent(hwnd))); 2464 i2=GetWndInfoNum(MdiInfo[i].path); 2465 2466 SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 2467 SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption); 2468 2469 2470 ///////////////////////////// 2471 // スタイル 2472 //////////// 2473 2474 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 2475 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 2476 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0); 2477 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0); 2478 2479 2480 ////////////////// 2481 // 水平方向の配置 2482 ////////////////// 2483 2484 //"デフォルト" 2485 SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_ADDSTRING,0,(long)STRING_DEFAULT); 2486 //"左端" 2487 SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_ADDSTRING,0,(long)STRING_LEFT); 2488 //"右端" 2489 SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_ADDSTRING,0,(long)STRING_RIGHT); 2490 //"中央" 2491 SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_ADDSTRING,0,(long)STRING_CENTER); 2492 2493 //ビットを考慮してBS_CENTERを最初に検討する 2494 if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_CENTER)==BS_CENTER) SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_SETCURSEL,3,0); 2495 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_LEFT) SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_SETCURSEL,1,0); 2496 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_RIGHT) SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_SETCURSEL,2,0); 2497 else SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_SETCURSEL,0,0); 2498 2499 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_ICON) SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_CHECKED,0); 2500 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BITMAP) SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_CHECKED,0); 2501 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_NOTIFY) SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_SETCHECK,BST_CHECKED,0); 2502 2503 2504 bInitial=0; 2505 break; 2508 { 2509 bInitial=1; 2510 i=GetWndNum(GetParent(GetParent(hwnd))); 2511 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 2512 2513 SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 2514 SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption); 2515 2516 2517 ///////////////////////////// 2518 // スタイル 2519 //////////// 2520 2521 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 2522 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 2523 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0); 2524 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0); 2525 2526 2527 ////////////////// 2528 // 水平方向の配置 2529 ////////////////// 2530 2531 //"デフォルト" 2532 SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_ADDSTRING,0,(long)STRING_DEFAULT); 2533 //"左端" 2534 SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_ADDSTRING,0,(long)STRING_LEFT); 2535 //"右端" 2536 SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_ADDSTRING,0,(long)STRING_RIGHT); 2537 //"中央" 2538 SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_ADDSTRING,0,(long)STRING_CENTER); 2539 2540 //ビットを考慮してBS_CENTERを最初に検討する 2541 if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_CENTER)==BS_CENTER) SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_SETCURSEL,3,0); 2542 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_LEFT) SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_SETCURSEL,1,0); 2543 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_RIGHT) SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_SETCURSEL,2,0); 2544 else SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_SETCURSEL,0,0); 2545 2546 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_ICON) SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_CHECKED,0); 2547 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BITMAP) SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_CHECKED,0); 2548 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_NOTIFY) SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_SETCHECK,BST_CHECKED,0); 2549 2550 2551 bInitial=0; 2552 break; 2553 } 2506 2554 case WM_COMMAND: 2507 2508 i=GetWndNum(GetParent(GetParent(hwnd))); 2509 if(i==-1) return 1; 2510 i2=GetWndInfoNum(MdiInfo[i].path); 2511 2512 //共通スタイル 2513 if(bInitial==0){ 2514 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1; 2515 } 2516 2517 switch(LOWORD(wParam)){ 2518 case IDC_BS_POSITION: 2519 if(HIWORD(wParam)==CBN_SELCHANGE){ 2520 //変更情報 2521 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2522 2523 i3=SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_GETCURSEL,0,0); 2524 //BS_CENTER=BS_LEFT | BS_RIGHT 2525 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_CENTER); 2526 if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_LEFT; 2527 else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_RIGHT; 2528 else if(i3==3) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_CENTER; 2529 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 2555 { 2556 i=GetWndNum(GetParent(GetParent(hwnd))); 2557 if(i==-1) return 1; 2558 i2=GetWndInfoNum(MdiInfo[i].path); 2559 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 2560 2561 //共通スタイル 2562 if(bInitial==0){ 2563 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1; 2564 } 2565 2566 switch(LOWORD(wParam)){ 2567 case IDC_BS_POSITION: 2568 if(HIWORD(wParam)==CBN_SELCHANGE){ 2569 //変更情報 2570 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2571 2572 i3=SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_GETCURSEL,0,0); 2573 //BS_CENTER=BS_LEFT | BS_RIGHT 2574 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_CENTER); 2575 if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_LEFT; 2576 else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_RIGHT; 2577 else if(i3==3) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_CENTER; 2578 DrawRadWindow(i,pWindowInfo); 2579 return 1; 2580 } 2581 break; 2582 2583 case IDC_BS_ICON: 2584 if(HIWORD(wParam)==BN_CLICKED){ 2585 //変更情報 2586 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2587 2588 if(SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_GETCHECK,0,0)) 2589 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_ICON; 2590 else 2591 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON; 2592 DrawRadWindow(i,pWindowInfo); 2593 return 1; 2594 } 2595 break; 2596 case IDC_BS_BITMAP: 2597 if(HIWORD(wParam)==BN_CLICKED){ 2598 //変更情報 2599 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2600 2601 if(SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_GETCHECK,0,0)) 2602 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BITMAP; 2603 else 2604 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP; 2605 DrawRadWindow(i,pWindowInfo); 2606 return 1; 2607 } 2608 break; 2609 case IDC_BS_NOTIFY: 2610 if(HIWORD(wParam)==BN_CLICKED){ 2611 //変更情報 2612 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2613 2614 if(SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_GETCHECK,0,0)) 2615 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_NOTIFY; 2616 else 2617 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_NOTIFY; 2618 return 1; 2619 } 2620 break; 2621 2622 case IDC_EXSTYLE: 2623 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1; 2624 DrawRadWindow(i,pWindowInfo); 2530 2625 return 1; 2531 } 2532 break; 2533 2534 case IDC_BS_ICON: 2535 if(HIWORD(wParam)==BN_CLICKED){ 2536 //変更情報 2537 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2538 2539 if(SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_GETCHECK,0,0)) 2540 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_ICON; 2541 else 2542 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON; 2543 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 2544 return 1; 2545 } 2546 break; 2547 case IDC_BS_BITMAP: 2548 if(HIWORD(wParam)==BN_CLICKED){ 2549 //変更情報 2550 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2551 2552 if(SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_GETCHECK,0,0)) 2553 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BITMAP; 2554 else 2555 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP; 2556 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 2557 return 1; 2558 } 2559 break; 2560 case IDC_BS_NOTIFY: 2561 if(HIWORD(wParam)==BN_CLICKED){ 2562 //変更情報 2563 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2564 2565 if(SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_GETCHECK,0,0)) 2566 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_NOTIFY; 2567 else 2568 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_NOTIFY; 2569 return 1; 2570 } 2571 break; 2572 2573 case IDC_EXSTYLE: 2574 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1; 2575 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 2576 return 1; 2577 } 2578 break; 2626 } 2627 break; 2628 } 2579 2629 } 2580 2630 return 0; … … 2610 2660 switch(message){ 2611 2661 case WM_INITDIALOG: 2612 bInitial=1; 2613 i=GetWndNum(GetParent(GetParent(hwnd))); 2614 i2=GetWndInfoNum(MdiInfo[i].path); 2615 2616 SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 2617 2618 2619 ///////////////////////////// 2620 // スタイル 2621 //////////// 2622 2623 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 2624 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 2625 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0); 2626 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0); 2627 2628 ////////// 2629 // タイプ 2630 ////////// 2631 2632 //"フレーム(黒)" 2633 SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_FRAME_BLACK); 2634 //"フレーム(灰色)" 2635 SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_FRAME_GRAY); 2636 //"フレーム(白)" 2637 SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_FRAME_WHITE); 2638 //"フレーム(縁取り)" 2639 SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_FRAME_ETCHED); 2640 //"四角形(黒)" 2641 SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_RECT_BLACK); 2642 //"四角形(灰色)" 2643 SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_RECT_GRAY); 2644 //"四角形(白)" 2645 SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_RECT_WHITE); 2646 //"アイコン" 2647 SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_ICON); 2648 //"ビットマップ" 2649 SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_BITMAP); 2650 2651 if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BLACKFRAME) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,0,0); 2652 else if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_GRAYFRAME) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,1,0); 2653 else if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_WHITEFRAME) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,2,0); 2654 else if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000001F)==SS_ETCHEDFRAME) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,3,0); 2655 else if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BLACKRECT) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,4,0); 2656 else if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_GRAYRECT) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,5,0); 2657 else if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_WHITERECT) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,6,0); 2658 if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_ICON|| 2659 (ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BITMAP){ 2660 if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_ICON) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,7,0); 2661 else if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BITMAP) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,8,0); 2662 2663 //リソース/ファイル スイッチチェックを表示 2664 ShowWindow(GetDlgItem(hwnd,IDC_FILE),SW_SHOW); 2665 ShowWindow(GetDlgItem(hwnd,IDC_RESOURCE),SW_SHOW); 2666 2667 //イメージ状態テキストを表示 2668 ShowWindow(GetDlgItem(hwnd,IDC_IMAGE_SITUATION),SW_SHOW); 2669 2670 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type==IMGTYPE_FILE){ 2671 //ファイル指定を表示 2672 ShowWindow(GetDlgItem(hwnd,IDC_PATH),SW_SHOW); 2673 ShowWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),SW_SHOW); 2674 SetDlgItemText(hwnd,IDC_PATH,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path); 2675 2676 //イメージ状態テキスト 2677 //"ファイル指定:" 2678 SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMFILE); 2679 2680 SendDlgItemMessage(hwnd,IDC_FILE,BM_SETCHECK,BST_CHECKED,0); 2662 { 2663 bInitial=1; 2664 i=GetWndNum(GetParent(GetParent(hwnd))); 2665 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 2666 2667 SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 2668 2669 2670 ///////////////////////////// 2671 // スタイル 2672 //////////// 2673 2674 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 2675 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 2676 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0); 2677 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0); 2678 2679 ////////// 2680 // タイプ 2681 ////////// 2682 2683 //"フレーム(黒)" 2684 SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_FRAME_BLACK); 2685 //"フレーム(灰色)" 2686 SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_FRAME_GRAY); 2687 //"フレーム(白)" 2688 SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_FRAME_WHITE); 2689 //"フレーム(縁取り)" 2690 SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_FRAME_ETCHED); 2691 //"四角形(黒)" 2692 SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_RECT_BLACK); 2693 //"四角形(灰色)" 2694 SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_RECT_GRAY); 2695 //"四角形(白)" 2696 SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_RECT_WHITE); 2697 //"アイコン" 2698 SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_ICON); 2699 //"ビットマップ" 2700 SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_BITMAP); 2701 2702 if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BLACKFRAME) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,0,0); 2703 else if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_GRAYFRAME) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,1,0); 2704 else if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_WHITEFRAME) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,2,0); 2705 else if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000001F)==SS_ETCHEDFRAME) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,3,0); 2706 else if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BLACKRECT) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,4,0); 2707 else if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_GRAYRECT) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,5,0); 2708 else if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_WHITERECT) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,6,0); 2709 if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_ICON|| 2710 (pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BITMAP){ 2711 if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_ICON) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,7,0); 2712 else if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BITMAP) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,8,0); 2713 2714 //リソース/ファイル スイッチチェックを表示 2715 ShowWindow(GetDlgItem(hwnd,IDC_FILE),SW_SHOW); 2716 ShowWindow(GetDlgItem(hwnd,IDC_RESOURCE),SW_SHOW); 2717 2718 //イメージ状態テキストを表示 2719 ShowWindow(GetDlgItem(hwnd,IDC_IMAGE_SITUATION),SW_SHOW); 2720 2721 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type==IMGTYPE_FILE){ 2722 //ファイル指定を表示 2723 ShowWindow(GetDlgItem(hwnd,IDC_PATH),SW_SHOW); 2724 ShowWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),SW_SHOW); 2725 SetDlgItemText(hwnd,IDC_PATH,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path); 2726 2727 //イメージ状態テキスト 2728 //"ファイル指定:" 2729 SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMFILE); 2730 2731 SendDlgItemMessage(hwnd,IDC_FILE,BM_SETCHECK,BST_CHECKED,0); 2732 } 2733 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type==IMGTYPE_RES){ 2734 //リソース指定を表示 2735 ShowWindow(GetDlgItem(hwnd,IDC_RESCOMBO),SW_SHOW); 2736 2737 //イメージ状態テキスト 2738 //"リソース指定:" 2739 SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMRESOURCE); 2740 2741 SendDlgItemMessage(hwnd,IDC_RESOURCE,BM_SETCHECK,BST_CHECKED,0); 2742 2743 SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_RESETCONTENT,0,0); 2744 2745 if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_ICON){ 2746 //アイコンリソースをコンボボックスに挿入 2747 for(i3=0;i3<ProjectInfo.res.NumberOfIconRes;i3++) 2748 SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)ProjectInfo.res.pIconResInfo[i3].IdName); 2749 } 2750 else if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BITMAP){ 2751 //ビットマップリソースをコンボボックスに挿入 2752 for(i3=0;i3<ProjectInfo.res.NumberOfBitmapRes;i3++) 2753 SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)ProjectInfo.res.pBitmapResInfo[i3].IdName); 2754 } 2755 2756 //リストから選択 2757 i3=SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_FINDSTRING,0,(long)pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path); 2758 SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_SETCURSEL,i3,0); 2759 } 2681 2760 } 2682 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type==IMGTYPE_RES){ 2683 //リソース指定を表示 2684 ShowWindow(GetDlgItem(hwnd,IDC_RESCOMBO),SW_SHOW); 2685 2686 //イメージ状態テキスト 2687 //"リソース指定:" 2688 SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMRESOURCE); 2689 2690 SendDlgItemMessage(hwnd,IDC_RESOURCE,BM_SETCHECK,BST_CHECKED,0); 2691 2692 SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_RESETCONTENT,0,0); 2693 2694 if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_ICON){ 2695 //アイコンリソースをコンボボックスに挿入 2696 for(i3=0;i3<ProjectInfo.res.NumberOfIconRes;i3++) 2697 SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)ProjectInfo.res.pIconResInfo[i3].IdName); 2698 } 2699 else if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BITMAP){ 2700 //ビットマップリソースをコンボボックスに挿入 2701 for(i3=0;i3<ProjectInfo.res.NumberOfBitmapRes;i3++) 2702 SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)ProjectInfo.res.pBitmapResInfo[i3].IdName); 2703 } 2704 2705 //リストから選択 2706 i3=SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_FINDSTRING,0,(long)ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path); 2707 SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_SETCURSEL,i3,0); 2761 2762 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_NOTIFY) SendDlgItemMessage(hwnd,IDC_SS_NOTIFY,BM_SETCHECK,BST_CHECKED,0); 2763 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_CENTERIMAGE) SendDlgItemMessage(hwnd,IDC_SS_CENTERIMAGE,BM_SETCHECK,BST_CHECKED,0); 2764 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_RIGHTJUST) SendDlgItemMessage(hwnd,IDC_SS_RIGHTJUST,BM_SETCHECK,BST_CHECKED,0); 2765 2766 RadProperty_ImageBox_StylingOrder(hwnd,&pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2767 2768 bInitial=0; 2769 break; 2770 } 2771 case WM_COMMAND: 2772 { 2773 i=GetWndNum(GetParent(GetParent(hwnd))); 2774 if(i==-1) return 1; 2775 i2=GetWndInfoNum(MdiInfo[i].path); 2776 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 2777 2778 //共通スタイル 2779 if(bInitial==0){ 2780 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1; 2708 2781 } 2709 } 2710 2711 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_NOTIFY) SendDlgItemMessage(hwnd,IDC_SS_NOTIFY,BM_SETCHECK,BST_CHECKED,0); 2712 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_CENTERIMAGE) SendDlgItemMessage(hwnd,IDC_SS_CENTERIMAGE,BM_SETCHECK,BST_CHECKED,0); 2713 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_RIGHTJUST) SendDlgItemMessage(hwnd,IDC_SS_RIGHTJUST,BM_SETCHECK,BST_CHECKED,0); 2714 2715 RadProperty_ImageBox_StylingOrder(hwnd,&ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2716 2717 bInitial=0; 2718 break; 2719 case WM_COMMAND: 2720 2721 i=GetWndNum(GetParent(GetParent(hwnd))); 2722 if(i==-1) return 1; 2723 i2=GetWndInfoNum(MdiInfo[i].path); 2724 2725 //共通スタイル 2726 if(bInitial==0){ 2727 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1; 2728 } 2729 2730 switch(LOWORD(wParam)){ 2731 case IDC_IMAGE_TYPE: 2732 if(HIWORD(wParam)==CBN_SELCHANGE){ 2733 //変更情報 2734 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2735 2736 i3=SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_GETCURSEL,0,0); 2737 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(0x0000001F); 2738 if(i3==0) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_BLACKFRAME; 2739 else if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_GRAYFRAME; 2740 else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_WHITEFRAME; 2741 else if(i3==3) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_ETCHEDFRAME; 2742 else if(i3==4) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_BLACKRECT; 2743 else if(i3==5) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_GRAYRECT; 2744 else if(i3==6) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_WHITERECT; 2745 else if(i3==7) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_ICON; 2746 else if(i3==8) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_BITMAP; 2747 2748 if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_ICON|| 2749 (ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BITMAP){ 2750 //リソース/ファイル スイッチチェックを表示 2751 ShowWindow(GetDlgItem(hwnd,IDC_FILE),SW_SHOW); 2752 ShowWindow(GetDlgItem(hwnd,IDC_RESOURCE),SW_SHOW); 2753 2754 //イメージ状態テキストを表示 2755 ShowWindow(GetDlgItem(hwnd,IDC_IMAGE_SITUATION),SW_SHOW); 2756 2757 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type==IMGTYPE_FILE){ 2758 //ファイル指定を表示 2759 ShowWindow(GetDlgItem(hwnd,IDC_PATH),SW_SHOW); 2760 ShowWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),SW_SHOW); 2761 SetDlgItemText(hwnd,IDC_PATH,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path); 2762 2763 //イメージ状態テキスト 2764 //"ファイル指定:" 2765 SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMFILE); 2766 2767 SendDlgItemMessage(hwnd,IDC_FILE,BM_SETCHECK,BST_CHECKED,0); 2768 } 2769 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type==IMGTYPE_RES){ 2770 //リソース指定を表示 2771 ShowWindow(GetDlgItem(hwnd,IDC_RESCOMBO),SW_SHOW); 2772 2773 //イメージ状態テキスト 2774 //"リソース指定:" 2775 SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMRESOURCE); 2776 2777 SendDlgItemMessage(hwnd,IDC_RESOURCE,BM_SETCHECK,BST_CHECKED,0); 2778 2779 SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_RESETCONTENT,0,0); 2780 2781 if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_ICON){ 2782 //アイコンリソースをコンボボックスに挿入 2783 for(i3=0;i3<ProjectInfo.res.NumberOfIconRes;i3++){ 2784 SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)ProjectInfo.res.pIconResInfo[i3].IdName); 2785 2786 if(lstrcmp(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path,ProjectInfo.res.pIconResInfo[i3].IdName)==0) 2787 SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_SETCURSEL,i3,0); 2782 2783 switch(LOWORD(wParam)){ 2784 case IDC_IMAGE_TYPE: 2785 if(HIWORD(wParam)==CBN_SELCHANGE){ 2786 //変更情報 2787 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2788 2789 i3=SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_GETCURSEL,0,0); 2790 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(0x0000001F); 2791 if(i3==0) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_BLACKFRAME; 2792 else if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_GRAYFRAME; 2793 else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_WHITEFRAME; 2794 else if(i3==3) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_ETCHEDFRAME; 2795 else if(i3==4) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_BLACKRECT; 2796 else if(i3==5) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_GRAYRECT; 2797 else if(i3==6) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_WHITERECT; 2798 else if(i3==7) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_ICON; 2799 else if(i3==8) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_BITMAP; 2800 2801 if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_ICON|| 2802 (pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BITMAP){ 2803 //リソース/ファイル スイッチチェックを表示 2804 ShowWindow(GetDlgItem(hwnd,IDC_FILE),SW_SHOW); 2805 ShowWindow(GetDlgItem(hwnd,IDC_RESOURCE),SW_SHOW); 2806 2807 //イメージ状態テキストを表示 2808 ShowWindow(GetDlgItem(hwnd,IDC_IMAGE_SITUATION),SW_SHOW); 2809 2810 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type==IMGTYPE_FILE){ 2811 //ファイル指定を表示 2812 ShowWindow(GetDlgItem(hwnd,IDC_PATH),SW_SHOW); 2813 ShowWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),SW_SHOW); 2814 SetDlgItemText(hwnd,IDC_PATH,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path); 2815 2816 //イメージ状態テキスト 2817 //"ファイル指定:" 2818 SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMFILE); 2819 2820 SendDlgItemMessage(hwnd,IDC_FILE,BM_SETCHECK,BST_CHECKED,0); 2821 } 2822 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type==IMGTYPE_RES){ 2823 //リソース指定を表示 2824 ShowWindow(GetDlgItem(hwnd,IDC_RESCOMBO),SW_SHOW); 2825 2826 //イメージ状態テキスト 2827 //"リソース指定:" 2828 SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMRESOURCE); 2829 2830 SendDlgItemMessage(hwnd,IDC_RESOURCE,BM_SETCHECK,BST_CHECKED,0); 2831 2832 SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_RESETCONTENT,0,0); 2833 2834 if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_ICON){ 2835 //アイコンリソースをコンボボックスに挿入 2836 for(i3=0;i3<ProjectInfo.res.NumberOfIconRes;i3++){ 2837 SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)ProjectInfo.res.pIconResInfo[i3].IdName); 2838 2839 if(lstrcmp(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path,ProjectInfo.res.pIconResInfo[i3].IdName)==0) 2840 SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_SETCURSEL,i3,0); 2841 } 2788 2842 } 2789 }2790 else if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BITMAP){2791 //ビットマップリソースをコンボボックスに挿入2792 for(i3=0;i3<ProjectInfo.res.NumberOfBitmapRes;i3++){2793 SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)ProjectInfo.res.pBitmapResInfo[i3].IdName); 2794 2795 if(lstrcmp(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path,ProjectInfo.res.pBitmapResInfo[i3].IdName)==0)2796 SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_SETCURSEL,i3,0);2843 else if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BITMAP){ 2844 //ビットマップリソースをコンボボックスに挿入 2845 for(i3=0;i3<ProjectInfo.res.NumberOfBitmapRes;i3++){ 2846 SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)ProjectInfo.res.pBitmapResInfo[i3].IdName); 2847 2848 if(lstrcmp(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path,ProjectInfo.res.pBitmapResInfo[i3].IdName)==0) 2849 SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_SETCURSEL,i3,0); 2850 } 2797 2851 } 2798 2852 } 2799 2853 } 2800 } 2801 else{ 2802 //リソース/ファイル スイッチチェックを非表示 2803 ShowWindow(GetDlgItem(hwnd,IDC_FILE),SW_HIDE); 2804 ShowWindow(GetDlgItem(hwnd,IDC_RESOURCE),SW_HIDE); 2805 2806 //イメージ状態テキストを非表示 2807 ShowWindow(GetDlgItem(hwnd,IDC_IMAGE_SITUATION),SW_HIDE); 2808 2809 //ファイル指定を非表示 2810 ShowWindow(GetDlgItem(hwnd,IDC_PATH),SW_HIDE); 2811 ShowWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),SW_HIDE); 2812 2813 //リソース指定を非表示 2814 ShowWindow(GetDlgItem(hwnd,IDC_RESCOMBO),SW_HIDE); 2815 } 2816 2817 RadProperty_ImageBox_StylingOrder(hwnd,&ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2818 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 2854 else{ 2855 //リソース/ファイル スイッチチェックを非表示 2856 ShowWindow(GetDlgItem(hwnd,IDC_FILE),SW_HIDE); 2857 ShowWindow(GetDlgItem(hwnd,IDC_RESOURCE),SW_HIDE); 2858 2859 //イメージ状態テキストを非表示 2860 ShowWindow(GetDlgItem(hwnd,IDC_IMAGE_SITUATION),SW_HIDE); 2861 2862 //ファイル指定を非表示 2863 ShowWindow(GetDlgItem(hwnd,IDC_PATH),SW_HIDE); 2864 ShowWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),SW_HIDE); 2865 2866 //リソース指定を非表示 2867 ShowWindow(GetDlgItem(hwnd,IDC_RESCOMBO),SW_HIDE); 2868 } 2869 2870 RadProperty_ImageBox_StylingOrder(hwnd,&pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2871 DrawRadWindow(i,pWindowInfo); 2872 return 1; 2873 } 2874 break; 2875 2876 case IDC_FILE: 2877 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type==IMGTYPE_FILE){ 2878 //変更無し 2879 break; 2880 } 2881 2882 //変更情報 2883 Rad_NoticeChanging(i,RAD_UNDO_IMAGESTATE,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo); 2884 2885 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type=IMGTYPE_FILE; 2886 2887 //ファイル指定を表示 2888 ShowWindow(GetDlgItem(hwnd,IDC_PATH),SW_SHOW); 2889 ShowWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),SW_SHOW); 2890 SetDlgItemText(hwnd,IDC_PATH,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path); 2891 2892 //リソース指定を非表示 2893 ShowWindow(GetDlgItem(hwnd,IDC_RESCOMBO),SW_HIDE); 2894 2895 //イメージ状態テキスト 2896 //"ファイル指定:" 2897 SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMFILE); 2898 2899 SendDlgItemMessage(hwnd,IDC_FILE,BM_SETCHECK,BST_CHECKED,0); 2900 break; 2901 2902 case IDC_RESOURCE: 2903 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type==IMGTYPE_RES){ 2904 //変更無し 2905 break; 2906 } 2907 2908 //変更情報 2909 Rad_NoticeChanging(i,RAD_UNDO_IMAGESTATE,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo); 2910 2911 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type=IMGTYPE_RES; 2912 2913 //ファイル指定を非表示 2914 ShowWindow(GetDlgItem(hwnd,IDC_PATH),SW_HIDE); 2915 ShowWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),SW_HIDE); 2916 2917 //リソース指定を表示 2918 ShowWindow(GetDlgItem(hwnd,IDC_RESCOMBO),SW_SHOW); 2919 2920 //イメージ状態テキスト 2921 //"リソース指定:" 2922 SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMRESOURCE); 2923 2924 SendDlgItemMessage(hwnd,IDC_RESOURCE,BM_SETCHECK,BST_CHECKED,0); 2925 2926 SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_RESETCONTENT,0,0); 2927 2928 if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_ICON){ 2929 //アイコンリソースをコンボボックスに挿入 2930 for(i3=0;i3<ProjectInfo.res.NumberOfIconRes;i3++) 2931 SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)ProjectInfo.res.pIconResInfo[i3].IdName); 2932 } 2933 else if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BITMAP){ 2934 //ビットマップリソースをコンボボックスに挿入 2935 for(i3=0;i3<ProjectInfo.res.NumberOfBitmapRes;i3++) 2936 SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)ProjectInfo.res.pBitmapResInfo[i3].IdName); 2937 } 2938 break; 2939 2940 case IDC_RESCOMBO: 2941 if(HIWORD(wParam)==CBN_SELCHANGE){ 2942 //変更情報 2943 Rad_NoticeChanging(i,RAD_UNDO_IMAGESTATE,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo); 2944 2945 i3=SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_GETCURSEL,0,0); 2946 SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_GETLBTEXT,i3,(long)temporary); 2947 2948 HeapDefaultFree(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path); 2949 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1); 2950 lstrcpy(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path,temporary); 2951 2952 DrawRadWindow(i,pWindowInfo); 2953 } 2954 break; 2955 2956 case IDC_CHANGEPATH: 2957 if(HIWORD(wParam)==BN_CLICKED){ 2958 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type==IMGTYPE_FILE){ 2959 if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x000F)==SS_ICON){ 2960 extern LPSTR IconFileFilter; 2961 //"アイコン ファイルを指定して下さい" 2962 if(!GetFilePathDialog(hwnd,temporary,IconFileFilter,STRING_IMAGEBOXPROP_GETPATH_ICON,1)) return 1; 2963 } 2964 else if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x000F)==SS_BITMAP){ 2965 extern LPSTR BitmapFileFilter; 2966 //"ビットマップ ファイルを指定して下さい" 2967 if(!GetFilePathDialog(hwnd,temporary,BitmapFileFilter,STRING_IMAGEBOXPROP_GETPATH_BITMAP,1)) return 1; 2968 } 2969 2970 //変更情報 2971 Rad_NoticeChanging(i,RAD_UNDO_IMAGESTATE,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo); 2972 2973 GetRelationalPath(temporary,ProjectInfo.dir); 2974 HeapDefaultFree(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path); 2975 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1); 2976 lstrcpy(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path,temporary); 2977 2978 SetDlgItemText(hwnd,IDC_PATH,temporary); 2979 DrawRadWindow(i,pWindowInfo); 2980 } 2981 return 1; 2982 } 2983 break; 2984 2985 case IDC_SS_NOTIFY: 2986 if(HIWORD(wParam)==BN_CLICKED){ 2987 //変更情報 2988 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2989 2990 if(SendDlgItemMessage(hwnd,IDC_SS_NOTIFY,BM_GETCHECK,0,0)) 2991 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_NOTIFY; 2992 else 2993 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~SS_NOTIFY; 2994 return 1; 2995 } 2996 break; 2997 case IDC_SS_CENTERIMAGE: 2998 if(HIWORD(wParam)==BN_CLICKED){ 2999 //変更情報 3000 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3001 3002 if(SendDlgItemMessage(hwnd,IDC_SS_CENTERIMAGE,BM_GETCHECK,0,0)) 3003 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_CENTERIMAGE; 3004 else 3005 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~SS_CENTERIMAGE; 3006 return 1; 3007 } 3008 break; 3009 case IDC_SS_RIGHTJUST: 3010 if(HIWORD(wParam)==BN_CLICKED){ 3011 //変更情報 3012 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3013 3014 if(SendDlgItemMessage(hwnd,IDC_SS_RIGHTJUST,BM_GETCHECK,0,0)) 3015 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_RIGHTJUST; 3016 else 3017 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~SS_RIGHTJUST; 3018 return 1; 3019 } 3020 break; 3021 3022 case IDC_EXSTYLE: 3023 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1; 3024 DrawRadWindow(i,pWindowInfo); 2819 3025 return 1; 2820 } 2821 break; 2822 2823 case IDC_FILE: 2824 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type==IMGTYPE_FILE){ 2825 //変更無し 2826 break; 2827 } 2828 2829 //変更情報 2830 Rad_NoticeChanging(i,RAD_UNDO_IMAGESTATE,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo); 2831 2832 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type=IMGTYPE_FILE; 2833 2834 //ファイル指定を表示 2835 ShowWindow(GetDlgItem(hwnd,IDC_PATH),SW_SHOW); 2836 ShowWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),SW_SHOW); 2837 SetDlgItemText(hwnd,IDC_PATH,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path); 2838 2839 //リソース指定を非表示 2840 ShowWindow(GetDlgItem(hwnd,IDC_RESCOMBO),SW_HIDE); 2841 2842 //イメージ状態テキスト 2843 //"ファイル指定:" 2844 SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMFILE); 2845 2846 SendDlgItemMessage(hwnd,IDC_FILE,BM_SETCHECK,BST_CHECKED,0); 2847 break; 2848 2849 case IDC_RESOURCE: 2850 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type==IMGTYPE_RES){ 2851 //変更無し 2852 break; 2853 } 2854 2855 //変更情報 2856 Rad_NoticeChanging(i,RAD_UNDO_IMAGESTATE,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo); 2857 2858 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type=IMGTYPE_RES; 2859 2860 //ファイル指定を非表示 2861 ShowWindow(GetDlgItem(hwnd,IDC_PATH),SW_HIDE); 2862 ShowWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),SW_HIDE); 2863 2864 //リソース指定を表示 2865 ShowWindow(GetDlgItem(hwnd,IDC_RESCOMBO),SW_SHOW); 2866 2867 //イメージ状態テキスト 2868 //"リソース指定:" 2869 SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMRESOURCE); 2870 2871 SendDlgItemMessage(hwnd,IDC_RESOURCE,BM_SETCHECK,BST_CHECKED,0); 2872 2873 SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_RESETCONTENT,0,0); 2874 2875 if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_ICON){ 2876 //アイコンリソースをコンボボックスに挿入 2877 for(i3=0;i3<ProjectInfo.res.NumberOfIconRes;i3++) 2878 SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)ProjectInfo.res.pIconResInfo[i3].IdName); 2879 } 2880 else if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BITMAP){ 2881 //ビットマップリソースをコンボボックスに挿入 2882 for(i3=0;i3<ProjectInfo.res.NumberOfBitmapRes;i3++) 2883 SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)ProjectInfo.res.pBitmapResInfo[i3].IdName); 2884 } 2885 break; 2886 2887 case IDC_RESCOMBO: 2888 if(HIWORD(wParam)==CBN_SELCHANGE){ 2889 //変更情報 2890 Rad_NoticeChanging(i,RAD_UNDO_IMAGESTATE,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo); 2891 2892 i3=SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_GETCURSEL,0,0); 2893 SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_GETLBTEXT,i3,(long)temporary); 2894 2895 HeapDefaultFree(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path); 2896 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1); 2897 lstrcpy(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path,temporary); 2898 2899 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 2900 } 2901 break; 2902 2903 case IDC_CHANGEPATH: 2904 if(HIWORD(wParam)==BN_CLICKED){ 2905 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type==IMGTYPE_FILE){ 2906 if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x000F)==SS_ICON){ 2907 extern LPSTR IconFileFilter; 2908 //"アイコン ファイルを指定して下さい" 2909 if(!GetFilePathDialog(hwnd,temporary,IconFileFilter,STRING_IMAGEBOXPROP_GETPATH_ICON,1)) return 1; 2910 } 2911 else if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x000F)==SS_BITMAP){ 2912 extern LPSTR BitmapFileFilter; 2913 //"ビットマップ ファイルを指定して下さい" 2914 if(!GetFilePathDialog(hwnd,temporary,BitmapFileFilter,STRING_IMAGEBOXPROP_GETPATH_BITMAP,1)) return 1; 2915 } 2916 2917 //変更情報 2918 Rad_NoticeChanging(i,RAD_UNDO_IMAGESTATE,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo); 2919 2920 GetRelationalPath(temporary,ProjectInfo.dir); 2921 HeapDefaultFree(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path); 2922 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1); 2923 lstrcpy(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path,temporary); 2924 2925 SetDlgItemText(hwnd,IDC_PATH,temporary); 2926 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 2927 } 2928 return 1; 2929 } 2930 break; 2931 2932 case IDC_SS_NOTIFY: 2933 if(HIWORD(wParam)==BN_CLICKED){ 2934 //変更情報 2935 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2936 2937 if(SendDlgItemMessage(hwnd,IDC_SS_NOTIFY,BM_GETCHECK,0,0)) 2938 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_NOTIFY; 2939 else 2940 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~SS_NOTIFY; 2941 return 1; 2942 } 2943 break; 2944 case IDC_SS_CENTERIMAGE: 2945 if(HIWORD(wParam)==BN_CLICKED){ 2946 //変更情報 2947 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2948 2949 if(SendDlgItemMessage(hwnd,IDC_SS_CENTERIMAGE,BM_GETCHECK,0,0)) 2950 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_CENTERIMAGE; 2951 else 2952 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~SS_CENTERIMAGE; 2953 return 1; 2954 } 2955 break; 2956 case IDC_SS_RIGHTJUST: 2957 if(HIWORD(wParam)==BN_CLICKED){ 2958 //変更情報 2959 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 2960 2961 if(SendDlgItemMessage(hwnd,IDC_SS_RIGHTJUST,BM_GETCHECK,0,0)) 2962 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_RIGHTJUST; 2963 else 2964 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~SS_RIGHTJUST; 2965 return 1; 2966 } 2967 break; 2968 2969 case IDC_EXSTYLE: 2970 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1; 2971 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 2972 return 1; 2973 } 2974 break; 3026 } 3027 break; 3028 } 2975 3029 } 2976 3030 return 0; … … 2988 3042 switch(message){ 2989 3043 case WM_INITDIALOG: 2990 bInitial=1; 2991 i=GetWndNum(GetParent(GetParent(hwnd))); 2992 i2=GetWndInfoNum(MdiInfo[i].path); 2993 2994 SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 2995 2996 2997 ///////////////////////// 2998 // スタイル 2999 //////////// 3000 3001 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 3002 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 3003 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0); 3004 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0); 3005 3006 //////// 3007 // 表示 3008 //////// 3009 3010 //"アイコン" 3011 SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_ADDSTRING,0,(long)STRING_LISTVIEWPROP_STYLE_ICON); 3012 //"小さいアイコン" 3013 SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_ADDSTRING,0,(long)STRING_LISTVIEWPROP_STYLE_SMALLICON); 3014 //"リスト" 3015 SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_ADDSTRING,0,(long)STRING_LISTVIEWPROP_STYLE_LIST); 3016 //"レポート" 3017 SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_ADDSTRING,0,(long)STRING_LISTVIEWPROP_STYLE_REPORT); 3018 3019 //ビットを考慮してLVS_LISTを最初に比較する 3020 if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_LIST)==LVS_LIST) SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_SETCURSEL,2,0); 3021 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_SMALLICON) SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_SETCURSEL,1,0); 3022 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_REPORT) SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_SETCURSEL,3,0); 3023 else SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_SETCURSEL,0,0); 3024 3025 3026 //////// 3027 // 配置 3028 //////// 3029 3030 //"上端" 3031 SendDlgItemMessage(hwnd,IDC_LVS_POSITION,CB_ADDSTRING,0,(long)STRING_TOP); 3032 //"左端" 3033 SendDlgItemMessage(hwnd,IDC_LVS_POSITION,CB_ADDSTRING,0,(long)STRING_LEFT); 3034 3035 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_ALIGNLEFT) SendDlgItemMessage(hwnd,IDC_LVS_POSITION,CB_SETCURSEL,1,0); 3036 else SendDlgItemMessage(hwnd,IDC_LVS_POSITION,CB_SETCURSEL,0,0); 3037 3038 3039 ////////// 3040 // ソート 3041 ////////// 3042 3043 //"なし" 3044 SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_ADDSTRING,0,(long)STRING_NONE_); 3045 //"昇順" 3046 SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_ADDSTRING,0,(long)STRING_SORT_ASCENDING); 3047 //"降順" 3048 SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_ADDSTRING,0,(long)STRING_SORT_DESCENDING); 3049 3050 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_SORTASCENDING) SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_SETCURSEL,1,0); 3051 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_SORTDESCENDING) SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_SETCURSEL,2,0); 3052 else SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_SETCURSEL,0,0); 3053 3054 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_SINGLESEL) SendDlgItemMessage(hwnd,IDC_LVS_SINGLESEL,BM_SETCHECK,BST_CHECKED,0); 3055 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_AUTOARRANGE) SendDlgItemMessage(hwnd,IDC_LVS_AUTOARRANGE,BM_SETCHECK,BST_CHECKED,0); 3056 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_NOLABELWRAP) SendDlgItemMessage(hwnd,IDC_LVS_NOLABELWRAP,BM_SETCHECK,BST_CHECKED,0); 3057 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_EDITLABELS) SendDlgItemMessage(hwnd,IDC_LVS_EDITLABELS,BM_SETCHECK,BST_CHECKED,0); 3058 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_NOSCROLL) SendDlgItemMessage(hwnd,IDC_LVS_NOSCROLL,BM_SETCHECK,BST_CHECKED,0); 3059 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_NOCOLUMNHEADER) SendDlgItemMessage(hwnd,IDC_LVS_NOCOLUMNHEADER,BM_SETCHECK,BST_CHECKED,0); 3060 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_NOSORTHEADER) SendDlgItemMessage(hwnd,IDC_LVS_NOSORTHEADER,BM_SETCHECK,BST_CHECKED,0); 3061 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_SHOWSELALWAYS) SendDlgItemMessage(hwnd,IDC_LVS_SHOWSELALWAYS,BM_SETCHECK,BST_CHECKED,0); 3062 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_OWNERDRAWFIXED) SendDlgItemMessage(hwnd,IDC_LVS_OWNERDRAWFIXED,BM_SETCHECK,BST_CHECKED,0); 3063 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_SHAREIMAGELISTS) SendDlgItemMessage(hwnd,IDC_LVS_SHAREIMAGELISTS,BM_SETCHECK,BST_CHECKED,0); 3064 3065 3066 bInitial=0; 3067 break; 3044 { 3045 bInitial=1; 3046 i=GetWndNum(GetParent(GetParent(hwnd))); 3047 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 3048 3049 SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 3050 3051 3052 ///////////////////////// 3053 // スタイル 3054 //////////// 3055 3056 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 3057 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 3058 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0); 3059 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0); 3060 3061 //////// 3062 // 表示 3063 //////// 3064 3065 //"アイコン" 3066 SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_ADDSTRING,0,(long)STRING_LISTVIEWPROP_STYLE_ICON); 3067 //"小さいアイコン" 3068 SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_ADDSTRING,0,(long)STRING_LISTVIEWPROP_STYLE_SMALLICON); 3069 //"リスト" 3070 SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_ADDSTRING,0,(long)STRING_LISTVIEWPROP_STYLE_LIST); 3071 //"レポート" 3072 SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_ADDSTRING,0,(long)STRING_LISTVIEWPROP_STYLE_REPORT); 3073 3074 //ビットを考慮してLVS_LISTを最初に比較する 3075 if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_LIST)==LVS_LIST) SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_SETCURSEL,2,0); 3076 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_SMALLICON) SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_SETCURSEL,1,0); 3077 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_REPORT) SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_SETCURSEL,3,0); 3078 else SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_SETCURSEL,0,0); 3079 3080 3081 //////// 3082 // 配置 3083 //////// 3084 3085 //"上端" 3086 SendDlgItemMessage(hwnd,IDC_LVS_POSITION,CB_ADDSTRING,0,(long)STRING_TOP); 3087 //"左端" 3088 SendDlgItemMessage(hwnd,IDC_LVS_POSITION,CB_ADDSTRING,0,(long)STRING_LEFT); 3089 3090 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_ALIGNLEFT) SendDlgItemMessage(hwnd,IDC_LVS_POSITION,CB_SETCURSEL,1,0); 3091 else SendDlgItemMessage(hwnd,IDC_LVS_POSITION,CB_SETCURSEL,0,0); 3092 3093 3094 ////////// 3095 // ソート 3096 ////////// 3097 3098 //"なし" 3099 SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_ADDSTRING,0,(long)STRING_NONE_); 3100 //"昇順" 3101 SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_ADDSTRING,0,(long)STRING_SORT_ASCENDING); 3102 //"降順" 3103 SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_ADDSTRING,0,(long)STRING_SORT_DESCENDING); 3104 3105 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_SORTASCENDING) SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_SETCURSEL,1,0); 3106 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_SORTDESCENDING) SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_SETCURSEL,2,0); 3107 else SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_SETCURSEL,0,0); 3108 3109 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_SINGLESEL) SendDlgItemMessage(hwnd,IDC_LVS_SINGLESEL,BM_SETCHECK,BST_CHECKED,0); 3110 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_AUTOARRANGE) SendDlgItemMessage(hwnd,IDC_LVS_AUTOARRANGE,BM_SETCHECK,BST_CHECKED,0); 3111 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_NOLABELWRAP) SendDlgItemMessage(hwnd,IDC_LVS_NOLABELWRAP,BM_SETCHECK,BST_CHECKED,0); 3112 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_EDITLABELS) SendDlgItemMessage(hwnd,IDC_LVS_EDITLABELS,BM_SETCHECK,BST_CHECKED,0); 3113 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_NOSCROLL) SendDlgItemMessage(hwnd,IDC_LVS_NOSCROLL,BM_SETCHECK,BST_CHECKED,0); 3114 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_NOCOLUMNHEADER) SendDlgItemMessage(hwnd,IDC_LVS_NOCOLUMNHEADER,BM_SETCHECK,BST_CHECKED,0); 3115 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_NOSORTHEADER) SendDlgItemMessage(hwnd,IDC_LVS_NOSORTHEADER,BM_SETCHECK,BST_CHECKED,0); 3116 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_SHOWSELALWAYS) SendDlgItemMessage(hwnd,IDC_LVS_SHOWSELALWAYS,BM_SETCHECK,BST_CHECKED,0); 3117 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_OWNERDRAWFIXED) SendDlgItemMessage(hwnd,IDC_LVS_OWNERDRAWFIXED,BM_SETCHECK,BST_CHECKED,0); 3118 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_SHAREIMAGELISTS) SendDlgItemMessage(hwnd,IDC_LVS_SHAREIMAGELISTS,BM_SETCHECK,BST_CHECKED,0); 3119 3120 3121 bInitial=0; 3122 break; 3123 } 3068 3124 case WM_COMMAND: 3069 3070 i=GetWndNum(GetParent(GetParent(hwnd))); 3071 if(i==-1) return 1; 3072 i2=GetWndInfoNum(MdiInfo[i].path); 3073 3074 //共通スタイル 3075 if(bInitial==0){ 3076 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1; 3077 } 3078 3079 switch(LOWORD(wParam)){ 3080 case IDC_LVS_VIEW: 3081 if(HIWORD(wParam)==CBN_SELCHANGE){ 3082 //変更情報 3083 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3084 3085 i3=SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_GETCURSEL,0,0); 3086 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(LVS_SMALLICON|LVS_LIST|LVS_REPORT); 3087 if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_SMALLICON; 3088 else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_LIST; 3089 else if(i3==3) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_REPORT; 3090 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 3125 { 3126 i=GetWndNum(GetParent(GetParent(hwnd))); 3127 if(i==-1) return 1; 3128 i2=GetWndInfoNum(MdiInfo[i].path); 3129 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 3130 3131 //共通スタイル 3132 if(bInitial==0){ 3133 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1; 3134 } 3135 3136 switch(LOWORD(wParam)){ 3137 case IDC_LVS_VIEW: 3138 if(HIWORD(wParam)==CBN_SELCHANGE){ 3139 //変更情報 3140 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3141 3142 i3=SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_GETCURSEL,0,0); 3143 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(LVS_SMALLICON|LVS_LIST|LVS_REPORT); 3144 if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_SMALLICON; 3145 else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_LIST; 3146 else if(i3==3) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_REPORT; 3147 DrawRadWindow(i,pWindowInfo); 3148 return 1; 3149 } 3150 break; 3151 case IDC_LVS_POSITION: 3152 if(HIWORD(wParam)==CBN_SELCHANGE){ 3153 //変更情報 3154 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3155 3156 i3=SendDlgItemMessage(hwnd,IDC_LVS_POSITION,CB_GETCURSEL,0,0); 3157 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(LVS_ALIGNLEFT); 3158 if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_ALIGNLEFT; 3159 return 1; 3160 } 3161 break; 3162 case IDC_LVS_SORT: 3163 if(HIWORD(wParam)==CBN_SELCHANGE){ 3164 //変更情報 3165 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3166 3167 i3=SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_GETCURSEL,0,0); 3168 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(LVS_SORTASCENDING|LVS_SORTDESCENDING); 3169 if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_SORTASCENDING; 3170 else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_SORTDESCENDING; 3171 return 1; 3172 } 3173 break; 3174 3175 case IDC_LVS_SINGLESEL: 3176 if(HIWORD(wParam)==BN_CLICKED){ 3177 //変更情報 3178 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3179 3180 if(SendDlgItemMessage(hwnd,IDC_LVS_SINGLESEL,BM_GETCHECK,0,0)) 3181 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_SINGLESEL; 3182 else 3183 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_SINGLESEL; 3184 return 1; 3185 } 3186 break; 3187 case IDC_LVS_AUTOARRANGE: 3188 if(HIWORD(wParam)==BN_CLICKED){ 3189 //変更情報 3190 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3191 3192 if(SendDlgItemMessage(hwnd,IDC_LVS_AUTOARRANGE,BM_GETCHECK,0,0)) 3193 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_AUTOARRANGE; 3194 else 3195 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_AUTOARRANGE; 3196 return 1; 3197 } 3198 break; 3199 case IDC_LVS_NOLABELWRAP: 3200 if(HIWORD(wParam)==BN_CLICKED){ 3201 //変更情報 3202 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3203 3204 if(SendDlgItemMessage(hwnd,IDC_LVS_NOLABELWRAP,BM_GETCHECK,0,0)) 3205 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_NOLABELWRAP; 3206 else 3207 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_NOLABELWRAP; 3208 return 1; 3209 } 3210 break; 3211 case IDC_LVS_EDITLABELS: 3212 if(HIWORD(wParam)==BN_CLICKED){ 3213 //変更情報 3214 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3215 3216 if(SendDlgItemMessage(hwnd,IDC_LVS_EDITLABELS,BM_GETCHECK,0,0)) 3217 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_EDITLABELS; 3218 else 3219 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_EDITLABELS; 3220 return 1; 3221 } 3222 break; 3223 case IDC_LVS_NOSCROLL: 3224 if(HIWORD(wParam)==BN_CLICKED){ 3225 //変更情報 3226 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3227 3228 if(SendDlgItemMessage(hwnd,IDC_LVS_NOSCROLL,BM_GETCHECK,0,0)) 3229 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_NOSCROLL; 3230 else 3231 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_NOSCROLL; 3232 DrawRadWindow(i,pWindowInfo); 3233 return 1; 3234 } 3235 break; 3236 case IDC_LVS_NOCOLUMNHEADER: 3237 if(HIWORD(wParam)==BN_CLICKED){ 3238 //変更情報 3239 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3240 3241 if(SendDlgItemMessage(hwnd,IDC_LVS_NOCOLUMNHEADER,BM_GETCHECK,0,0)) 3242 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_NOCOLUMNHEADER; 3243 else 3244 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_NOCOLUMNHEADER; 3245 return 1; 3246 } 3247 break; 3248 case IDC_LVS_NOSORTHEADER: 3249 if(HIWORD(wParam)==BN_CLICKED){ 3250 //変更情報 3251 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3252 3253 if(SendDlgItemMessage(hwnd,IDC_LVS_NOSORTHEADER,BM_GETCHECK,0,0)) 3254 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_NOSORTHEADER; 3255 else 3256 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_NOSORTHEADER; 3257 return 1; 3258 } 3259 break; 3260 case IDC_LVS_SHOWSELALWAYS: 3261 if(HIWORD(wParam)==BN_CLICKED){ 3262 //変更情報 3263 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3264 3265 if(SendDlgItemMessage(hwnd,IDC_LVS_SHOWSELALWAYS,BM_GETCHECK,0,0)) 3266 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_SHOWSELALWAYS; 3267 else 3268 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_SHOWSELALWAYS; 3269 return 1; 3270 } 3271 break; 3272 case IDC_LVS_OWNERDRAWFIXED: 3273 if(HIWORD(wParam)==BN_CLICKED){ 3274 //変更情報 3275 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3276 3277 if(SendDlgItemMessage(hwnd,IDC_LVS_OWNERDRAWFIXED,BM_GETCHECK,0,0)) 3278 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_OWNERDRAWFIXED; 3279 else 3280 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_OWNERDRAWFIXED; 3281 return 1; 3282 } 3283 break; 3284 case IDC_LVS_SHAREIMAGELISTS: 3285 if(HIWORD(wParam)==BN_CLICKED){ 3286 //変更情報 3287 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3288 3289 if(SendDlgItemMessage(hwnd,IDC_LVS_SHAREIMAGELISTS,BM_GETCHECK,0,0)) 3290 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_SHAREIMAGELISTS; 3291 else 3292 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_SHAREIMAGELISTS; 3293 return 1; 3294 } 3295 break; 3296 3297 case IDC_EXSTYLE: 3298 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1; 3299 DrawRadWindow(i,pWindowInfo); 3091 3300 return 1; 3092 } 3093 break; 3094 case IDC_LVS_POSITION: 3095 if(HIWORD(wParam)==CBN_SELCHANGE){ 3096 //変更情報 3097 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3098 3099 i3=SendDlgItemMessage(hwnd,IDC_LVS_POSITION,CB_GETCURSEL,0,0); 3100 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(LVS_ALIGNLEFT); 3101 if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_ALIGNLEFT; 3102 return 1; 3103 } 3104 break; 3105 case IDC_LVS_SORT: 3106 if(HIWORD(wParam)==CBN_SELCHANGE){ 3107 //変更情報 3108 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3109 3110 i3=SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_GETCURSEL,0,0); 3111 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(LVS_SORTASCENDING|LVS_SORTDESCENDING); 3112 if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_SORTASCENDING; 3113 else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_SORTDESCENDING; 3114 return 1; 3115 } 3116 break; 3117 3118 case IDC_LVS_SINGLESEL: 3119 if(HIWORD(wParam)==BN_CLICKED){ 3120 //変更情報 3121 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3122 3123 if(SendDlgItemMessage(hwnd,IDC_LVS_SINGLESEL,BM_GETCHECK,0,0)) 3124 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_SINGLESEL; 3125 else 3126 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_SINGLESEL; 3127 return 1; 3128 } 3129 break; 3130 case IDC_LVS_AUTOARRANGE: 3131 if(HIWORD(wParam)==BN_CLICKED){ 3132 //変更情報 3133 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3134 3135 if(SendDlgItemMessage(hwnd,IDC_LVS_AUTOARRANGE,BM_GETCHECK,0,0)) 3136 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_AUTOARRANGE; 3137 else 3138 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_AUTOARRANGE; 3139 return 1; 3140 } 3141 break; 3142 case IDC_LVS_NOLABELWRAP: 3143 if(HIWORD(wParam)==BN_CLICKED){ 3144 //変更情報 3145 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3146 3147 if(SendDlgItemMessage(hwnd,IDC_LVS_NOLABELWRAP,BM_GETCHECK,0,0)) 3148 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_NOLABELWRAP; 3149 else 3150 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_NOLABELWRAP; 3151 return 1; 3152 } 3153 break; 3154 case IDC_LVS_EDITLABELS: 3155 if(HIWORD(wParam)==BN_CLICKED){ 3156 //変更情報 3157 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3158 3159 if(SendDlgItemMessage(hwnd,IDC_LVS_EDITLABELS,BM_GETCHECK,0,0)) 3160 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_EDITLABELS; 3161 else 3162 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_EDITLABELS; 3163 return 1; 3164 } 3165 break; 3166 case IDC_LVS_NOSCROLL: 3167 if(HIWORD(wParam)==BN_CLICKED){ 3168 //変更情報 3169 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3170 3171 if(SendDlgItemMessage(hwnd,IDC_LVS_NOSCROLL,BM_GETCHECK,0,0)) 3172 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_NOSCROLL; 3173 else 3174 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_NOSCROLL; 3175 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 3176 return 1; 3177 } 3178 break; 3179 case IDC_LVS_NOCOLUMNHEADER: 3180 if(HIWORD(wParam)==BN_CLICKED){ 3181 //変更情報 3182 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3183 3184 if(SendDlgItemMessage(hwnd,IDC_LVS_NOCOLUMNHEADER,BM_GETCHECK,0,0)) 3185 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_NOCOLUMNHEADER; 3186 else 3187 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_NOCOLUMNHEADER; 3188 return 1; 3189 } 3190 break; 3191 case IDC_LVS_NOSORTHEADER: 3192 if(HIWORD(wParam)==BN_CLICKED){ 3193 //変更情報 3194 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3195 3196 if(SendDlgItemMessage(hwnd,IDC_LVS_NOSORTHEADER,BM_GETCHECK,0,0)) 3197 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_NOSORTHEADER; 3198 else 3199 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_NOSORTHEADER; 3200 return 1; 3201 } 3202 break; 3203 case IDC_LVS_SHOWSELALWAYS: 3204 if(HIWORD(wParam)==BN_CLICKED){ 3205 //変更情報 3206 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3207 3208 if(SendDlgItemMessage(hwnd,IDC_LVS_SHOWSELALWAYS,BM_GETCHECK,0,0)) 3209 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_SHOWSELALWAYS; 3210 else 3211 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_SHOWSELALWAYS; 3212 return 1; 3213 } 3214 break; 3215 case IDC_LVS_OWNERDRAWFIXED: 3216 if(HIWORD(wParam)==BN_CLICKED){ 3217 //変更情報 3218 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3219 3220 if(SendDlgItemMessage(hwnd,IDC_LVS_OWNERDRAWFIXED,BM_GETCHECK,0,0)) 3221 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_OWNERDRAWFIXED; 3222 else 3223 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_OWNERDRAWFIXED; 3224 return 1; 3225 } 3226 break; 3227 case IDC_LVS_SHAREIMAGELISTS: 3228 if(HIWORD(wParam)==BN_CLICKED){ 3229 //変更情報 3230 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3231 3232 if(SendDlgItemMessage(hwnd,IDC_LVS_SHAREIMAGELISTS,BM_GETCHECK,0,0)) 3233 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_SHAREIMAGELISTS; 3234 else 3235 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_SHAREIMAGELISTS; 3236 return 1; 3237 } 3238 break; 3239 3240 case IDC_EXSTYLE: 3241 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1; 3242 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 3243 return 1; 3244 } 3245 break; 3301 } 3302 break; 3303 } 3246 3304 } 3247 3305 return 0; … … 3277 3335 switch(message){ 3278 3336 case WM_INITDIALOG: 3279 bInitial=1; 3280 i=GetWndNum(GetParent(GetParent(hwnd))); 3281 i2=GetWndInfoNum(MdiInfo[i].path); 3282 3283 SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 3284 3285 3286 //////////////////////// 3287 // スタイル 3288 //////////// 3289 3290 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 3291 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 3292 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0); 3293 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0); 3294 3295 //////// 3296 // 選択 3297 //////// 3298 3299 //"シングル" 3300 SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_ADDSTRING,0,(long)STRING_LISTBOXPROP_STYLE_SEL_SINGLE); 3301 //"マルチ" 3302 SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_ADDSTRING,0,(long)STRING_LISTBOXPROP_STYLE_SEL_MULTI); 3303 //"拡張" 3304 SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_ADDSTRING,0,(long)STRING_LISTBOXPROP_STYLE_SEL_EXTENDED); 3305 //"なし" 3306 SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_ADDSTRING,0,(long)STRING_NONE_); 3307 3308 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_MULTIPLESEL) SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_SETCURSEL,1,0); 3309 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_EXTENDEDSEL) SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_SETCURSEL,2,0); 3310 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_NOSEL) SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_SETCURSEL,3,0); 3311 else SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_SETCURSEL,0,0); 3312 3313 3314 //////////////// 3315 // オーナー描画 3316 //////////////// 3317 3318 //"なし" 3319 SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_NONE_); 3320 //"固定" 3321 SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_OWNERDRAW_FIXED); 3322 //"可変" 3323 SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_OWNERDRAW_VARIABLE); 3324 3325 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_OWNERDRAWFIXED) SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_SETCURSEL,1,0); 3326 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_OWNERDRAWVARIABLE) SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_SETCURSEL,2,0); 3327 else SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_SETCURSEL,0,0); 3328 3329 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_HASSTRINGS) SendDlgItemMessage(hwnd,IDC_LBS_HASSTRINGS,BM_SETCHECK,BST_CHECKED,0); 3330 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_SORT) SendDlgItemMessage(hwnd,IDC_LBS_SORT,BM_SETCHECK,BST_CHECKED,0); 3331 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_NOTIFY) SendDlgItemMessage(hwnd,IDC_LBS_NOTIFY,BM_SETCHECK,BST_CHECKED,0); 3332 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_MULTICOLUMN) SendDlgItemMessage(hwnd,IDC_LBS_MULTICOLUMN,BM_SETCHECK,BST_CHECKED,0); 3333 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_HSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLL,BM_SETCHECK,BST_CHECKED,0); 3334 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_SETCHECK,BST_CHECKED,0); 3335 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_DISABLENOSCROLL) SendDlgItemMessage(hwnd,IDC_LBS_DISABLENOSCROLL,BM_SETCHECK,BST_CHECKED,0); 3336 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_NOREDRAW) SendDlgItemMessage(hwnd,IDC_LBS_NOREDRAW,BM_SETCHECK,BST_CHECKED,0); 3337 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_USETABSTOPS) SendDlgItemMessage(hwnd,IDC_LBS_USETABSTOPS,BM_SETCHECK,BST_CHECKED,0); 3338 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_WANTKEYBOARDINPUT) SendDlgItemMessage(hwnd,IDC_LBS_WANTKEYBOARDINPUT,BM_SETCHECK,BST_CHECKED,0); 3339 3340 RadProperty_ListBox_StylingOrder(hwnd,&ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3341 3342 3343 bInitial=0; 3344 break; 3337 { 3338 bInitial=1; 3339 i=GetWndNum(GetParent(GetParent(hwnd))); 3340 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 3341 3342 SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 3343 3344 3345 //////////////////////// 3346 // スタイル 3347 //////////// 3348 3349 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 3350 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 3351 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0); 3352 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0); 3353 3354 //////// 3355 // 選択 3356 //////// 3357 3358 //"シングル" 3359 SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_ADDSTRING,0,(long)STRING_LISTBOXPROP_STYLE_SEL_SINGLE); 3360 //"マルチ" 3361 SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_ADDSTRING,0,(long)STRING_LISTBOXPROP_STYLE_SEL_MULTI); 3362 //"拡張" 3363 SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_ADDSTRING,0,(long)STRING_LISTBOXPROP_STYLE_SEL_EXTENDED); 3364 //"なし" 3365 SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_ADDSTRING,0,(long)STRING_NONE_); 3366 3367 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_MULTIPLESEL) SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_SETCURSEL,1,0); 3368 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_EXTENDEDSEL) SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_SETCURSEL,2,0); 3369 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_NOSEL) SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_SETCURSEL,3,0); 3370 else SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_SETCURSEL,0,0); 3371 3372 3373 //////////////// 3374 // オーナー描画 3375 //////////////// 3376 3377 //"なし" 3378 SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_NONE_); 3379 //"固定" 3380 SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_OWNERDRAW_FIXED); 3381 //"可変" 3382 SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_OWNERDRAW_VARIABLE); 3383 3384 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_OWNERDRAWFIXED) SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_SETCURSEL,1,0); 3385 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_OWNERDRAWVARIABLE) SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_SETCURSEL,2,0); 3386 else SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_SETCURSEL,0,0); 3387 3388 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_HASSTRINGS) SendDlgItemMessage(hwnd,IDC_LBS_HASSTRINGS,BM_SETCHECK,BST_CHECKED,0); 3389 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_SORT) SendDlgItemMessage(hwnd,IDC_LBS_SORT,BM_SETCHECK,BST_CHECKED,0); 3390 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_NOTIFY) SendDlgItemMessage(hwnd,IDC_LBS_NOTIFY,BM_SETCHECK,BST_CHECKED,0); 3391 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_MULTICOLUMN) SendDlgItemMessage(hwnd,IDC_LBS_MULTICOLUMN,BM_SETCHECK,BST_CHECKED,0); 3392 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_HSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLL,BM_SETCHECK,BST_CHECKED,0); 3393 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_SETCHECK,BST_CHECKED,0); 3394 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_DISABLENOSCROLL) SendDlgItemMessage(hwnd,IDC_LBS_DISABLENOSCROLL,BM_SETCHECK,BST_CHECKED,0); 3395 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_NOREDRAW) SendDlgItemMessage(hwnd,IDC_LBS_NOREDRAW,BM_SETCHECK,BST_CHECKED,0); 3396 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_USETABSTOPS) SendDlgItemMessage(hwnd,IDC_LBS_USETABSTOPS,BM_SETCHECK,BST_CHECKED,0); 3397 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_WANTKEYBOARDINPUT) SendDlgItemMessage(hwnd,IDC_LBS_WANTKEYBOARDINPUT,BM_SETCHECK,BST_CHECKED,0); 3398 3399 RadProperty_ListBox_StylingOrder(hwnd,&pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3400 3401 3402 bInitial=0; 3403 break; 3404 } 3345 3405 case WM_COMMAND: 3346 3347 i=GetWndNum(GetParent(GetParent(hwnd))); 3348 if(i==-1) return 1; 3349 i2=GetWndInfoNum(MdiInfo[i].path); 3350 3351 //共通スタイル 3352 if(bInitial==0){ 3353 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1; 3354 } 3355 3356 switch(LOWORD(wParam)){ 3357 case IDC_LBS_SELECT: 3358 if(HIWORD(wParam)==CBN_SELCHANGE){ 3359 //変更情報 3360 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3361 3362 i3=SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_GETCURSEL,0,0); 3363 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(LBS_MULTIPLESEL|LBS_EXTENDEDSEL|LBS_NOSEL); 3364 if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_MULTIPLESEL; 3365 else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_EXTENDEDSEL; 3366 else if(i3==3) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_NOSEL; 3406 { 3407 i=GetWndNum(GetParent(GetParent(hwnd))); 3408 if(i==-1) return 1; 3409 i2=GetWndInfoNum(MdiInfo[i].path); 3410 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 3411 3412 //共通スタイル 3413 if(bInitial==0){ 3414 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1; 3415 } 3416 3417 switch(LOWORD(wParam)){ 3418 case IDC_LBS_SELECT: 3419 if(HIWORD(wParam)==CBN_SELCHANGE){ 3420 //変更情報 3421 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3422 3423 i3=SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_GETCURSEL,0,0); 3424 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(LBS_MULTIPLESEL|LBS_EXTENDEDSEL|LBS_NOSEL); 3425 if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_MULTIPLESEL; 3426 else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_EXTENDEDSEL; 3427 else if(i3==3) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_NOSEL; 3428 return 1; 3429 } 3430 break; 3431 case IDC_LBS_OWNERDRAW: 3432 if(HIWORD(wParam)==CBN_SELCHANGE){ 3433 //変更情報 3434 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3435 3436 i3=SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_GETCURSEL,0,0); 3437 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(LBS_OWNERDRAWFIXED|LBS_OWNERDRAWVARIABLE); 3438 if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_OWNERDRAWFIXED; 3439 else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_OWNERDRAWVARIABLE; 3440 3441 RadProperty_ListBox_StylingOrder(hwnd,&pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3442 return 1; 3443 } 3444 break; 3445 3446 case IDC_LBS_HASSTRINGS: 3447 if(HIWORD(wParam)==BN_CLICKED){ 3448 //変更情報 3449 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3450 3451 if(SendDlgItemMessage(hwnd,IDC_LBS_HASSTRINGS,BM_GETCHECK,0,0)) 3452 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_HASSTRINGS; 3453 else 3454 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_HASSTRINGS; 3455 return 1; 3456 } 3457 break; 3458 case IDC_LBS_SORT: 3459 if(HIWORD(wParam)==BN_CLICKED){ 3460 //変更情報 3461 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3462 3463 if(SendDlgItemMessage(hwnd,IDC_LBS_SORT,BM_GETCHECK,0,0)) 3464 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_SORT; 3465 else 3466 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_SORT; 3467 return 1; 3468 } 3469 break; 3470 case IDC_LBS_NOTIFY: 3471 if(HIWORD(wParam)==BN_CLICKED){ 3472 //変更情報 3473 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3474 3475 if(SendDlgItemMessage(hwnd,IDC_LBS_NOTIFY,BM_GETCHECK,0,0)) 3476 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_NOTIFY; 3477 else 3478 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_NOTIFY; 3479 return 1; 3480 } 3481 break; 3482 case IDC_LBS_MULTICOLUMN: 3483 if(HIWORD(wParam)==BN_CLICKED){ 3484 //変更情報 3485 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3486 3487 if(SendDlgItemMessage(hwnd,IDC_LBS_MULTICOLUMN,BM_GETCHECK,0,0)) 3488 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_MULTICOLUMN; 3489 else 3490 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_MULTICOLUMN; 3491 return 1; 3492 } 3493 break; 3494 case IDC_STYLE_HSCROLL: 3495 if(HIWORD(wParam)==BN_CLICKED){ 3496 //変更情報 3497 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3498 3499 if(SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLL,BM_GETCHECK,0,0)) 3500 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=WS_HSCROLL; 3501 else 3502 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~WS_HSCROLL; 3503 DrawRadWindow(i,pWindowInfo); 3504 return 1; 3505 } 3506 break; 3507 case IDC_STYLE_VSCROLL: 3508 if(HIWORD(wParam)==BN_CLICKED){ 3509 //変更情報 3510 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3511 3512 if(SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_GETCHECK,0,0)) 3513 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=WS_VSCROLL; 3514 else 3515 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~WS_VSCROLL; 3516 DrawRadWindow(i,pWindowInfo); 3517 return 1; 3518 } 3519 break; 3520 case IDC_LBS_DISABLENOSCROLL: 3521 if(HIWORD(wParam)==BN_CLICKED){ 3522 //変更情報 3523 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3524 3525 if(SendDlgItemMessage(hwnd,IDC_LBS_DISABLENOSCROLL,BM_GETCHECK,0,0)) 3526 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_DISABLENOSCROLL; 3527 else 3528 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_DISABLENOSCROLL; 3529 DrawRadWindow(i,pWindowInfo); 3530 return 1; 3531 } 3532 break; 3533 case IDC_LBS_NOREDRAW: 3534 if(HIWORD(wParam)==BN_CLICKED){ 3535 //変更情報 3536 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3537 3538 if(SendDlgItemMessage(hwnd,IDC_LBS_NOREDRAW,BM_GETCHECK,0,0)) 3539 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_NOREDRAW; 3540 else 3541 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_NOREDRAW; 3542 return 1; 3543 } 3544 break; 3545 case IDC_LBS_USETABSTOPS: 3546 if(HIWORD(wParam)==BN_CLICKED){ 3547 //変更情報 3548 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3549 3550 if(SendDlgItemMessage(hwnd,IDC_LBS_USETABSTOPS,BM_GETCHECK,0,0)) 3551 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_USETABSTOPS; 3552 else 3553 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_USETABSTOPS; 3554 return 1; 3555 } 3556 break; 3557 case IDC_LBS_WANTKEYBOARDINPUT: 3558 if(HIWORD(wParam)==BN_CLICKED){ 3559 //変更情報 3560 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3561 3562 if(SendDlgItemMessage(hwnd,IDC_LBS_WANTKEYBOARDINPUT,BM_GETCHECK,0,0)) 3563 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_WANTKEYBOARDINPUT; 3564 else 3565 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_WANTKEYBOARDINPUT; 3566 return 1; 3567 } 3568 break; 3569 3570 case IDC_EXSTYLE: 3571 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1; 3572 DrawRadWindow(i,pWindowInfo); 3367 3573 return 1; 3368 } 3369 break; 3370 case IDC_LBS_OWNERDRAW: 3371 if(HIWORD(wParam)==CBN_SELCHANGE){ 3372 //変更情報 3373 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3374 3375 i3=SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_GETCURSEL,0,0); 3376 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(LBS_OWNERDRAWFIXED|LBS_OWNERDRAWVARIABLE); 3377 if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_OWNERDRAWFIXED; 3378 else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_OWNERDRAWVARIABLE; 3379 3380 RadProperty_ListBox_StylingOrder(hwnd,&ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3381 return 1; 3382 } 3383 break; 3384 3385 case IDC_LBS_HASSTRINGS: 3386 if(HIWORD(wParam)==BN_CLICKED){ 3387 //変更情報 3388 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3389 3390 if(SendDlgItemMessage(hwnd,IDC_LBS_HASSTRINGS,BM_GETCHECK,0,0)) 3391 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_HASSTRINGS; 3392 else 3393 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_HASSTRINGS; 3394 return 1; 3395 } 3396 break; 3397 case IDC_LBS_SORT: 3398 if(HIWORD(wParam)==BN_CLICKED){ 3399 //変更情報 3400 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3401 3402 if(SendDlgItemMessage(hwnd,IDC_LBS_SORT,BM_GETCHECK,0,0)) 3403 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_SORT; 3404 else 3405 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_SORT; 3406 return 1; 3407 } 3408 break; 3409 case IDC_LBS_NOTIFY: 3410 if(HIWORD(wParam)==BN_CLICKED){ 3411 //変更情報 3412 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3413 3414 if(SendDlgItemMessage(hwnd,IDC_LBS_NOTIFY,BM_GETCHECK,0,0)) 3415 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_NOTIFY; 3416 else 3417 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_NOTIFY; 3418 return 1; 3419 } 3420 break; 3421 case IDC_LBS_MULTICOLUMN: 3422 if(HIWORD(wParam)==BN_CLICKED){ 3423 //変更情報 3424 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3425 3426 if(SendDlgItemMessage(hwnd,IDC_LBS_MULTICOLUMN,BM_GETCHECK,0,0)) 3427 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_MULTICOLUMN; 3428 else 3429 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_MULTICOLUMN; 3430 return 1; 3431 } 3432 break; 3433 case IDC_STYLE_HSCROLL: 3434 if(HIWORD(wParam)==BN_CLICKED){ 3435 //変更情報 3436 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3437 3438 if(SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLL,BM_GETCHECK,0,0)) 3439 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=WS_HSCROLL; 3440 else 3441 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~WS_HSCROLL; 3442 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 3443 return 1; 3444 } 3445 break; 3446 case IDC_STYLE_VSCROLL: 3447 if(HIWORD(wParam)==BN_CLICKED){ 3448 //変更情報 3449 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3450 3451 if(SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_GETCHECK,0,0)) 3452 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=WS_VSCROLL; 3453 else 3454 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~WS_VSCROLL; 3455 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 3456 return 1; 3457 } 3458 break; 3459 case IDC_LBS_DISABLENOSCROLL: 3460 if(HIWORD(wParam)==BN_CLICKED){ 3461 //変更情報 3462 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3463 3464 if(SendDlgItemMessage(hwnd,IDC_LBS_DISABLENOSCROLL,BM_GETCHECK,0,0)) 3465 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_DISABLENOSCROLL; 3466 else 3467 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_DISABLENOSCROLL; 3468 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 3469 return 1; 3470 } 3471 break; 3472 case IDC_LBS_NOREDRAW: 3473 if(HIWORD(wParam)==BN_CLICKED){ 3474 //変更情報 3475 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3476 3477 if(SendDlgItemMessage(hwnd,IDC_LBS_NOREDRAW,BM_GETCHECK,0,0)) 3478 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_NOREDRAW; 3479 else 3480 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_NOREDRAW; 3481 return 1; 3482 } 3483 break; 3484 case IDC_LBS_USETABSTOPS: 3485 if(HIWORD(wParam)==BN_CLICKED){ 3486 //変更情報 3487 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3488 3489 if(SendDlgItemMessage(hwnd,IDC_LBS_USETABSTOPS,BM_GETCHECK,0,0)) 3490 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_USETABSTOPS; 3491 else 3492 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_USETABSTOPS; 3493 return 1; 3494 } 3495 break; 3496 case IDC_LBS_WANTKEYBOARDINPUT: 3497 if(HIWORD(wParam)==BN_CLICKED){ 3498 //変更情報 3499 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3500 3501 if(SendDlgItemMessage(hwnd,IDC_LBS_WANTKEYBOARDINPUT,BM_GETCHECK,0,0)) 3502 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_WANTKEYBOARDINPUT; 3503 else 3504 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_WANTKEYBOARDINPUT; 3505 return 1; 3506 } 3507 break; 3508 3509 case IDC_EXSTYLE: 3510 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1; 3511 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 3512 return 1; 3513 } 3514 break; 3574 } 3575 break; 3576 } 3515 3577 } 3516 3578 return 0; … … 3528 3590 switch(message){ 3529 3591 case WM_INITDIALOG: 3530 bInitial=1; 3531 i=GetWndNum(GetParent(GetParent(hwnd))); 3532 i2=GetWndInfoNum(MdiInfo[i].path); 3533 3534 SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 3535 SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption); 3536 3537 3538 //////////// 3539 //スタイル 3540 3541 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 3542 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 3543 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0); 3544 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0); 3545 3546 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&PBS_VERTICAL) SendDlgItemMessage(hwnd,IDC_PBS_VERTICAL,BM_SETCHECK,BST_CHECKED,0); 3547 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&PBS_SMOOTH) SendDlgItemMessage(hwnd,IDC_PBS_SMOOTH,BM_SETCHECK,BST_CHECKED,0); 3548 3549 3550 bInitial=0; 3551 break; 3592 { 3593 bInitial=1; 3594 i=GetWndNum(GetParent(GetParent(hwnd))); 3595 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 3596 3597 SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 3598 SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption); 3599 3600 3601 //////////// 3602 //スタイル 3603 3604 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 3605 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 3606 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0); 3607 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0); 3608 3609 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&PBS_VERTICAL) SendDlgItemMessage(hwnd,IDC_PBS_VERTICAL,BM_SETCHECK,BST_CHECKED,0); 3610 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&PBS_SMOOTH) SendDlgItemMessage(hwnd,IDC_PBS_SMOOTH,BM_SETCHECK,BST_CHECKED,0); 3611 3612 3613 bInitial=0; 3614 break; 3615 } 3552 3616 case WM_COMMAND: 3553 3554 i=GetWndNum(GetParent(GetParent(hwnd))); 3555 if(i==-1) return 1; 3556 i2=GetWndInfoNum(MdiInfo[i].path); 3557 3558 //共通スタイル 3559 if(bInitial==0){ 3560 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1; 3561 } 3562 3563 switch(LOWORD(wParam)){ 3564 case IDC_PBS_VERTICAL: 3565 if(HIWORD(wParam)==BN_CLICKED){ 3566 //変更情報 3567 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3568 3569 if(SendDlgItemMessage(hwnd,IDC_PBS_VERTICAL,BM_GETCHECK,0,0)) 3570 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=PBS_VERTICAL; 3571 else 3572 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~PBS_VERTICAL; 3573 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 3617 { 3618 i=GetWndNum(GetParent(GetParent(hwnd))); 3619 if(i==-1) return 1; 3620 i2=GetWndInfoNum(MdiInfo[i].path); 3621 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 3622 3623 //共通スタイル 3624 if(bInitial==0){ 3625 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1; 3626 } 3627 3628 switch(LOWORD(wParam)){ 3629 case IDC_PBS_VERTICAL: 3630 if(HIWORD(wParam)==BN_CLICKED){ 3631 //変更情報 3632 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3633 3634 if(SendDlgItemMessage(hwnd,IDC_PBS_VERTICAL,BM_GETCHECK,0,0)) 3635 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=PBS_VERTICAL; 3636 else 3637 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~PBS_VERTICAL; 3638 DrawRadWindow(i,pWindowInfo); 3639 return 1; 3640 } 3641 break; 3642 case IDC_PBS_SMOOTH: 3643 if(HIWORD(wParam)==BN_CLICKED){ 3644 //変更情報 3645 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3646 3647 if(SendDlgItemMessage(hwnd,IDC_PBS_SMOOTH,BM_GETCHECK,0,0)) 3648 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=PBS_SMOOTH; 3649 else 3650 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~PBS_SMOOTH; 3651 DrawRadWindow(i,pWindowInfo); 3652 return 1; 3653 } 3654 break; 3655 3656 case IDC_EXSTYLE: 3657 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1; 3658 DrawRadWindow(i,pWindowInfo); 3574 3659 return 1; 3575 } 3576 break; 3577 case IDC_PBS_SMOOTH: 3578 if(HIWORD(wParam)==BN_CLICKED){ 3579 //変更情報 3580 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3581 3582 if(SendDlgItemMessage(hwnd,IDC_PBS_SMOOTH,BM_GETCHECK,0,0)) 3583 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=PBS_SMOOTH; 3584 else 3585 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~PBS_SMOOTH; 3586 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 3587 return 1; 3588 } 3589 break; 3590 3591 case IDC_EXSTYLE: 3592 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1; 3593 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 3594 return 1; 3660 } 3595 3661 } 3596 3662 } … … 3610 3676 switch(message){ 3611 3677 case WM_INITDIALOG: 3612 bInitial=1; 3613 i=GetWndNum(GetParent(GetParent(hwnd))); 3614 i2=GetWndInfoNum(MdiInfo[i].path); 3615 3616 SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 3617 SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption); 3618 3619 3620 ///////////////////////// 3621 // スタイル 3622 //////////// 3623 3624 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 3625 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 3626 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0); 3627 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0); 3628 3629 if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_AUTORADIOBUTTON)==BS_AUTORADIOBUTTON) SendDlgItemMessage(hwnd,IDC_BS_AUTO,BM_SETCHECK,BST_CHECKED,0); 3630 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_PUSHLIKE) SendDlgItemMessage(hwnd,IDC_BS_PUSHLIKE,BM_SETCHECK,BST_CHECKED,0); 3631 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_LEFTTEXT) SendDlgItemMessage(hwnd,IDC_BS_LEFTTEXT,BM_SETCHECK,BST_CHECKED,0); 3632 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_ICON) SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_CHECKED,0); 3633 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BITMAP) SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_CHECKED,0); 3634 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_MULTILINE) SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_SETCHECK,BST_CHECKED,0); 3635 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_NOTIFY) SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_SETCHECK,BST_CHECKED,0); 3636 3637 3638 ////////////////// 3639 // 水平方向の配置 3640 ////////////////// 3641 3642 //"デフォルト" 3643 SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT); 3644 //"左端" 3645 SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_LEFT); 3646 //"右端" 3647 SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_RIGHT); 3648 //"中央" 3649 SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_CENTER); 3650 3651 //ビットを考慮してBS_CENTERを最初に比較する 3652 if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_CENTER)==BS_CENTER) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,3,0); 3653 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_LEFT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,1,0); 3654 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_RIGHT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,2,0); 3655 else SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,0,0); 3656 3657 3658 ////////////////// 3659 // 垂直方向の配置 3660 ////////////////// 3661 3662 //"デフォルト" 3663 SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT); 3664 //"上端" 3665 SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_TOP); 3666 //"下端" 3667 SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_BOTTOM); 3668 //"中央" 3669 SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_CENTER); 3670 3671 //ビットを考慮してBS_VCENTERを最初に比較する 3672 if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_VCENTER)==BS_VCENTER) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,3,0); 3673 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_TOP) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,1,0); 3674 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BOTTOM) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,2,0); 3675 else SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,0,0); 3676 3677 3678 bInitial=0; 3679 break; 3678 { 3679 bInitial=1; 3680 i=GetWndNum(GetParent(GetParent(hwnd))); 3681 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 3682 3683 SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 3684 SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption); 3685 3686 3687 ///////////////////////// 3688 // スタイル 3689 //////////// 3690 3691 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 3692 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 3693 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0); 3694 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0); 3695 3696 if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_AUTORADIOBUTTON)==BS_AUTORADIOBUTTON) SendDlgItemMessage(hwnd,IDC_BS_AUTO,BM_SETCHECK,BST_CHECKED,0); 3697 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_PUSHLIKE) SendDlgItemMessage(hwnd,IDC_BS_PUSHLIKE,BM_SETCHECK,BST_CHECKED,0); 3698 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_LEFTTEXT) SendDlgItemMessage(hwnd,IDC_BS_LEFTTEXT,BM_SETCHECK,BST_CHECKED,0); 3699 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_ICON) SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_CHECKED,0); 3700 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BITMAP) SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_CHECKED,0); 3701 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_MULTILINE) SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_SETCHECK,BST_CHECKED,0); 3702 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_NOTIFY) SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_SETCHECK,BST_CHECKED,0); 3703 3704 3705 ////////////////// 3706 // 水平方向の配置 3707 ////////////////// 3708 3709 //"デフォルト" 3710 SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT); 3711 //"左端" 3712 SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_LEFT); 3713 //"右端" 3714 SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_RIGHT); 3715 //"中央" 3716 SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_CENTER); 3717 3718 //ビットを考慮してBS_CENTERを最初に比較する 3719 if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_CENTER)==BS_CENTER) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,3,0); 3720 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_LEFT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,1,0); 3721 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_RIGHT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,2,0); 3722 else SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,0,0); 3723 3724 3725 ////////////////// 3726 // 垂直方向の配置 3727 ////////////////// 3728 3729 //"デフォルト" 3730 SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT); 3731 //"上端" 3732 SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_TOP); 3733 //"下端" 3734 SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_BOTTOM); 3735 //"中央" 3736 SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_CENTER); 3737 3738 //ビットを考慮してBS_VCENTERを最初に比較する 3739 if((pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_VCENTER)==BS_VCENTER) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,3,0); 3740 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_TOP) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,1,0); 3741 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BOTTOM) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,2,0); 3742 else SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,0,0); 3743 3744 3745 bInitial=0; 3746 break; 3747 } 3680 3748 case WM_COMMAND: 3681 3682 i=GetWndNum(GetParent(GetParent(hwnd))); 3683 if(i==-1) return 1; 3684 i2=GetWndInfoNum(MdiInfo[i].path); 3685 3686 //共通スタイル 3687 if(bInitial==0){ 3688 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1; 3689 } 3690 3691 switch(LOWORD(wParam)){ 3692 case IDC_BS_AUTO: 3693 if(HIWORD(wParam)==BN_CLICKED){ 3694 //変更情報 3695 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3696 3697 if(SendDlgItemMessage(hwnd,IDC_BS_AUTO,BM_GETCHECK,0,0)){ 3698 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0; 3699 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_AUTORADIOBUTTON; 3700 } 3701 else{ 3702 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0; 3703 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_RADIOBUTTON; 3704 } 3749 { 3750 i=GetWndNum(GetParent(GetParent(hwnd))); 3751 if(i==-1) return 1; 3752 i2=GetWndInfoNum(MdiInfo[i].path); 3753 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 3754 3755 //共通スタイル 3756 if(bInitial==0){ 3757 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1; 3758 } 3759 3760 switch(LOWORD(wParam)){ 3761 case IDC_BS_AUTO: 3762 if(HIWORD(wParam)==BN_CLICKED){ 3763 //変更情報 3764 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3765 3766 if(SendDlgItemMessage(hwnd,IDC_BS_AUTO,BM_GETCHECK,0,0)){ 3767 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0; 3768 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_AUTORADIOBUTTON; 3769 } 3770 else{ 3771 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0; 3772 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_RADIOBUTTON; 3773 } 3774 return 1; 3775 } 3776 break; 3777 case IDC_BS_PUSHLIKE: 3778 if(HIWORD(wParam)==BN_CLICKED){ 3779 //変更情報 3780 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3781 3782 if(SendDlgItemMessage(hwnd,IDC_BS_PUSHLIKE,BM_GETCHECK,0,0)) 3783 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_PUSHLIKE; 3784 else 3785 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_PUSHLIKE; 3786 DrawRadWindow(i,pWindowInfo); 3787 return 1; 3788 } 3789 break; 3790 case IDC_BS_LEFTTEXT: 3791 if(HIWORD(wParam)==BN_CLICKED){ 3792 //変更情報 3793 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3794 3795 if(SendDlgItemMessage(hwnd,IDC_BS_LEFTTEXT,BM_GETCHECK,0,0)) 3796 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_LEFTTEXT; 3797 else 3798 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_LEFTTEXT; 3799 DrawRadWindow(i,pWindowInfo); 3800 return 1; 3801 } 3802 break; 3803 case IDC_BS_ICON: 3804 if(HIWORD(wParam)==BN_CLICKED){ 3805 //変更情報 3806 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3807 3808 if(SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_GETCHECK,0,0)){ 3809 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_ICON; 3810 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP; 3811 SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_UNCHECKED,0); 3812 } 3813 else 3814 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON; 3815 DrawRadWindow(i,pWindowInfo); 3816 return 1; 3817 } 3818 break; 3819 case IDC_BS_BITMAP: 3820 if(HIWORD(wParam)==BN_CLICKED){ 3821 //変更情報 3822 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3823 3824 if(SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_GETCHECK,0,0)){ 3825 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BITMAP; 3826 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON; 3827 SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_UNCHECKED,0); 3828 } 3829 else 3830 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP; 3831 DrawRadWindow(i,pWindowInfo); 3832 return 1; 3833 } 3834 break; 3835 case IDC_BS_MULTILINE: 3836 if(HIWORD(wParam)==BN_CLICKED){ 3837 //変更情報 3838 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3839 3840 if(SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_GETCHECK,0,0)) 3841 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_MULTILINE; 3842 else 3843 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_MULTILINE; 3844 DrawRadWindow(i,pWindowInfo); 3845 return 1; 3846 } 3847 break; 3848 case IDC_BS_NOTIFY: 3849 if(HIWORD(wParam)==BN_CLICKED){ 3850 //変更情報 3851 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3852 3853 if(SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_GETCHECK,0,0)) 3854 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_NOTIFY; 3855 else 3856 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_NOTIFY; 3857 return 1; 3858 } 3859 break; 3860 3861 case IDC_BS_HPOS: 3862 if(HIWORD(wParam)==CBN_SELCHANGE){ 3863 //変更情報 3864 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3865 3866 i3=SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_GETCURSEL,0,0); 3867 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_LEFT|BS_RIGHT|BS_CENTER); 3868 if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_LEFT; 3869 else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_RIGHT; 3870 else if(i3==3) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_CENTER; 3871 DrawRadWindow(i,pWindowInfo); 3872 return 1; 3873 } 3874 break; 3875 case IDC_BS_VPOS: 3876 if(HIWORD(wParam)==CBN_SELCHANGE){ 3877 //変更情報 3878 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3879 3880 i3=SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_GETCURSEL,0,0); 3881 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_TOP|BS_BOTTOM|BS_VCENTER); 3882 if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_TOP; 3883 else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BOTTOM; 3884 else if(i3==3) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_VCENTER; 3885 DrawRadWindow(i,pWindowInfo); 3886 return 1; 3887 } 3888 break; 3889 3890 case IDC_EXSTYLE: 3891 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1; 3892 DrawRadWindow(i,pWindowInfo); 3705 3893 return 1; 3706 } 3707 break; 3708 case IDC_BS_PUSHLIKE: 3709 if(HIWORD(wParam)==BN_CLICKED){ 3710 //変更情報 3711 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3712 3713 if(SendDlgItemMessage(hwnd,IDC_BS_PUSHLIKE,BM_GETCHECK,0,0)) 3714 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_PUSHLIKE; 3715 else 3716 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_PUSHLIKE; 3717 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 3718 return 1; 3719 } 3720 break; 3721 case IDC_BS_LEFTTEXT: 3722 if(HIWORD(wParam)==BN_CLICKED){ 3723 //変更情報 3724 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3725 3726 if(SendDlgItemMessage(hwnd,IDC_BS_LEFTTEXT,BM_GETCHECK,0,0)) 3727 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_LEFTTEXT; 3728 else 3729 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_LEFTTEXT; 3730 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 3731 return 1; 3732 } 3733 break; 3734 case IDC_BS_ICON: 3735 if(HIWORD(wParam)==BN_CLICKED){ 3736 //変更情報 3737 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3738 3739 if(SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_GETCHECK,0,0)){ 3740 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_ICON; 3741 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP; 3742 SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_UNCHECKED,0); 3743 } 3744 else 3745 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON; 3746 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 3747 return 1; 3748 } 3749 break; 3750 case IDC_BS_BITMAP: 3751 if(HIWORD(wParam)==BN_CLICKED){ 3752 //変更情報 3753 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3754 3755 if(SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_GETCHECK,0,0)){ 3756 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BITMAP; 3757 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON; 3758 SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_UNCHECKED,0); 3759 } 3760 else 3761 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP; 3762 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 3763 return 1; 3764 } 3765 break; 3766 case IDC_BS_MULTILINE: 3767 if(HIWORD(wParam)==BN_CLICKED){ 3768 //変更情報 3769 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3770 3771 if(SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_GETCHECK,0,0)) 3772 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_MULTILINE; 3773 else 3774 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_MULTILINE; 3775 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 3776 return 1; 3777 } 3778 break; 3779 case IDC_BS_NOTIFY: 3780 if(HIWORD(wParam)==BN_CLICKED){ 3781 //変更情報 3782 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3783 3784 if(SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_GETCHECK,0,0)) 3785 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_NOTIFY; 3786 else 3787 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_NOTIFY; 3788 return 1; 3789 } 3790 break; 3791 3792 case IDC_BS_HPOS: 3793 if(HIWORD(wParam)==CBN_SELCHANGE){ 3794 //変更情報 3795 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3796 3797 i3=SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_GETCURSEL,0,0); 3798 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_LEFT|BS_RIGHT|BS_CENTER); 3799 if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_LEFT; 3800 else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_RIGHT; 3801 else if(i3==3) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_CENTER; 3802 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 3803 return 1; 3804 } 3805 break; 3806 case IDC_BS_VPOS: 3807 if(HIWORD(wParam)==CBN_SELCHANGE){ 3808 //変更情報 3809 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3810 3811 i3=SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_GETCURSEL,0,0); 3812 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_TOP|BS_BOTTOM|BS_VCENTER); 3813 if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_TOP; 3814 else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BOTTOM; 3815 else if(i3==3) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_VCENTER; 3816 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 3817 return 1; 3818 } 3819 break; 3820 3821 case IDC_EXSTYLE: 3822 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1; 3823 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 3824 return 1; 3825 } 3826 break; 3894 } 3895 break; 3896 } 3827 3897 } 3828 3898 return 0; … … 3841 3911 switch(message){ 3842 3912 case WM_INITDIALOG: 3843 bInitial=1; 3844 i=GetWndNum(GetParent(GetParent(hwnd))); 3845 i2=GetWndInfoNum(MdiInfo[i].path); 3846 3847 SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 3848 3849 3850 //////////////////////// 3851 // スタイル 3852 //////////// 3853 3854 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 3855 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 3856 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0); 3857 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0); 3858 3859 3860 //////// 3861 // 配置 3862 //////// 3863 3864 //"指定無し" 3865 SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_ADDSTRING,0,(long)STRING_SCROLLBARPROP_STYLE_FREE); 3866 //"上/左" 3867 SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_ADDSTRING,0,(long)STRING_SCROLLBARPROP_STYLE_TOPORLEFT); 3868 //"下/右" 3869 SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_ADDSTRING,0,(long)STRING_SCROLLBARPROP_STYLE_BOTTOMORRIGHT); 3870 3871 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SBS_TOPALIGN) SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_SETCURSEL,1,0); 3872 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SBS_BOTTOMALIGN) SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_SETCURSEL,2,0); 3873 else SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_SETCURSEL,0,0); 3874 3875 3876 bInitial=0; 3877 break; 3913 { 3914 bInitial=1; 3915 i=GetWndNum(GetParent(GetParent(hwnd))); 3916 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 3917 3918 SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 3919 3920 3921 //////////////////////// 3922 // スタイル 3923 //////////// 3924 3925 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 3926 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 3927 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0); 3928 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0); 3929 3930 3931 //////// 3932 // 配置 3933 //////// 3934 3935 //"指定無し" 3936 SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_ADDSTRING,0,(long)STRING_SCROLLBARPROP_STYLE_FREE); 3937 //"上/左" 3938 SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_ADDSTRING,0,(long)STRING_SCROLLBARPROP_STYLE_TOPORLEFT); 3939 //"下/右" 3940 SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_ADDSTRING,0,(long)STRING_SCROLLBARPROP_STYLE_BOTTOMORRIGHT); 3941 3942 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SBS_TOPALIGN) SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_SETCURSEL,1,0); 3943 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SBS_BOTTOMALIGN) SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_SETCURSEL,2,0); 3944 else SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_SETCURSEL,0,0); 3945 3946 3947 bInitial=0; 3948 break; 3949 } 3878 3950 case WM_COMMAND: 3879 3880 i=GetWndNum(GetParent(GetParent(hwnd))); 3881 if(i==-1) return 1; 3882 i2=GetWndInfoNum(MdiInfo[i].path); 3883 3884 //共通スタイル 3885 if(bInitial==0){ 3886 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1; 3887 } 3888 3889 switch(LOWORD(wParam)){ 3890 case IDC_SBS_POSITION: 3891 if(HIWORD(wParam)==CBN_SELCHANGE){ 3892 //変更情報 3893 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3894 3895 i3=SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_GETCURSEL,0,0); 3896 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(SBS_TOPALIGN|SBS_BOTTOMALIGN); 3897 if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SBS_TOPALIGN; 3898 else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SBS_BOTTOMALIGN; 3951 { 3952 i=GetWndNum(GetParent(GetParent(hwnd))); 3953 if(i==-1) return 1; 3954 i2=GetWndInfoNum(MdiInfo[i].path); 3955 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 3956 3957 //共通スタイル 3958 if(bInitial==0){ 3959 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1; 3960 } 3961 3962 switch(LOWORD(wParam)){ 3963 case IDC_SBS_POSITION: 3964 if(HIWORD(wParam)==CBN_SELCHANGE){ 3965 //変更情報 3966 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3967 3968 i3=SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_GETCURSEL,0,0); 3969 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(SBS_TOPALIGN|SBS_BOTTOMALIGN); 3970 if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SBS_TOPALIGN; 3971 else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SBS_BOTTOMALIGN; 3972 return 1; 3973 } 3974 break; 3975 3976 case IDC_EXSTYLE: 3977 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1; 3978 DrawRadWindow(i,pWindowInfo); 3899 3979 return 1; 3900 } 3901 break; 3902 3903 case IDC_EXSTYLE: 3904 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1; 3905 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 3906 return 1; 3907 } 3908 break; 3980 } 3981 break; 3982 } 3909 3983 } 3910 3984 return 0; … … 3923 3997 switch(message){ 3924 3998 case WM_INITDIALOG: 3925 bInitial=1; 3926 i=GetWndNum(GetParent(GetParent(hwnd))); 3927 i2=GetWndInfoNum(MdiInfo[i].path); 3928 3929 SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 3930 SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption); 3931 3932 3933 //////////////////////// 3934 // スタイル 3935 //////////// 3936 3937 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 3938 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 3939 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0); 3940 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0); 3941 3942 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_NOPREFIX) SendDlgItemMessage(hwnd,IDC_SS_NOPREFIX,BM_SETCHECK,BST_CHECKED,0); 3943 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_LEFTNOWORDWRAP) SendDlgItemMessage(hwnd,IDC_SS_LEFTNOWORDWRAP,BM_SETCHECK,BST_CHECKED,0); 3944 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_NOTIFY) SendDlgItemMessage(hwnd,IDC_SS_NOTIFY,BM_SETCHECK,BST_CHECKED,0); 3945 3946 3947 ////////////////// 3948 // テキストの配置 3949 ////////////////// 3950 3951 //"左端" 3952 SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_ADDSTRING,0,(long)STRING_LEFT); 3953 //"中央" 3954 SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_ADDSTRING,0,(long)STRING_CENTER); 3955 //"右端" 3956 SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_ADDSTRING,0,(long)STRING_RIGHT); 3957 3958 //ビットを考慮してSS_LEFTを最後に検討する 3959 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_CENTER) SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_SETCURSEL,1,0); 3960 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_RIGHT) SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_SETCURSEL,2,0); 3961 else SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_SETCURSEL,0,0); 3962 3963 3964 bInitial=0; 3965 break; 3999 { 4000 bInitial=1; 4001 i=GetWndNum(GetParent(GetParent(hwnd))); 4002 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 4003 4004 SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 4005 SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption); 4006 4007 4008 //////////////////////// 4009 // スタイル 4010 //////////// 4011 4012 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 4013 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 4014 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0); 4015 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0); 4016 4017 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_NOPREFIX) SendDlgItemMessage(hwnd,IDC_SS_NOPREFIX,BM_SETCHECK,BST_CHECKED,0); 4018 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_LEFTNOWORDWRAP) SendDlgItemMessage(hwnd,IDC_SS_LEFTNOWORDWRAP,BM_SETCHECK,BST_CHECKED,0); 4019 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_NOTIFY) SendDlgItemMessage(hwnd,IDC_SS_NOTIFY,BM_SETCHECK,BST_CHECKED,0); 4020 4021 4022 ////////////////// 4023 // テキストの配置 4024 ////////////////// 4025 4026 //"左端" 4027 SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_ADDSTRING,0,(long)STRING_LEFT); 4028 //"中央" 4029 SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_ADDSTRING,0,(long)STRING_CENTER); 4030 //"右端" 4031 SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_ADDSTRING,0,(long)STRING_RIGHT); 4032 4033 //ビットを考慮してSS_LEFTを最後に検討する 4034 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_CENTER) SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_SETCURSEL,1,0); 4035 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_RIGHT) SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_SETCURSEL,2,0); 4036 else SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_SETCURSEL,0,0); 4037 4038 4039 bInitial=0; 4040 break; 4041 } 3966 4042 case WM_COMMAND: 3967 3968 i=GetWndNum(GetParent(GetParent(hwnd))); 3969 if(i==-1) return 1; 3970 i2=GetWndInfoNum(MdiInfo[i].path); 3971 3972 //共通スタイル 3973 if(bInitial==0){ 3974 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1; 3975 } 3976 3977 switch(LOWORD(wParam)){ 3978 case IDC_SS_NOPREFIX: 3979 if(HIWORD(wParam)==BN_CLICKED){ 3980 //変更情報 3981 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3982 3983 if(SendDlgItemMessage(hwnd,IDC_SS_NOPREFIX,BM_GETCHECK,0,0)) 3984 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_NOPREFIX; 3985 else 3986 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~SS_NOPREFIX; 4043 { 4044 i=GetWndNum(GetParent(GetParent(hwnd))); 4045 if(i==-1) return 1; 4046 i2=GetWndInfoNum(MdiInfo[i].path); 4047 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 4048 4049 //共通スタイル 4050 if(bInitial==0){ 4051 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1; 4052 } 4053 4054 switch(LOWORD(wParam)){ 4055 case IDC_SS_NOPREFIX: 4056 if(HIWORD(wParam)==BN_CLICKED){ 4057 //変更情報 4058 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4059 4060 if(SendDlgItemMessage(hwnd,IDC_SS_NOPREFIX,BM_GETCHECK,0,0)) 4061 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_NOPREFIX; 4062 else 4063 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~SS_NOPREFIX; 4064 return 1; 4065 } 4066 break; 4067 case IDC_SS_LEFTNOWORDWRAP: 4068 if(HIWORD(wParam)==BN_CLICKED){ 4069 //変更情報 4070 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4071 4072 if(SendDlgItemMessage(hwnd,IDC_SS_LEFTNOWORDWRAP,BM_GETCHECK,0,0)) 4073 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_LEFTNOWORDWRAP; 4074 else 4075 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~SS_LEFTNOWORDWRAP; 4076 4077 DrawRadWindow(i,pWindowInfo); 4078 return 1; 4079 } 4080 break; 4081 case IDC_SS_NOTIFY: 4082 if(HIWORD(wParam)==BN_CLICKED){ 4083 //変更情報 4084 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4085 4086 if(SendDlgItemMessage(hwnd,IDC_SS_NOTIFY,BM_GETCHECK,0,0)) 4087 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_NOTIFY; 4088 else 4089 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~SS_NOTIFY; 4090 return 1; 4091 } 4092 break; 4093 4094 case IDC_SS_TEXTPOS: 4095 if(HIWORD(wParam)==CBN_SELCHANGE){ 4096 //変更情報 4097 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4098 4099 i3=SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_GETCURSEL,0,0); 4100 //SS_LEFT=0 4101 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(SS_CENTER|SS_RIGHT); 4102 if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_CENTER; 4103 else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_RIGHT; 4104 DrawRadWindow(i,pWindowInfo); 4105 return 1; 4106 } 4107 break; 4108 4109 case IDC_EXSTYLE: 4110 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1; 4111 DrawRadWindow(i,pWindowInfo); 3987 4112 return 1; 3988 } 3989 break; 3990 case IDC_SS_LEFTNOWORDWRAP: 3991 if(HIWORD(wParam)==BN_CLICKED){ 3992 //変更情報 3993 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 3994 3995 if(SendDlgItemMessage(hwnd,IDC_SS_LEFTNOWORDWRAP,BM_GETCHECK,0,0)) 3996 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_LEFTNOWORDWRAP; 3997 else 3998 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~SS_LEFTNOWORDWRAP; 3999 4000 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 4001 return 1; 4002 } 4003 break; 4004 case IDC_SS_NOTIFY: 4005 if(HIWORD(wParam)==BN_CLICKED){ 4006 //変更情報 4007 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4008 4009 if(SendDlgItemMessage(hwnd,IDC_SS_NOTIFY,BM_GETCHECK,0,0)) 4010 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_NOTIFY; 4011 else 4012 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~SS_NOTIFY; 4013 return 1; 4014 } 4015 break; 4016 4017 case IDC_SS_TEXTPOS: 4018 if(HIWORD(wParam)==CBN_SELCHANGE){ 4019 //変更情報 4020 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4021 4022 i3=SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_GETCURSEL,0,0); 4023 //SS_LEFT=0 4024 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(SS_CENTER|SS_RIGHT); 4025 if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_CENTER; 4026 else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_RIGHT; 4027 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 4028 return 1; 4029 } 4030 break; 4031 4032 case IDC_EXSTYLE: 4033 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1; 4034 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 4035 return 1; 4036 } 4037 break; 4113 } 4114 break; 4115 } 4038 4116 } 4039 4117 return 0; … … 4051 4129 switch(message){ 4052 4130 case WM_INITDIALOG: 4053 bInitial=1; 4054 i=GetWndNum(GetParent(GetParent(hwnd))); 4055 i2=GetWndInfoNum(MdiInfo[i].path); 4056 4057 SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 4058 4059 4060 /////////////////////////// 4061 // スタイル 4062 //////////// 4063 4064 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 4065 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 4066 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0); 4067 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0); 4068 4069 4070 //////// 4071 // 表示 4072 //////// 4073 4074 //"水平方向" 4075 SendDlgItemMessage(hwnd,IDC_TBS_SITUATION,CB_ADDSTRING,0,(long)STRING_DIRECTION_HORIZONTAL); 4076 //"垂直方向" 4077 SendDlgItemMessage(hwnd,IDC_TBS_SITUATION,CB_ADDSTRING,0,(long)STRING_DIRECTION_VERTICAL); 4078 4079 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TBS_VERT) SendDlgItemMessage(hwnd,IDC_TBS_SITUATION,CB_SETCURSEL,1,0); 4080 else SendDlgItemMessage(hwnd,IDC_TBS_SITUATION,CB_SETCURSEL,0,0); 4081 4082 4083 //////////// 4084 // ポイント 4085 //////////// 4086 4087 //"両方" 4088 SendDlgItemMessage(hwnd,IDC_TBS_POINT,CB_ADDSTRING,0,(long)STRING_TRACKBARPROP_STYLE_POSITION_BOTH); 4089 //"上/左" 4090 SendDlgItemMessage(hwnd,IDC_TBS_POINT,CB_ADDSTRING,0,(long)STRING_TRACKBARPROP_STYLE_POSITION_TOPORLEFT); 4091 //"下/右" 4092 SendDlgItemMessage(hwnd,IDC_TBS_POINT,CB_ADDSTRING,0,(long)STRING_TRACKBARPROP_STYLE_POSITION_BOTTOMORRIGHT); 4093 4094 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TBS_BOTH) SendDlgItemMessage(hwnd,IDC_TBS_POINT,CB_SETCURSEL,0,0); 4095 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TBS_TOP) SendDlgItemMessage(hwnd,IDC_TBS_POINT,CB_SETCURSEL,1,0); 4096 else SendDlgItemMessage(hwnd,IDC_TBS_POINT,CB_SETCURSEL,2,0); 4097 4098 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TBS_NOTICKS) SendDlgItemMessage(hwnd,IDC_TBS_NOTICKS,BM_SETCHECK,BST_CHECKED,0); 4099 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TBS_AUTOTICKS) SendDlgItemMessage(hwnd,IDC_TBS_AUTOTICKS,BM_SETCHECK,BST_CHECKED,0); 4100 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TBS_ENABLESELRANGE) SendDlgItemMessage(hwnd,IDC_TBS_ENABLESELRANGE,BM_SETCHECK,BST_CHECKED,0); 4101 4102 4103 bInitial=0; 4104 break; 4131 { 4132 bInitial=1; 4133 i=GetWndNum(GetParent(GetParent(hwnd))); 4134 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 4135 4136 SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 4137 4138 4139 /////////////////////////// 4140 // スタイル 4141 //////////// 4142 4143 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 4144 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 4145 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0); 4146 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0); 4147 4148 4149 //////// 4150 // 表示 4151 //////// 4152 4153 //"水平方向" 4154 SendDlgItemMessage(hwnd,IDC_TBS_SITUATION,CB_ADDSTRING,0,(long)STRING_DIRECTION_HORIZONTAL); 4155 //"垂直方向" 4156 SendDlgItemMessage(hwnd,IDC_TBS_SITUATION,CB_ADDSTRING,0,(long)STRING_DIRECTION_VERTICAL); 4157 4158 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TBS_VERT) SendDlgItemMessage(hwnd,IDC_TBS_SITUATION,CB_SETCURSEL,1,0); 4159 else SendDlgItemMessage(hwnd,IDC_TBS_SITUATION,CB_SETCURSEL,0,0); 4160 4161 4162 //////////// 4163 // ポイント 4164 //////////// 4165 4166 //"両方" 4167 SendDlgItemMessage(hwnd,IDC_TBS_POINT,CB_ADDSTRING,0,(long)STRING_TRACKBARPROP_STYLE_POSITION_BOTH); 4168 //"上/左" 4169 SendDlgItemMessage(hwnd,IDC_TBS_POINT,CB_ADDSTRING,0,(long)STRING_TRACKBARPROP_STYLE_POSITION_TOPORLEFT); 4170 //"下/右" 4171 SendDlgItemMessage(hwnd,IDC_TBS_POINT,CB_ADDSTRING,0,(long)STRING_TRACKBARPROP_STYLE_POSITION_BOTTOMORRIGHT); 4172 4173 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TBS_BOTH) SendDlgItemMessage(hwnd,IDC_TBS_POINT,CB_SETCURSEL,0,0); 4174 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TBS_TOP) SendDlgItemMessage(hwnd,IDC_TBS_POINT,CB_SETCURSEL,1,0); 4175 else SendDlgItemMessage(hwnd,IDC_TBS_POINT,CB_SETCURSEL,2,0); 4176 4177 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TBS_NOTICKS) SendDlgItemMessage(hwnd,IDC_TBS_NOTICKS,BM_SETCHECK,BST_CHECKED,0); 4178 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TBS_AUTOTICKS) SendDlgItemMessage(hwnd,IDC_TBS_AUTOTICKS,BM_SETCHECK,BST_CHECKED,0); 4179 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TBS_ENABLESELRANGE) SendDlgItemMessage(hwnd,IDC_TBS_ENABLESELRANGE,BM_SETCHECK,BST_CHECKED,0); 4180 4181 4182 bInitial=0; 4183 break; 4184 } 4105 4185 case WM_COMMAND: 4106 4107 i=GetWndNum(GetParent(GetParent(hwnd))); 4108 if(i==-1) return 1; 4109 i2=GetWndInfoNum(MdiInfo[i].path); 4110 4111 //共通スタイル 4112 if(bInitial==0){ 4113 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1; 4114 } 4115 4116 switch(LOWORD(wParam)){ 4117 case IDC_TBS_SITUATION: 4118 if(HIWORD(wParam)==CBN_SELCHANGE){ 4119 //変更情報 4120 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4121 4122 i3=SendDlgItemMessage(hwnd,IDC_TBS_SITUATION,CB_GETCURSEL,0,0); 4123 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TBS_VERT; 4124 if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TBS_VERT; 4125 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 4186 { 4187 i=GetWndNum(GetParent(GetParent(hwnd))); 4188 if(i==-1) return 1; 4189 i2=GetWndInfoNum(MdiInfo[i].path); 4190 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 4191 4192 //共通スタイル 4193 if(bInitial==0){ 4194 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1; 4195 } 4196 4197 switch(LOWORD(wParam)){ 4198 case IDC_TBS_SITUATION: 4199 if(HIWORD(wParam)==CBN_SELCHANGE){ 4200 //変更情報 4201 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4202 4203 i3=SendDlgItemMessage(hwnd,IDC_TBS_SITUATION,CB_GETCURSEL,0,0); 4204 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TBS_VERT; 4205 if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TBS_VERT; 4206 DrawRadWindow(i,pWindowInfo); 4207 return 1; 4208 } 4209 break; 4210 case IDC_TBS_POINT: 4211 if(HIWORD(wParam)==CBN_SELCHANGE){ 4212 //変更情報 4213 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4214 4215 i3=SendDlgItemMessage(hwnd,IDC_TBS_POINT,CB_GETCURSEL,0,0); 4216 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(TBS_BOTH|TBS_TOP); 4217 if(i3==0) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TBS_BOTH; 4218 else if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TBS_TOP; 4219 DrawRadWindow(i,pWindowInfo); 4220 return 1; 4221 } 4222 break; 4223 4224 case IDC_TBS_NOTICKS: 4225 if(HIWORD(wParam)==BN_CLICKED){ 4226 //変更情報 4227 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4228 4229 if(SendDlgItemMessage(hwnd,IDC_TBS_NOTICKS,BM_GETCHECK,0,0)) 4230 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TBS_NOTICKS; 4231 else 4232 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TBS_NOTICKS; 4233 DrawRadWindow(i,pWindowInfo); 4234 return 1; 4235 } 4236 break; 4237 case IDC_TBS_AUTOTICKS: 4238 if(HIWORD(wParam)==BN_CLICKED){ 4239 //変更情報 4240 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4241 4242 if(SendDlgItemMessage(hwnd,IDC_TBS_AUTOTICKS,BM_GETCHECK,0,0)) 4243 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TBS_AUTOTICKS; 4244 else 4245 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TBS_AUTOTICKS; 4246 return 1; 4247 } 4248 break; 4249 case IDC_TBS_ENABLESELRANGE: 4250 if(HIWORD(wParam)==BN_CLICKED){ 4251 //変更情報 4252 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4253 4254 if(SendDlgItemMessage(hwnd,IDC_TBS_ENABLESELRANGE,BM_GETCHECK,0,0)) 4255 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TBS_ENABLESELRANGE; 4256 else 4257 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TBS_ENABLESELRANGE; 4258 DrawRadWindow(i,pWindowInfo); 4259 return 1; 4260 } 4261 break; 4262 4263 case IDC_EXSTYLE: 4264 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1; 4265 DrawRadWindow(i,pWindowInfo); 4126 4266 return 1; 4127 } 4128 break; 4129 case IDC_TBS_POINT: 4130 if(HIWORD(wParam)==CBN_SELCHANGE){ 4131 //変更情報 4132 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4133 4134 i3=SendDlgItemMessage(hwnd,IDC_TBS_POINT,CB_GETCURSEL,0,0); 4135 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(TBS_BOTH|TBS_TOP); 4136 if(i3==0) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TBS_BOTH; 4137 else if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TBS_TOP; 4138 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 4139 return 1; 4140 } 4141 break; 4142 4143 case IDC_TBS_NOTICKS: 4144 if(HIWORD(wParam)==BN_CLICKED){ 4145 //変更情報 4146 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4147 4148 if(SendDlgItemMessage(hwnd,IDC_TBS_NOTICKS,BM_GETCHECK,0,0)) 4149 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TBS_NOTICKS; 4150 else 4151 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TBS_NOTICKS; 4152 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 4153 return 1; 4154 } 4155 break; 4156 case IDC_TBS_AUTOTICKS: 4157 if(HIWORD(wParam)==BN_CLICKED){ 4158 //変更情報 4159 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4160 4161 if(SendDlgItemMessage(hwnd,IDC_TBS_AUTOTICKS,BM_GETCHECK,0,0)) 4162 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TBS_AUTOTICKS; 4163 else 4164 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TBS_AUTOTICKS; 4165 return 1; 4166 } 4167 break; 4168 case IDC_TBS_ENABLESELRANGE: 4169 if(HIWORD(wParam)==BN_CLICKED){ 4170 //変更情報 4171 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4172 4173 if(SendDlgItemMessage(hwnd,IDC_TBS_ENABLESELRANGE,BM_GETCHECK,0,0)) 4174 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TBS_ENABLESELRANGE; 4175 else 4176 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TBS_ENABLESELRANGE; 4177 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 4178 return 1; 4179 } 4180 break; 4181 4182 case IDC_EXSTYLE: 4183 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1; 4184 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 4185 return 1; 4186 } 4187 break; 4267 } 4268 break; 4269 } 4188 4270 } 4189 4271 return 0; … … 4201 4283 switch(message){ 4202 4284 case WM_INITDIALOG: 4203 bInitial=1; 4204 i=GetWndNum(GetParent(GetParent(hwnd))); 4205 i2=GetWndInfoNum(MdiInfo[i].path); 4206 4207 SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 4208 4209 4210 //////////// 4211 //スタイル 4212 4213 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 4214 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 4215 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0); 4216 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0); 4217 4218 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_HASBUTTONS) SendDlgItemMessage(hwnd,IDC_TVS_HASBUTTONS,BM_SETCHECK,BST_CHECKED,0); 4219 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_HASLINES) SendDlgItemMessage(hwnd,IDC_TVS_HASLINES,BM_SETCHECK,BST_CHECKED,0); 4220 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_LINESATROOT) SendDlgItemMessage(hwnd,IDC_TVS_LINESATROOT,BM_SETCHECK,BST_CHECKED,0); 4221 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_EDITLABELS) SendDlgItemMessage(hwnd,IDC_TVS_EDITLABELS,BM_SETCHECK,BST_CHECKED,0); 4222 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_DISABLEDRAGDROP) SendDlgItemMessage(hwnd,IDC_TVS_DISABLEDRAGDROP,BM_SETCHECK,BST_CHECKED,0); 4223 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_SHOWSELALWAYS) SendDlgItemMessage(hwnd,IDC_TVS_SHOWSELALWAYS,BM_SETCHECK,BST_CHECKED,0); 4224 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_NOSCROLL) SendDlgItemMessage(hwnd,IDC_TVS_NOSCROLL,BM_SETCHECK,BST_CHECKED,0); 4225 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_NOTOOLTIPS) SendDlgItemMessage(hwnd,IDC_TVS_NOTOOLTIPS,BM_SETCHECK,BST_CHECKED,0); 4226 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_CHECKBOXES) SendDlgItemMessage(hwnd,IDC_TVS_CHECKBOXES,BM_SETCHECK,BST_CHECKED,0); 4227 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_FULLROWSELECT) SendDlgItemMessage(hwnd,IDC_TVS_FULLROWSELECT,BM_SETCHECK,BST_CHECKED,0); 4228 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_TRACKSELECT) SendDlgItemMessage(hwnd,IDC_TVS_TRACKSELECT,BM_SETCHECK,BST_CHECKED,0); 4229 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_SINGLEEXPAND) SendDlgItemMessage(hwnd,IDC_TVS_SINGLEEXPAND,BM_SETCHECK,BST_CHECKED,0); 4230 4231 4232 bInitial=0; 4233 break; 4285 { 4286 bInitial=1; 4287 i=GetWndNum(GetParent(GetParent(hwnd))); 4288 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 4289 4290 SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 4291 4292 4293 //////////// 4294 //スタイル 4295 4296 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 4297 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 4298 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0); 4299 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0); 4300 4301 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_HASBUTTONS) SendDlgItemMessage(hwnd,IDC_TVS_HASBUTTONS,BM_SETCHECK,BST_CHECKED,0); 4302 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_HASLINES) SendDlgItemMessage(hwnd,IDC_TVS_HASLINES,BM_SETCHECK,BST_CHECKED,0); 4303 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_LINESATROOT) SendDlgItemMessage(hwnd,IDC_TVS_LINESATROOT,BM_SETCHECK,BST_CHECKED,0); 4304 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_EDITLABELS) SendDlgItemMessage(hwnd,IDC_TVS_EDITLABELS,BM_SETCHECK,BST_CHECKED,0); 4305 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_DISABLEDRAGDROP) SendDlgItemMessage(hwnd,IDC_TVS_DISABLEDRAGDROP,BM_SETCHECK,BST_CHECKED,0); 4306 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_SHOWSELALWAYS) SendDlgItemMessage(hwnd,IDC_TVS_SHOWSELALWAYS,BM_SETCHECK,BST_CHECKED,0); 4307 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_NOSCROLL) SendDlgItemMessage(hwnd,IDC_TVS_NOSCROLL,BM_SETCHECK,BST_CHECKED,0); 4308 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_NOTOOLTIPS) SendDlgItemMessage(hwnd,IDC_TVS_NOTOOLTIPS,BM_SETCHECK,BST_CHECKED,0); 4309 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_CHECKBOXES) SendDlgItemMessage(hwnd,IDC_TVS_CHECKBOXES,BM_SETCHECK,BST_CHECKED,0); 4310 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_FULLROWSELECT) SendDlgItemMessage(hwnd,IDC_TVS_FULLROWSELECT,BM_SETCHECK,BST_CHECKED,0); 4311 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_TRACKSELECT) SendDlgItemMessage(hwnd,IDC_TVS_TRACKSELECT,BM_SETCHECK,BST_CHECKED,0); 4312 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_SINGLEEXPAND) SendDlgItemMessage(hwnd,IDC_TVS_SINGLEEXPAND,BM_SETCHECK,BST_CHECKED,0); 4313 4314 4315 bInitial=0; 4316 break; 4317 } 4234 4318 case WM_COMMAND: 4235 4236 i=GetWndNum(GetParent(GetParent(hwnd))); 4237 if(i==-1) return 1; 4238 i2=GetWndInfoNum(MdiInfo[i].path); 4239 4240 //共通スタイル 4241 if(bInitial==0){ 4242 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1; 4243 } 4244 4245 switch(LOWORD(wParam)){ 4246 case IDC_TVS_HASBUTTONS: 4247 if(HIWORD(wParam)==BN_CLICKED){ 4248 //変更情報 4249 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4250 4251 if(SendDlgItemMessage(hwnd,IDC_TVS_HASBUTTONS,BM_GETCHECK,0,0)) 4252 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_HASBUTTONS; 4253 else 4254 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_HASBUTTONS; 4319 { 4320 i=GetWndNum(GetParent(GetParent(hwnd))); 4321 if(i==-1) return 1; 4322 i2=GetWndInfoNum(MdiInfo[i].path); 4323 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 4324 4325 //共通スタイル 4326 if(bInitial==0){ 4327 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1; 4328 } 4329 4330 switch(LOWORD(wParam)){ 4331 case IDC_TVS_HASBUTTONS: 4332 if(HIWORD(wParam)==BN_CLICKED){ 4333 //変更情報 4334 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4335 4336 if(SendDlgItemMessage(hwnd,IDC_TVS_HASBUTTONS,BM_GETCHECK,0,0)) 4337 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_HASBUTTONS; 4338 else 4339 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_HASBUTTONS; 4340 return 1; 4341 } 4342 break; 4343 case IDC_TVS_HASLINES: 4344 if(HIWORD(wParam)==BN_CLICKED){ 4345 //変更情報 4346 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4347 4348 if(SendDlgItemMessage(hwnd,IDC_TVS_HASLINES,BM_GETCHECK,0,0)) 4349 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_HASLINES; 4350 else 4351 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_HASLINES; 4352 return 1; 4353 } 4354 break; 4355 case IDC_TVS_LINESATROOT: 4356 if(HIWORD(wParam)==BN_CLICKED){ 4357 //変更情報 4358 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4359 4360 if(SendDlgItemMessage(hwnd,IDC_TVS_LINESATROOT,BM_GETCHECK,0,0)) 4361 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_LINESATROOT; 4362 else 4363 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_LINESATROOT; 4364 return 1; 4365 } 4366 break; 4367 case IDC_TVS_EDITLABELS: 4368 if(HIWORD(wParam)==BN_CLICKED){ 4369 //変更情報 4370 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4371 4372 if(SendDlgItemMessage(hwnd,IDC_TVS_EDITLABELS,BM_GETCHECK,0,0)) 4373 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_EDITLABELS; 4374 else 4375 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_EDITLABELS; 4376 return 1; 4377 } 4378 break; 4379 case IDC_TVS_DISABLEDRAGDROP: 4380 if(HIWORD(wParam)==BN_CLICKED){ 4381 //変更情報 4382 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4383 4384 if(SendDlgItemMessage(hwnd,IDC_TVS_DISABLEDRAGDROP,BM_GETCHECK,0,0)) 4385 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_DISABLEDRAGDROP; 4386 else 4387 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_DISABLEDRAGDROP; 4388 return 1; 4389 } 4390 break; 4391 case IDC_TVS_SHOWSELALWAYS: 4392 if(HIWORD(wParam)==BN_CLICKED){ 4393 //変更情報 4394 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4395 4396 if(SendDlgItemMessage(hwnd,IDC_TVS_SHOWSELALWAYS,BM_GETCHECK,0,0)) 4397 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_SHOWSELALWAYS; 4398 else 4399 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_SHOWSELALWAYS; 4400 return 1; 4401 } 4402 break; 4403 case IDC_TVS_NOSCROLL: 4404 if(HIWORD(wParam)==BN_CLICKED){ 4405 //変更情報 4406 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4407 4408 if(SendDlgItemMessage(hwnd,IDC_TVS_NOSCROLL,BM_GETCHECK,0,0)) 4409 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_NOSCROLL; 4410 else 4411 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_NOSCROLL; 4412 return 1; 4413 } 4414 break; 4415 case IDC_TVS_NOTOOLTIPS: 4416 if(HIWORD(wParam)==BN_CLICKED){ 4417 //変更情報 4418 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4419 4420 if(SendDlgItemMessage(hwnd,IDC_TVS_NOTOOLTIPS,BM_GETCHECK,0,0)) 4421 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_NOTOOLTIPS; 4422 else 4423 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_NOTOOLTIPS; 4424 return 1; 4425 } 4426 break; 4427 case IDC_TVS_CHECKBOXES: 4428 if(HIWORD(wParam)==BN_CLICKED){ 4429 //変更情報 4430 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4431 4432 if(SendDlgItemMessage(hwnd,IDC_TVS_CHECKBOXES,BM_GETCHECK,0,0)) 4433 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_CHECKBOXES; 4434 else 4435 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_CHECKBOXES; 4436 return 1; 4437 } 4438 break; 4439 case IDC_TVS_FULLROWSELECT: 4440 if(HIWORD(wParam)==BN_CLICKED){ 4441 //変更情報 4442 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4443 4444 if(SendDlgItemMessage(hwnd,IDC_TVS_FULLROWSELECT,BM_GETCHECK,0,0)) 4445 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_FULLROWSELECT; 4446 else 4447 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_FULLROWSELECT; 4448 return 1; 4449 } 4450 break; 4451 case IDC_TVS_TRACKSELECT: 4452 if(HIWORD(wParam)==BN_CLICKED){ 4453 //変更情報 4454 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4455 4456 if(SendDlgItemMessage(hwnd,IDC_TVS_TRACKSELECT,BM_GETCHECK,0,0)) 4457 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_TRACKSELECT; 4458 else 4459 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_TRACKSELECT; 4460 return 1; 4461 } 4462 break; 4463 case IDC_TVS_SINGLEEXPAND: 4464 if(HIWORD(wParam)==BN_CLICKED){ 4465 //変更情報 4466 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4467 4468 if(SendDlgItemMessage(hwnd,IDC_TVS_SINGLEEXPAND,BM_GETCHECK,0,0)) 4469 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_SINGLEEXPAND; 4470 else 4471 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_SINGLEEXPAND; 4472 return 1; 4473 } 4474 break; 4475 4476 case IDC_EXSTYLE: 4477 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1; 4478 DrawRadWindow(i,pWindowInfo); 4255 4479 return 1; 4256 } 4257 break; 4258 case IDC_TVS_HASLINES: 4259 if(HIWORD(wParam)==BN_CLICKED){ 4260 //変更情報 4261 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4262 4263 if(SendDlgItemMessage(hwnd,IDC_TVS_HASLINES,BM_GETCHECK,0,0)) 4264 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_HASLINES; 4265 else 4266 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_HASLINES; 4267 return 1; 4268 } 4269 break; 4270 case IDC_TVS_LINESATROOT: 4271 if(HIWORD(wParam)==BN_CLICKED){ 4272 //変更情報 4273 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4274 4275 if(SendDlgItemMessage(hwnd,IDC_TVS_LINESATROOT,BM_GETCHECK,0,0)) 4276 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_LINESATROOT; 4277 else 4278 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_LINESATROOT; 4279 return 1; 4280 } 4281 break; 4282 case IDC_TVS_EDITLABELS: 4283 if(HIWORD(wParam)==BN_CLICKED){ 4284 //変更情報 4285 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4286 4287 if(SendDlgItemMessage(hwnd,IDC_TVS_EDITLABELS,BM_GETCHECK,0,0)) 4288 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_EDITLABELS; 4289 else 4290 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_EDITLABELS; 4291 return 1; 4292 } 4293 break; 4294 case IDC_TVS_DISABLEDRAGDROP: 4295 if(HIWORD(wParam)==BN_CLICKED){ 4296 //変更情報 4297 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4298 4299 if(SendDlgItemMessage(hwnd,IDC_TVS_DISABLEDRAGDROP,BM_GETCHECK,0,0)) 4300 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_DISABLEDRAGDROP; 4301 else 4302 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_DISABLEDRAGDROP; 4303 return 1; 4304 } 4305 break; 4306 case IDC_TVS_SHOWSELALWAYS: 4307 if(HIWORD(wParam)==BN_CLICKED){ 4308 //変更情報 4309 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4310 4311 if(SendDlgItemMessage(hwnd,IDC_TVS_SHOWSELALWAYS,BM_GETCHECK,0,0)) 4312 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_SHOWSELALWAYS; 4313 else 4314 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_SHOWSELALWAYS; 4315 return 1; 4316 } 4317 break; 4318 case IDC_TVS_NOSCROLL: 4319 if(HIWORD(wParam)==BN_CLICKED){ 4320 //変更情報 4321 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4322 4323 if(SendDlgItemMessage(hwnd,IDC_TVS_NOSCROLL,BM_GETCHECK,0,0)) 4324 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_NOSCROLL; 4325 else 4326 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_NOSCROLL; 4327 return 1; 4328 } 4329 break; 4330 case IDC_TVS_NOTOOLTIPS: 4331 if(HIWORD(wParam)==BN_CLICKED){ 4332 //変更情報 4333 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4334 4335 if(SendDlgItemMessage(hwnd,IDC_TVS_NOTOOLTIPS,BM_GETCHECK,0,0)) 4336 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_NOTOOLTIPS; 4337 else 4338 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_NOTOOLTIPS; 4339 return 1; 4340 } 4341 break; 4342 case IDC_TVS_CHECKBOXES: 4343 if(HIWORD(wParam)==BN_CLICKED){ 4344 //変更情報 4345 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4346 4347 if(SendDlgItemMessage(hwnd,IDC_TVS_CHECKBOXES,BM_GETCHECK,0,0)) 4348 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_CHECKBOXES; 4349 else 4350 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_CHECKBOXES; 4351 return 1; 4352 } 4353 break; 4354 case IDC_TVS_FULLROWSELECT: 4355 if(HIWORD(wParam)==BN_CLICKED){ 4356 //変更情報 4357 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4358 4359 if(SendDlgItemMessage(hwnd,IDC_TVS_FULLROWSELECT,BM_GETCHECK,0,0)) 4360 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_FULLROWSELECT; 4361 else 4362 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_FULLROWSELECT; 4363 return 1; 4364 } 4365 break; 4366 case IDC_TVS_TRACKSELECT: 4367 if(HIWORD(wParam)==BN_CLICKED){ 4368 //変更情報 4369 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4370 4371 if(SendDlgItemMessage(hwnd,IDC_TVS_TRACKSELECT,BM_GETCHECK,0,0)) 4372 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_TRACKSELECT; 4373 else 4374 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_TRACKSELECT; 4375 return 1; 4376 } 4377 break; 4378 case IDC_TVS_SINGLEEXPAND: 4379 if(HIWORD(wParam)==BN_CLICKED){ 4380 //変更情報 4381 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4382 4383 if(SendDlgItemMessage(hwnd,IDC_TVS_SINGLEEXPAND,BM_GETCHECK,0,0)) 4384 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_SINGLEEXPAND; 4385 else 4386 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_SINGLEEXPAND; 4387 return 1; 4388 } 4389 break; 4390 4391 case IDC_EXSTYLE: 4392 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1; 4393 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 4394 return 1; 4395 } 4396 break; 4480 } 4481 break; 4482 } 4397 4483 } 4398 4484 return 0; … … 4410 4496 switch(message){ 4411 4497 case WM_INITDIALOG: 4412 bInitial=1; 4413 i=GetWndNum(GetParent(GetParent(hwnd))); 4414 i2=GetWndInfoNum(MdiInfo[i].path); 4415 4416 SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 4417 SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption); 4418 4419 4420 ////////////////// 4421 // スタイル 4422 //////////// 4423 4424 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 4425 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 4426 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0); 4427 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0); 4428 4429 4430 //////// 4431 // 方向 4432 //////// 4433 4434 //"水平方向" 4435 SendDlgItemMessage(hwnd,IDC_UDS_SITUATION,CB_ADDSTRING,0,(long)STRING_DIRECTION_HORIZONTAL); 4436 //"垂直方向" 4437 SendDlgItemMessage(hwnd,IDC_UDS_SITUATION,CB_ADDSTRING,0,(long)STRING_DIRECTION_VERTICAL); 4438 4439 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_HORZ) SendDlgItemMessage(hwnd,IDC_UDS_SITUATION,CB_SETCURSEL,0,0); 4440 else SendDlgItemMessage(hwnd,IDC_UDS_SITUATION,CB_SETCURSEL,1,0); 4441 4442 //////////// 4443 // アタッチ 4444 //////////// 4445 4446 //"なし" 4447 SendDlgItemMessage(hwnd,IDC_UDS_ATTACH,CB_ADDSTRING,0,(long)STRING_NONE_); 4448 //"左端" 4449 SendDlgItemMessage(hwnd,IDC_UDS_ATTACH,CB_ADDSTRING,0,(long)STRING_LEFT); 4450 //"右端" 4451 SendDlgItemMessage(hwnd,IDC_UDS_ATTACH,CB_ADDSTRING,0,(long)STRING_RIGHT); 4452 4453 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_ALIGNLEFT) SendDlgItemMessage(hwnd,IDC_UDS_ATTACH,CB_SETCURSEL,1,0); 4454 else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_ALIGNRIGHT) SendDlgItemMessage(hwnd,IDC_UDS_ATTACH,CB_SETCURSEL,2,0); 4455 else SendDlgItemMessage(hwnd,IDC_UDS_ATTACH,CB_SETCURSEL,0,0); 4456 4457 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_AUTOBUDDY) SendDlgItemMessage(hwnd,IDC_UDS_AUTOBUDDY,BM_SETCHECK,BST_CHECKED,0); 4458 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_SETBUDDYINT) SendDlgItemMessage(hwnd,IDC_UDS_SETBUDDYINT,BM_SETCHECK,BST_CHECKED,0); 4459 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_NOTHOUSANDS) SendDlgItemMessage(hwnd,IDC_UDS_NOTHOUSANDS,BM_SETCHECK,BST_CHECKED,0); 4460 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_WRAP) SendDlgItemMessage(hwnd,IDC_UDS_WRAP,BM_SETCHECK,BST_CHECKED,0); 4461 if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_ARROWKEYS) SendDlgItemMessage(hwnd,IDC_UDS_ARROWKEYS,BM_SETCHECK,BST_CHECKED,0); 4462 4463 4464 bInitial=0; 4465 break; 4498 { 4499 bInitial=1; 4500 i=GetWndNum(GetParent(GetParent(hwnd))); 4501 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 4502 4503 SetDlgItemText(hwnd,IDC_IDNAME,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName); 4504 SetDlgItemText(hwnd,IDC_CAPTION,pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption); 4505 4506 4507 ////////////////// 4508 // スタイル 4509 //////////// 4510 4511 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0); 4512 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0); 4513 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0); 4514 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0); 4515 4516 4517 //////// 4518 // 方向 4519 //////// 4520 4521 //"水平方向" 4522 SendDlgItemMessage(hwnd,IDC_UDS_SITUATION,CB_ADDSTRING,0,(long)STRING_DIRECTION_HORIZONTAL); 4523 //"垂直方向" 4524 SendDlgItemMessage(hwnd,IDC_UDS_SITUATION,CB_ADDSTRING,0,(long)STRING_DIRECTION_VERTICAL); 4525 4526 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_HORZ) SendDlgItemMessage(hwnd,IDC_UDS_SITUATION,CB_SETCURSEL,0,0); 4527 else SendDlgItemMessage(hwnd,IDC_UDS_SITUATION,CB_SETCURSEL,1,0); 4528 4529 //////////// 4530 // アタッチ 4531 //////////// 4532 4533 //"なし" 4534 SendDlgItemMessage(hwnd,IDC_UDS_ATTACH,CB_ADDSTRING,0,(long)STRING_NONE_); 4535 //"左端" 4536 SendDlgItemMessage(hwnd,IDC_UDS_ATTACH,CB_ADDSTRING,0,(long)STRING_LEFT); 4537 //"右端" 4538 SendDlgItemMessage(hwnd,IDC_UDS_ATTACH,CB_ADDSTRING,0,(long)STRING_RIGHT); 4539 4540 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_ALIGNLEFT) SendDlgItemMessage(hwnd,IDC_UDS_ATTACH,CB_SETCURSEL,1,0); 4541 else if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_ALIGNRIGHT) SendDlgItemMessage(hwnd,IDC_UDS_ATTACH,CB_SETCURSEL,2,0); 4542 else SendDlgItemMessage(hwnd,IDC_UDS_ATTACH,CB_SETCURSEL,0,0); 4543 4544 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_AUTOBUDDY) SendDlgItemMessage(hwnd,IDC_UDS_AUTOBUDDY,BM_SETCHECK,BST_CHECKED,0); 4545 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_SETBUDDYINT) SendDlgItemMessage(hwnd,IDC_UDS_SETBUDDYINT,BM_SETCHECK,BST_CHECKED,0); 4546 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_NOTHOUSANDS) SendDlgItemMessage(hwnd,IDC_UDS_NOTHOUSANDS,BM_SETCHECK,BST_CHECKED,0); 4547 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_WRAP) SendDlgItemMessage(hwnd,IDC_UDS_WRAP,BM_SETCHECK,BST_CHECKED,0); 4548 if(pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_ARROWKEYS) SendDlgItemMessage(hwnd,IDC_UDS_ARROWKEYS,BM_SETCHECK,BST_CHECKED,0); 4549 4550 4551 bInitial=0; 4552 break; 4553 } 4466 4554 case WM_COMMAND: 4467 4468 i=GetWndNum(GetParent(GetParent(hwnd))); 4469 if(i==-1) return 1; 4470 i2=GetWndInfoNum(MdiInfo[i].path); 4471 4472 //共通スタイル 4473 if(bInitial==0){ 4474 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1; 4475 } 4476 4477 switch(LOWORD(wParam)){ 4478 case IDC_UDS_SITUATION: 4479 if(HIWORD(wParam)==CBN_SELCHANGE){ 4480 //変更情報 4481 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4482 4483 i3=SendDlgItemMessage(hwnd,IDC_UDS_SITUATION,CB_GETCURSEL,0,0); 4484 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~UDS_HORZ; 4485 if(i3==0) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_HORZ; 4486 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 4555 { 4556 i=GetWndNum(GetParent(GetParent(hwnd))); 4557 if(i==-1) return 1; 4558 i2=GetWndInfoNum(MdiInfo[i].path); 4559 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[i].path); 4560 4561 //共通スタイル 4562 if(bInitial==0){ 4563 if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1; 4564 } 4565 4566 switch(LOWORD(wParam)){ 4567 case IDC_UDS_SITUATION: 4568 if(HIWORD(wParam)==CBN_SELCHANGE){ 4569 //変更情報 4570 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4571 4572 i3=SendDlgItemMessage(hwnd,IDC_UDS_SITUATION,CB_GETCURSEL,0,0); 4573 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~UDS_HORZ; 4574 if(i3==0) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_HORZ; 4575 DrawRadWindow(i,pWindowInfo); 4576 return 1; 4577 } 4578 break; 4579 case IDC_UDS_ATTACH: 4580 if(HIWORD(wParam)==CBN_SELCHANGE){ 4581 //変更情報 4582 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4583 4584 i3=SendDlgItemMessage(hwnd,IDC_UDS_ATTACH,CB_GETCURSEL,0,0); 4585 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(UDS_ALIGNLEFT|UDS_ALIGNRIGHT); 4586 if(i3==1) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_ALIGNLEFT; 4587 else if(i3==2) pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_ALIGNRIGHT; 4588 return 1; 4589 } 4590 break; 4591 4592 case IDC_UDS_AUTOBUDDY: 4593 if(HIWORD(wParam)==BN_CLICKED){ 4594 //変更情報 4595 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4596 4597 if(SendDlgItemMessage(hwnd,IDC_UDS_AUTOBUDDY,BM_GETCHECK,0,0)) 4598 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_AUTOBUDDY; 4599 else 4600 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~UDS_AUTOBUDDY; 4601 return 1; 4602 } 4603 break; 4604 case IDC_UDS_SETBUDDYINT: 4605 if(HIWORD(wParam)==BN_CLICKED){ 4606 //変更情報 4607 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4608 4609 if(SendDlgItemMessage(hwnd,IDC_UDS_SETBUDDYINT,BM_GETCHECK,0,0)) 4610 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_SETBUDDYINT; 4611 else 4612 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~UDS_SETBUDDYINT; 4613 return 1; 4614 } 4615 break; 4616 case IDC_UDS_NOTHOUSANDS: 4617 if(HIWORD(wParam)==BN_CLICKED){ 4618 //変更情報 4619 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4620 4621 if(SendDlgItemMessage(hwnd,IDC_UDS_NOTHOUSANDS,BM_GETCHECK,0,0)) 4622 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_NOTHOUSANDS; 4623 else 4624 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~UDS_NOTHOUSANDS; 4625 return 1; 4626 } 4627 break; 4628 case IDC_UDS_WRAP: 4629 if(HIWORD(wParam)==BN_CLICKED){ 4630 //変更情報 4631 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4632 4633 if(SendDlgItemMessage(hwnd,IDC_UDS_WRAP,BM_GETCHECK,0,0)) 4634 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_WRAP; 4635 else 4636 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~UDS_WRAP; 4637 return 1; 4638 } 4639 break; 4640 case IDC_UDS_ARROWKEYS: 4641 if(HIWORD(wParam)==BN_CLICKED){ 4642 //変更情報 4643 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4644 4645 if(SendDlgItemMessage(hwnd,IDC_UDS_ARROWKEYS,BM_GETCHECK,0,0)) 4646 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_ARROWKEYS; 4647 else 4648 pWindowInfo->pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~UDS_ARROWKEYS; 4649 return 1; 4650 } 4651 break; 4652 4653 case IDC_EXSTYLE: 4654 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1; 4655 DrawRadWindow(i,pWindowInfo); 4487 4656 return 1; 4488 } 4489 break; 4490 case IDC_UDS_ATTACH: 4491 if(HIWORD(wParam)==CBN_SELCHANGE){ 4492 //変更情報 4493 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4494 4495 i3=SendDlgItemMessage(hwnd,IDC_UDS_ATTACH,CB_GETCURSEL,0,0); 4496 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(UDS_ALIGNLEFT|UDS_ALIGNRIGHT); 4497 if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_ALIGNLEFT; 4498 else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_ALIGNRIGHT; 4499 return 1; 4500 } 4501 break; 4502 4503 case IDC_UDS_AUTOBUDDY: 4504 if(HIWORD(wParam)==BN_CLICKED){ 4505 //変更情報 4506 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4507 4508 if(SendDlgItemMessage(hwnd,IDC_UDS_AUTOBUDDY,BM_GETCHECK,0,0)) 4509 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_AUTOBUDDY; 4510 else 4511 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~UDS_AUTOBUDDY; 4512 return 1; 4513 } 4514 break; 4515 case IDC_UDS_SETBUDDYINT: 4516 if(HIWORD(wParam)==BN_CLICKED){ 4517 //変更情報 4518 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4519 4520 if(SendDlgItemMessage(hwnd,IDC_UDS_SETBUDDYINT,BM_GETCHECK,0,0)) 4521 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_SETBUDDYINT; 4522 else 4523 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~UDS_SETBUDDYINT; 4524 return 1; 4525 } 4526 break; 4527 case IDC_UDS_NOTHOUSANDS: 4528 if(HIWORD(wParam)==BN_CLICKED){ 4529 //変更情報 4530 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4531 4532 if(SendDlgItemMessage(hwnd,IDC_UDS_NOTHOUSANDS,BM_GETCHECK,0,0)) 4533 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_NOTHOUSANDS; 4534 else 4535 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~UDS_NOTHOUSANDS; 4536 return 1; 4537 } 4538 break; 4539 case IDC_UDS_WRAP: 4540 if(HIWORD(wParam)==BN_CLICKED){ 4541 //変更情報 4542 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4543 4544 if(SendDlgItemMessage(hwnd,IDC_UDS_WRAP,BM_GETCHECK,0,0)) 4545 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_WRAP; 4546 else 4547 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~UDS_WRAP; 4548 return 1; 4549 } 4550 break; 4551 case IDC_UDS_ARROWKEYS: 4552 if(HIWORD(wParam)==BN_CLICKED){ 4553 //変更情報 4554 Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style); 4555 4556 if(SendDlgItemMessage(hwnd,IDC_UDS_ARROWKEYS,BM_GETCHECK,0,0)) 4557 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_ARROWKEYS; 4558 else 4559 ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~UDS_ARROWKEYS; 4560 return 1; 4561 } 4562 break; 4563 4564 case IDC_EXSTYLE: 4565 if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,(DLGPROC)DlgRadProperty_Item_ExStyle)) return 1; 4566 DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]); 4567 return 1; 4657 } 4568 4658 } 4569 4659 } -
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]) -
trunk/ab5.0/abdev/abdev/WindowControl.cpp
r477 r609 16 16 extern PROJECTINFO ProjectInfo; 17 17 int i; 18 for(i=0;i<ProjectInfo. NumberOfWindows;i++){19 if(lstrcmpi(name,ProjectInfo. pWindowInfo[i].name)==0) return i;18 for(i=0;i<ProjectInfo.windowInfos.size();i++){ 19 if(lstrcmpi(name,ProjectInfo.windowInfos[i].name)==0) return i; 20 20 } 21 21 return -1; 22 } 23 WINDOW_INFO *GetWndInfo( char *name ) 24 { 25 extern PROJECTINFO ProjectInfo; 26 int i; 27 for( int i=0;i<ProjectInfo.windowInfos.size();i++) 28 { 29 if(lstrcmpi(name,ProjectInfo.windowInfos[i].name)==0) return &ProjectInfo.windowInfos[i]; 30 } 31 return NULL; 22 32 } 23 33 void ChangeDivisionToOrSign(char *CopyBuffer,const char *ReadBuffer){ … … 81 91 82 92 for(i3--;i3>=0;i3--){ 83 pChildInfo=&ProjectInfo. pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[i3]];93 pChildInfo=&ProjectInfo.windowInfos[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[i3]]; 84 94 85 95 MemSize+=lstrlen(pChildInfo->IdName)+1+ … … 518 528 int i,i2,sw; 519 529 char temporary[MAX_PATH],*temp2; 520 WINDOW_INFO *pWindowInfo; 521 522 pWindowInfo=&ProjectInfo.pWindowInfo[WndInfoNum]; 530 531 WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum]; 523 532 524 533 Command[0]=0; … … 976 985 int i,i2,i3,i4,i5,i6,sw1,sw2,sw3,sw4,size; 977 986 char *buffer,**ppNames,temporary[MAX_PATH]; 978 WINDOW_INFO *pWindowInfo;979 980 pWindowInfo=ProjectInfo.pWindowInfo;981 987 982 988 size=2; … … 1002 1008 1003 1009 ppNames=(char **)HeapAlloc(hHeap,0,1); 1004 for(i=0,i4=1000,i5=0;i<ProjectInfo. NumberOfWindows;i++){1005 for(i3=0;i3< pWindowInfo[i].NumberOfChildWindows;i3++){1010 for(i=0,i4=1000,i5=0;i<ProjectInfo.windowInfos.size();i++){ 1011 for(i3=0;i3<ProjectInfo.windowInfos[i].NumberOfChildWindows;i3++){ 1006 1012 1007 1013 //重複チェック 1008 1014 for(i6=0,sw1=0;i6<i5;i6++){ 1009 if(lstrcmpi(ppNames[i6], pWindowInfo[i].pChildInfo[i3].IdName)==0){1015 if(lstrcmpi(ppNames[i6],ProjectInfo.windowInfos[i].pChildInfo[i3].IdName)==0){ 1010 1016 sw1=1; 1011 1017 break; … … 1015 1021 1016 1022 ppNames=(char **)HeapReAlloc(hHeap,0,ppNames,sizeof(char *)*(i5+1)); 1017 ppNames[i5]= pWindowInfo[i].pChildInfo[i3].IdName;1023 ppNames[i5]=ProjectInfo.windowInfos[i].pChildInfo[i3].IdName; 1018 1024 i5++; 1019 1025 1020 sprintf(buffer+i2,"Const %s=%d\r\n", pWindowInfo[i].pChildInfo[i3].IdName,i4);1026 sprintf(buffer+i2,"Const %s=%d\r\n",ProjectInfo.windowInfos[i].pChildInfo[i3].IdName,i4); 1021 1027 i2+=lstrlen(buffer+i2); 1022 1028 i4++; … … 1038 1044 1039 1045 //ハンドル変数を定義 1040 for(i=0;i<ProjectInfo. NumberOfWindows;i++){1041 sprintf(buffer+i2,"Dim %s As HWND\r\n", pWindowInfo[i].HandleName);1042 i2+=lstrlen(buffer+i2); 1043 sprintf(buffer+i2,"Dim hFont_%s As HFONT\r\n", pWindowInfo[i].name);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); 1044 1050 i2+=lstrlen(buffer+i2); 1045 1051 sprintf(buffer+i2,"hFont_%s=CreateFont(%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,\"%s\")\r\n", 1046 pWindowInfo[i].name,1047 pWindowInfo[i].LogFont.lfHeight,1048 pWindowInfo[i].LogFont.lfWidth,1049 pWindowInfo[i].LogFont.lfEscapement,1050 pWindowInfo[i].LogFont.lfOrientation,1051 pWindowInfo[i].LogFont.lfWeight,1052 pWindowInfo[i].LogFont.lfItalic,1053 pWindowInfo[i].LogFont.lfUnderline,1054 pWindowInfo[i].LogFont.lfStrikeOut,1055 pWindowInfo[i].LogFont.lfCharSet,1056 pWindowInfo[i].LogFont.lfOutPrecision,1057 pWindowInfo[i].LogFont.lfClipPrecision,1058 pWindowInfo[i].LogFont.lfQuality,1059 pWindowInfo[i].LogFont.lfPitchAndFamily,1060 pWindowInfo[i].LogFont.lfFaceName);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); 1061 1067 i2+=lstrlen(buffer+i2); 1062 1068 … … 1072 1078 lstrcpy(buffer+i2,"h3DFaceBrush=CreateSolidBrush(GetSysColor(COLOR_3DFACE))\r\n"); 1073 1079 i2+=lstrlen(buffer+i2); 1074 for(i=0;i<ProjectInfo. NumberOfWindows;i++){1075 if( pWindowInfo[i].bgColor<=0&&1076 pWindowInfo[i].bgColor!=-(int)RGB(255,255,255)&&1077 pWindowInfo[i].bgColor!=-(int)RGB(0,0,0)){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)){ 1078 1084 sprintf(buffer+i2,"Dim _RadSys_hBackBrush%d As HBRUSH\r\n",i); 1079 1085 i2+=lstrlen(buffer+i2); 1080 sprintf(buffer+i2,"_RadSys_hBackBrush%d=CreateSolidBrush(%d)\r\n",i,- pWindowInfo[i].bgColor);1086 sprintf(buffer+i2,"_RadSys_hBackBrush%d=CreateSolidBrush(%d)\r\n",i,-ProjectInfo.windowInfos[i].bgColor); 1081 1087 i2+=lstrlen(buffer+i2); 1082 1088 } 1083 if( pWindowInfo[i].bgColor>=0x1000){1089 if(ProjectInfo.windowInfos[i].bgColor>=0x1000){ 1084 1090 sprintf(buffer+i2,"Dim _RadSys_hBackBrush%d As HBRUSH\r\n",i); 1085 1091 i2+=lstrlen(buffer+i2); 1086 1092 sprintf(buffer+i2,"_RadSys_hBackBrush%d=CreatePatternBrush(LoadImage(GetModuleHandle(0),%s,IMAGE_BITMAP,0,0,LR_DEFAULTSIZE or LR_SHARED))\r\n", 1087 1093 i, 1088 ProjectInfo.res.pBitmapResInfo[ pWindowInfo[i].bgColor-0x1000].IdName);1094 ProjectInfo.res.pBitmapResInfo[ProjectInfo.windowInfos[i].bgColor-0x1000].IdName); 1089 1095 i2+=lstrlen(buffer+i2); 1090 1096 } … … 1095 1101 1096 1102 //イメージ ボックス用の変数を定義 1097 for(i=0;i<ProjectInfo. NumberOfWindows;i++){1098 for(i3=0;i3< pWindowInfo[i].NumberOfChildWindows;i3++){1099 if( pWindowInfo[i].pChildInfo[i3].Control==CT_IMAGEBOX){1100 if(( pWindowInfo[i].pChildInfo[i3].style&0x000F)==SS_ICON||1101 ( pWindowInfo[i].pChildInfo[i3].style&0x000F)==SS_BITMAP){1102 sprintf(buffer+i2,"Dim hImage_%s_%s As HANDLE\r\n", pWindowInfo[i].name,pWindowInfo[i].pChildInfo[i3].IdName);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); 1103 1109 i2+=lstrlen(buffer+i2); 1104 1110 … … 1148 1154 } 1149 1155 1150 for(i=0;i<ProjectInfo. NumberOfWindows;i++){1156 for(i=0;i<ProjectInfo.windowInfos.size();i++){ 1151 1157 //フォントハンドル解放 1152 sprintf(buffer+i2,"\tDeleteObject(hFont_%s)\r\n",ProjectInfo. pWindowInfo[i].name);1158 sprintf(buffer+i2,"\tDeleteObject(hFont_%s)\r\n",ProjectInfo.windowInfos[i].name); 1153 1159 i2+=lstrlen(buffer+i2); 1154 1160 … … 1162 1168 lstrcpy(buffer+i2,"\tDeleteObject(h3DFaceBrush)\r\n"); 1163 1169 i2+=lstrlen(buffer+i2); 1164 for(i=0;i<ProjectInfo. NumberOfWindows;i++){1165 if( pWindowInfo[i].bgColor<=0&&1166 pWindowInfo[i].bgColor!=-(int)RGB(255,255,255)&&1167 pWindowInfo[i].bgColor!=-(int)RGB(0,0,0)){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)){ 1168 1174 sprintf(buffer+i2,"\tDeleteObject(_RadSys_hBackBrush%d)\r\n",i); 1169 1175 i2+=lstrlen(buffer+i2); … … 1178 1184 1179 1185 1180 for(i=0;i<ProjectInfo. NumberOfWindows;i++){1186 for(i=0;i<ProjectInfo.windowInfos.size();i++){ 1181 1187 if(i!=0){ 1182 1188 lstrcpy(buffer+i2,"\r\n"); … … 1191 1197 ppNames=GetProcedureNamesOfMessageCall(i,&pItemEventInfo,&i3,&bAvailUserProc[i]); 1192 1198 1193 sprintf(buffer+i2,"Function EventCall_%s(hWnd As HWND, message As DWord, wParam As WPARAM, lParam As LPARAM) As LRESULT\r\n", pWindowInfo[i].name);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); 1194 1200 i2+=lstrlen(buffer+i2); 1195 1201 … … 1229 1235 i2+=lstrlen(buffer+i2); 1230 1236 if(sw4){ 1231 sprintf(buffer+i2,"\t\t\t%s_Notify(ByVal (lParam As *NMHDR))\r\n", pWindowInfo[i].name);1237 sprintf(buffer+i2,"\t\t\t%s_Notify(ByVal (lParam As *NMHDR))\r\n",ProjectInfo.windowInfos[i].name); 1232 1238 i2+=lstrlen(buffer+i2); 1233 1239 } … … 1239 1245 i2+=lstrlen(buffer+i2); 1240 1246 1241 if(GetNotifyCommandByItemMessage(& pWindowInfo[i],pItemEventInfo,buffer+i2,"\t\t\t\t")){1247 if(GetNotifyCommandByItemMessage(&ProjectInfo.windowInfos[i],pItemEventInfo,buffer+i2,"\t\t\t\t")){ 1242 1248 i2+=lstrlen(buffer+i2); 1243 1249 … … 1255 1261 lstrcpy(buffer+i2,"\t\tCase WM_NOTIFY\r\n"); 1256 1262 i2+=lstrlen(buffer+i2); 1257 sprintf(buffer+i2,"\t\t\t%s_Notify(ByVal (lParam As *NMHDR))\r\n", pWindowInfo[i].name);1263 sprintf(buffer+i2,"\t\t\t%s_Notify(ByVal (lParam As *NMHDR))\r\n",ProjectInfo.windowInfos[i].name); 1258 1264 i2+=lstrlen(buffer+i2); 1259 1265 } … … 1267 1273 1268 1274 //pItemEventInfoのIdName、EventNameメンバのメモリ解放はこの関数内で行う 1269 GetCommandByItemMessage(& pWindowInfo[i],pItemEventInfo,buffer+i2,"\t\t\t\t");1275 GetCommandByItemMessage(&ProjectInfo.windowInfos[i],pItemEventInfo,buffer+i2,"\t\t\t\t"); 1270 1276 i2+=lstrlen(buffer+i2); 1271 1277 … … 1278 1284 lstrcpy(buffer+i2,"\t\tCase Else\r\n"); 1279 1285 i2+=lstrlen(buffer+i2); 1280 sprintf(buffer+i2,"\t\t\tEventCall_%s=DefWindowProc(hWnd,message,wParam,lParam)\r\n", pWindowInfo[i].name);1286 sprintf(buffer+i2,"\t\t\tEventCall_%s=DefWindowProc(hWnd,message,wParam,lParam)\r\n",ProjectInfo.windowInfos[i].name); 1281 1287 i2+=lstrlen(buffer+i2); 1282 1288 lstrcpy(buffer+i2,"\t\t\tExit Function\r\n"); … … 1286 1292 i2+=lstrlen(buffer+i2); 1287 1293 1288 sprintf(buffer+i2,"\tEventCall_%s=0\r\n", pWindowInfo[i].name);1294 sprintf(buffer+i2,"\tEventCall_%s=0\r\n",ProjectInfo.windowInfos[i].name); 1289 1295 i2+=lstrlen(buffer+i2); 1290 1296 lstrcpy(buffer+i2,"End Function\r\n"); … … 1338 1344 lstrcpy(buffer+i2,"\tDim hDlg As HWND\r\n"); 1339 1345 i2+=lstrlen(buffer+i2); 1340 for(i=0,sw1=0;i<ProjectInfo. NumberOfWindows;i++){1341 if( pWindowInfo[i].type==WNDTYPE_MODALDLG){1346 for(i=0,sw1=0;i<ProjectInfo.windowInfos.size();i++){ 1347 if(ProjectInfo.windowInfos[i].type==WNDTYPE_MODALDLG){ 1342 1348 if(sw1==0){ 1343 sprintf(buffer+i2,"\tIf lstrcmp(TemplateName,\"%s\")=0 Then\r\n", pWindowInfo[i].name);1349 sprintf(buffer+i2,"\tIf lstrcmp(TemplateName,\"%s\")=0 Then\r\n",ProjectInfo.windowInfos[i].name); 1344 1350 i2+=lstrlen(buffer+i2); 1345 1351 sw1=1; 1346 1352 } 1347 1353 else{ 1348 sprintf(buffer+i2,"\tElseIf lstrcmp(TemplateName,\"%s\")=0 Then\r\n", pWindowInfo[i].name);1354 sprintf(buffer+i2,"\tElseIf lstrcmp(TemplateName,\"%s\")=0 Then\r\n",ProjectInfo.windowInfos[i].name); 1349 1355 i2+=lstrlen(buffer+i2); 1350 1356 } 1351 1357 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", 1352 pWindowInfo[i].HandleName,1353 pWindowInfo[i].ExStyle,1354 pWindowInfo[i].caption,1355 pWindowInfo[i].style,1356 pWindowInfo[i].pos.x,1357 pWindowInfo[i].pos.y,1358 pWindowInfo[i].size.cx,1359 pWindowInfo[i].size.cy,1360 pWindowInfo[i].id);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); 1361 1367 i2+=lstrlen(buffer+i2); 1362 1368 sprintf(buffer+i2,"\t\thDlg=%s\r\n", 1363 pWindowInfo[i].HandleName);1369 ProjectInfo.windowInfos[i].HandleName); 1364 1370 i2+=lstrlen(buffer+i2); 1365 1371 if(bAvailUserProc[i]){ 1366 1372 sprintf(buffer+i2,"\t\tSetWindowLongPtr(%s,GWLP_WNDPROC,AddressOf(%s) As LONG_PTR)\r\n", 1367 pWindowInfo[i].HandleName,1368 pWindowInfo[i].CallBackName);1373 ProjectInfo.windowInfos[i].HandleName, 1374 ProjectInfo.windowInfos[i].CallBackName); 1369 1375 } 1370 1376 else{ 1371 1377 sprintf(buffer+i2,"\t\tSetWindowLongPtr(%s,GWLP_WNDPROC,AddressOf(EventCall_%s) As LONG_PTR)\r\n", 1372 pWindowInfo[i].HandleName,1373 pWindowInfo[i].name);1374 } 1375 i2+=lstrlen(buffer+i2); 1376 sprintf(buffer+i2,"\t\tSendMessage(%s,WM_INITDIALOG,0,0)\r\n", pWindowInfo[i].HandleName);1377 i2+=lstrlen(buffer+i2); 1378 if( pWindowInfo[i].IconResName){1379 sprintf(buffer+i2,"\t\tSendMessage(%s,WM_SETICON,ICON_SMALL,LoadIcon(GetModuleHandle(0),MAKEINTRESOURCE(%s)) As LPARAM)\r\n", pWindowInfo[i].HandleName,pWindowInfo[i].IconResName);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); 1380 1386 i2+=lstrlen(buffer+i2); 1381 1387 } 1382 sprintf(buffer+i2,"\t\tShowWindow(%s,SW_SHOW)\r\n", pWindowInfo[i].HandleName);1388 sprintf(buffer+i2,"\t\tShowWindow(%s,SW_SHOW)\r\n",ProjectInfo.windowInfos[i].HandleName); 1383 1389 i2+=lstrlen(buffer+i2); 1384 1390 } … … 1434 1440 lstrcpy(buffer+i2,"\r\nFunction CreateDialog(hOwnerWnd As HWND, TemplateName As LPSTR) As HWND\r\n"); 1435 1441 i2+=lstrlen(buffer+i2); 1436 for(i=0;i<ProjectInfo. NumberOfWindows;i++){1437 if( pWindowInfo[i].type==WNDTYPE_MODELESSDLG){1438 sprintf(buffer+i2,"\tIf lstrcmp(TemplateName,\"%s\")=0 Then\r\n", pWindowInfo[i].name);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); 1439 1445 i2+=lstrlen(buffer+i2); 1440 1446 1441 1447 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", 1442 pWindowInfo[i].HandleName,1443 pWindowInfo[i].ExStyle,1444 pWindowInfo[i].caption,1445 pWindowInfo[i].style,1446 pWindowInfo[i].pos.x,1447 pWindowInfo[i].pos.y,1448 pWindowInfo[i].size.cx,1449 pWindowInfo[i].size.cy,1450 pWindowInfo[i].id);1451 i2+=lstrlen(buffer+i2); 1452 sprintf(buffer+i2,"\t\tCreateDialog=%s\r\n", pWindowInfo[i].HandleName);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); 1453 1459 i2+=lstrlen(buffer+i2); 1454 1460 if(bAvailUserProc[i]){ 1455 1461 sprintf(buffer+i2,"\t\tSetWindowLongPtr(%s,GWLP_WNDPROC,AddressOf(%s) As LONG_PTR)\r\n", 1456 pWindowInfo[i].HandleName,1457 pWindowInfo[i].CallBackName);1462 ProjectInfo.windowInfos[i].HandleName, 1463 ProjectInfo.windowInfos[i].CallBackName); 1458 1464 } 1459 1465 else{ 1460 1466 sprintf(buffer+i2,"\t\tSetWindowLongPtr(%s,GWLP_WNDPROC,AddressOf(EventCall_%s) As LONG_PTR)\r\n", 1461 pWindowInfo[i].HandleName,1462 pWindowInfo[i].name);1463 } 1464 i2+=lstrlen(buffer+i2); 1465 sprintf(buffer+i2,"\t\tSendMessage(%s,WM_INITDIALOG,0,0)\r\n", pWindowInfo[i].HandleName);1466 i2+=lstrlen(buffer+i2); 1467 if( pWindowInfo[i].IconResName){1468 sprintf(buffer+i2,"\t\tSendMessage(%s,WM_SETICON,ICON_SMALL,LoadIcon(GetModuleHandle(0),MAKEINTRESOURCE(%s)) As LPARAM)\r\n", pWindowInfo[i].HandleName,pWindowInfo[i].IconResName);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); 1469 1475 i2+=lstrlen(buffer+i2); 1470 1476 } 1471 sprintf(buffer+i2,"\tEnd If\r\n", pWindowInfo[i].name);1477 sprintf(buffer+i2,"\tEnd If\r\n",ProjectInfo.windowInfos[i].name); 1472 1478 i2+=lstrlen(buffer+i2); 1473 1479 } … … 1504 1510 i2+=lstrlen(buffer+i2); 1505 1511 1506 for(i=0;i<ProjectInfo. NumberOfWindows;i++){1507 if( pWindowInfo[i].type==WNDTYPE_DEFAULT){1512 for(i=0;i<ProjectInfo.windowInfos.size();i++){ 1513 if(ProjectInfo.windowInfos[i].type==WNDTYPE_DEFAULT){ 1508 1514 ////////////////////// 1509 1515 //通常ウィンドウ作成 … … 1512 1518 i2+=2; 1513 1519 1514 if( pWindowInfo[i].IconResName==0){1520 if(ProjectInfo.windowInfos[i].IconResName==0){ 1515 1521 lstrcpy(buffer+i2,"_RadSys_wcl.hIcon=LoadIcon(NULL,MAKEINTRESOURCE(IDI_APPLICATION))\r\n"); 1516 1522 i2+=lstrlen(buffer+i2); … … 1519 1525 } 1520 1526 else{ 1521 sprintf(buffer+i2,"_RadSys_wcl.hIcon=LoadIcon(_RadSys_wcl.hInstance,MAKEINTRESOURCE(%s))\r\n", pWindowInfo[i].IconResName);1527 sprintf(buffer+i2,"_RadSys_wcl.hIcon=LoadIcon(_RadSys_wcl.hInstance,MAKEINTRESOURCE(%s))\r\n",ProjectInfo.windowInfos[i].IconResName); 1522 1528 i2+=lstrlen(buffer+i2); 1523 sprintf(buffer+i2,"_RadSys_wcl.hIconSm=LoadIcon(_RadSys_wcl.hInstance,MAKEINTRESOURCE(%s))\r\n", pWindowInfo[i].IconResName);1529 sprintf(buffer+i2,"_RadSys_wcl.hIconSm=LoadIcon(_RadSys_wcl.hInstance,MAKEINTRESOURCE(%s))\r\n",ProjectInfo.windowInfos[i].IconResName); 1524 1530 i2+=lstrlen(buffer+i2); 1525 1531 } … … 1528 1534 i2+=lstrlen(buffer+i2); 1529 1535 if(bAvailUserProc[i]) 1530 sprintf(buffer+i2,"_RadSys_wcl.lpfnWndProc=AddressOf(%s)\r\n", pWindowInfo[i].CallBackName);1531 else sprintf(buffer+i2,"_RadSys_wcl.lpfnWndProc=AddressOf(EventCall_%s)\r\n", pWindowInfo[i].name);1532 i2+=lstrlen(buffer+i2); 1533 if( pWindowInfo[i].bgColor==COLOR_3DFACE)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) 1534 1540 lstrcpy(buffer+i2,"_RadSys_wcl.hbrBackground=h3DFaceBrush\r\n"); 1535 else if( pWindowInfo[i].bgColor==-(int)RGB(255,255,255))1541 else if(ProjectInfo.windowInfos[i].bgColor==-(int)RGB(255,255,255)) 1536 1542 lstrcpy(buffer+i2,"_RadSys_wcl.hbrBackground=GetStockObject(WHITE_BRUSH)\r\n"); 1537 else if( pWindowInfo[i].bgColor==-(int)RGB(0,0,0))1543 else if(ProjectInfo.windowInfos[i].bgColor==-(int)RGB(0,0,0)) 1538 1544 lstrcpy(buffer+i2,"_RadSys_wcl.hbrBackground=GetStockObject(BLACK_BRUSH)\r\n"); 1539 else if( pWindowInfo[i].bgColor<=0||1540 pWindowInfo[i].bgColor>=0x1000){1545 else if(ProjectInfo.windowInfos[i].bgColor<=0|| 1546 ProjectInfo.windowInfos[i].bgColor>=0x1000){ 1541 1547 //色指定またはビットマップ 1542 1548 sprintf(buffer+i2,"_RadSys_wcl.hbrBackground=_RadSys_hBackBrush%d\r\n",i); … … 1546 1552 i2+=lstrlen(buffer+i2); 1547 1553 sprintf(buffer+i2,"CreateWindowEx(&H%08x,\"%s%d\",\"%s\",&H%08x,%d,%d,%d,%d,0,0,GetModuleHandle(0),0)\r\n", 1548 pWindowInfo[i].ExStyle,1549 pWindowInfo[i].ClassName,i,1550 pWindowInfo[i].caption,1551 pWindowInfo[i].style,1552 pWindowInfo[i].pos.x,1553 pWindowInfo[i].pos.y,1554 pWindowInfo[i].size.cx,1555 pWindowInfo[i].size.cy);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); 1556 1562 i2+=lstrlen(buffer+i2); 1557 1563 } … … 1596 1602 return i2; 1597 1603 } 1598 void SaveWindowFile(char *path,WINDOW_INFO *pWindowInfo,int NumberOfWindowInfo){ 1604 void SaveWindowFile( char *path, const std::vector<WINDOW_INFO> &windowInfos ) 1605 { 1599 1606 extern HANDLE hHeap; 1600 1607 extern MDIINFO MdiInfo[MAX_WNDNUM]; … … 1605 1612 size=2; 1606 1613 buffer=(char *)HeapAlloc(hHeap,0,GENERAL_SIZE*size); 1607 for(i=0,i2=0;i< NumberOfWindowInfo;i++){1608 sprintf(buffer+i2,"WINDOW:%s\r\n", pWindowInfo[i].name);1609 i2+=lstrlen(buffer+i2); 1610 sprintf(buffer+i2," HANDLE = %s\r\n", pWindowInfo[i].HandleName);1611 i2+=lstrlen(buffer+i2); 1612 sprintf(buffer+i2," POINT = %d,%d\r\n", pWindowInfo[i].pos.x,pWindowInfo[i].pos.y);1613 i2+=lstrlen(buffer+i2); 1614 sprintf(buffer+i2," SIZE = %d,%d\r\n", pWindowInfo[i].size.cx,pWindowInfo[i].size.cy);1615 i2+=lstrlen(buffer+i2); 1616 sprintf(buffer+i2," CAPTION = \"%s\"\r\n", pWindowInfo[i].caption);1617 i2+=lstrlen(buffer+i2); 1618 sprintf(buffer+i2," STYLE = &H%08x\r\n", pWindowInfo[i].style);1619 i2+=lstrlen(buffer+i2); 1620 sprintf(buffer+i2," EXSTYLE = &H%08x\r\n", pWindowInfo[i].ExStyle);1621 i2+=lstrlen(buffer+i2); 1622 if( pWindowInfo[i].MenuID){1623 sprintf(buffer+i2," MENUID = %s\r\n", pWindowInfo[i].MenuID);1624 i2+=lstrlen(buffer+i2); 1625 } 1626 sprintf(buffer+i2," ID = %d\r\n", pWindowInfo[i].id);1627 i2+=lstrlen(buffer+i2); 1628 sprintf(buffer+i2," BGCOLOR = %d\r\n", pWindowInfo[i].bgColor);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); 1629 1636 i2+=lstrlen(buffer+i2); 1630 1637 sprintf(buffer+i2," FONT = %d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,\"%s\"\r\n", 1631 pWindowInfo[i].LogFont.lfHeight,1632 pWindowInfo[i].LogFont.lfWidth,1633 pWindowInfo[i].LogFont.lfEscapement,1634 pWindowInfo[i].LogFont.lfOrientation,1635 pWindowInfo[i].LogFont.lfWeight,1636 pWindowInfo[i].LogFont.lfItalic,1637 pWindowInfo[i].LogFont.lfUnderline,1638 pWindowInfo[i].LogFont.lfStrikeOut,1639 pWindowInfo[i].LogFont.lfCharSet,1640 pWindowInfo[i].LogFont.lfOutPrecision,1641 pWindowInfo[i].LogFont.lfClipPrecision,1642 pWindowInfo[i].LogFont.lfQuality,1643 pWindowInfo[i].LogFont.lfPitchAndFamily,1644 pWindowInfo[i].LogFont.lfFaceName);1645 i2+=lstrlen(buffer+i2); 1646 if( pWindowInfo[i].IconResName){1647 sprintf(buffer+i2," ICONID = %s\r\n", pWindowInfo[i].IconResName);1648 i2+=lstrlen(buffer+i2); 1649 } 1650 sprintf(buffer+i2," CLASS = \"%s\"\r\n", pWindowInfo[i].ClassName);1651 i2+=lstrlen(buffer+i2); 1652 sprintf(buffer+i2," CALLBACK = %s\r\n", pWindowInfo[i].CallBackName);1653 i2+=lstrlen(buffer+i2); 1654 sprintf(buffer+i2," TYPE = %d\r\n", pWindowInfo[i].type);1655 i2+=lstrlen(buffer+i2); 1656 sprintf(buffer+i2," FILEPATH = %s\r\n", pWindowInfo[i].filepath);1657 i2+=lstrlen(buffer+i2); 1658 for(i3=0;i3< pWindowInfo[i].NumberOfChildWindows;i3++){1659 temporary=SetCaptionSequence( pWindowInfo[i].pChildInfo[i3].caption);1638 windowInfos[i].LogFont.lfHeight, 1639 windowInfos[i].LogFont.lfWidth, 1640 windowInfos[i].LogFont.lfEscapement, 1641 windowInfos[i].LogFont.lfOrientation, 1642 windowInfos[i].LogFont.lfWeight, 1643 windowInfos[i].LogFont.lfItalic, 1644 windowInfos[i].LogFont.lfUnderline, 1645 windowInfos[i].LogFont.lfStrikeOut, 1646 windowInfos[i].LogFont.lfCharSet, 1647 windowInfos[i].LogFont.lfOutPrecision, 1648 windowInfos[i].LogFont.lfClipPrecision, 1649 windowInfos[i].LogFont.lfQuality, 1650 windowInfos[i].LogFont.lfPitchAndFamily, 1651 windowInfos[i].LogFont.lfFaceName); 1652 i2+=lstrlen(buffer+i2); 1653 if(windowInfos[i].IconResName){ 1654 sprintf(buffer+i2," ICONID = %s\r\n",windowInfos[i].IconResName); 1655 i2+=lstrlen(buffer+i2); 1656 } 1657 sprintf(buffer+i2," CLASS = \"%s\"\r\n",windowInfos[i].ClassName); 1658 i2+=lstrlen(buffer+i2); 1659 sprintf(buffer+i2," CALLBACK = %s\r\n",windowInfos[i].CallBackName); 1660 i2+=lstrlen(buffer+i2); 1661 sprintf(buffer+i2," TYPE = %d\r\n",windowInfos[i].type); 1662 i2+=lstrlen(buffer+i2); 1663 sprintf(buffer+i2," FILEPATH = %s\r\n",windowInfos[i].filepath); 1664 i2+=lstrlen(buffer+i2); 1665 for(i3=0;i3<windowInfos[i].NumberOfChildWindows;i3++){ 1666 temporary=SetCaptionSequence(windowInfos[i].pChildInfo[i3].caption); 1660 1667 sprintf(buffer+i2," ITEM = %s,%d,%d,%d,%d,\"%s\",&H%08x,&H%08x,%d", 1661 pWindowInfo[i].pChildInfo[i3].IdName,1662 pWindowInfo[i].pChildInfo[i3].pos.x,pWindowInfo[i].pChildInfo[i3].pos.y,1663 pWindowInfo[i].pChildInfo[i3].size.cx,pWindowInfo[i].pChildInfo[i3].size.cy,1668 windowInfos[i].pChildInfo[i3].IdName, 1669 windowInfos[i].pChildInfo[i3].pos.x,windowInfos[i].pChildInfo[i3].pos.y, 1670 windowInfos[i].pChildInfo[i3].size.cx,windowInfos[i].pChildInfo[i3].size.cy, 1664 1671 temporary, 1665 pWindowInfo[i].pChildInfo[i3].style,1666 pWindowInfo[i].pChildInfo[i3].ExStyle,1667 pWindowInfo[i].pChildInfo[i3].Control1672 windowInfos[i].pChildInfo[i3].style, 1673 windowInfos[i].pChildInfo[i3].ExStyle, 1674 windowInfos[i].pChildInfo[i3].Control 1668 1675 ); 1669 1676 i2+=lstrlen(buffer+i2); 1670 1677 HeapDefaultFree(temporary); 1671 if( pWindowInfo[i].pChildInfo[i3].Control==CT_IMAGEBOX){1672 sprintf(buffer+i2,",%d,\"%s\"", pWindowInfo[i].pChildInfo[i3].ImageCtrlInfo.type,pWindowInfo[i].pChildInfo[i3].ImageCtrlInfo.path);1678 if(windowInfos[i].pChildInfo[i3].Control==CT_IMAGEBOX){ 1679 sprintf(buffer+i2,",%d,\"%s\"",windowInfos[i].pChildInfo[i3].ImageCtrlInfo.type,windowInfos[i].pChildInfo[i3].ImageCtrlInfo.path); 1673 1680 i2+=lstrlen(buffer+i2); 1674 1681 } … … 1680 1687 } 1681 1688 } 1682 sprintf(buffer+i2,"END\r\n", pWindowInfo[i].name);1689 sprintf(buffer+i2,"END\r\n",windowInfos[i].name); 1683 1690 i2+=lstrlen(buffer+i2); 1684 1691 if(i2-GENERAL_SIZE<GENERAL_SIZE){ … … 1691 1698 i2+=lstrlen(buffer+i2); 1692 1699 i2+=GetSaveMenuData(buffer+i2,1,ProjectInfo.pMenuInfo[i].pMenuInfo,ProjectInfo.pMenuInfo[i].NumberOfMenu); 1693 sprintf(buffer+i2,"END\r\n", pWindowInfo[i].name);1700 sprintf(buffer+i2,"END\r\n",windowInfos[i].name); 1694 1701 i2+=lstrlen(buffer+i2); 1695 1702 if(i2-GENERAL_SIZE<GENERAL_SIZE){ … … 1814 1821 ProjectInfo.pMenuInfo=(MENU_INFO *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,1); 1815 1822 1816 ProjectInfo.NumberOfWindows=0; 1817 ProjectInfo.pWindowInfo=(WINDOW_INFO *)HeapAlloc(hHeap,0,1); 1823 ProjectInfo.windowInfos.clear(); 1818 1824 1819 1825 for(i=0,i3=0;;i++){ … … 1850 1856 //ウィンドウ 1851 1857 if(lstrcmpi(temporary,"WINDOW")==0&&i3==0){ 1852 ProjectInfo.NumberOfWindows++; 1853 ProjectInfo.pWindowInfo=(WINDOW_INFO *)HeapReAlloc(hHeap,HEAP_ZERO_MEMORY,ProjectInfo.pWindowInfo,ProjectInfo.NumberOfWindows*sizeof(WINDOW_INFO)); 1854 i4=ProjectInfo.NumberOfWindows-1; 1858 ProjectInfo.windowInfos.push_back( WINDOW_INFO() ); 1855 1859 i3=1; 1856 1860 1857 ProjectInfo. pWindowInfo[i4].name=(char *)HeapAlloc(hHeap,0,i2+1);1858 lstrcpy(ProjectInfo. pWindowInfo[i4].name,temp2);1859 1860 ProjectInfo. pWindowInfo[i4].NumberOfChildWindows=0;1861 ProjectInfo. pWindowInfo[i4].pChildInfo=(CHILDINFO *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,1);1861 ProjectInfo.windowInfos.back().name=(char *)HeapAlloc(hHeap,0,i2+1); 1862 lstrcpy(ProjectInfo.windowInfos.back().name,temp2); 1863 1864 ProjectInfo.windowInfos.back().NumberOfChildWindows=0; 1865 ProjectInfo.windowInfos.back().pChildInfo=(CHILDINFO *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,1); 1862 1866 } 1863 1867 else if(lstrcmpi(temporary,"HANDLE")==0&&i3==1){ 1864 ProjectInfo. pWindowInfo[i4].HandleName=(char *)HeapAlloc(hHeap,0,i2+1);1865 lstrcpy(ProjectInfo. pWindowInfo[i4].HandleName,temp2);1868 ProjectInfo.windowInfos.back().HandleName=(char *)HeapAlloc(hHeap,0,i2+1); 1869 lstrcpy(ProjectInfo.windowInfos.back().HandleName,temp2); 1866 1870 } 1867 1871 else if(lstrcmpi(temporary,"POINT")==0&&i3==1){ 1868 1872 sscanf(temp2,"%d,%d", 1869 &ProjectInfo. pWindowInfo[i4].pos.x,1870 &ProjectInfo. pWindowInfo[i4].pos.y);1871 if(ProjectInfo. pWindowInfo[i4].pos.x==-1) ProjectInfo.pWindowInfo[i4].pos.x=CW_USEDEFAULT;1872 if(ProjectInfo. pWindowInfo[i4].pos.y==-1) ProjectInfo.pWindowInfo[i4].pos.y=CW_USEDEFAULT;1873 &ProjectInfo.windowInfos.back().pos.x, 1874 &ProjectInfo.windowInfos.back().pos.y); 1875 if(ProjectInfo.windowInfos.back().pos.x==-1) ProjectInfo.windowInfos.back().pos.x=CW_USEDEFAULT; 1876 if(ProjectInfo.windowInfos.back().pos.y==-1) ProjectInfo.windowInfos.back().pos.y=CW_USEDEFAULT; 1873 1877 } 1874 1878 else if(lstrcmpi(temporary,"SIZE")==0&&i3==1){ 1875 1879 sscanf(temp2,"%d,%d", 1876 &ProjectInfo. pWindowInfo[i4].size.cx,1877 &ProjectInfo. pWindowInfo[i4].size.cy);1880 &ProjectInfo.windowInfos.back().size.cx, 1881 &ProjectInfo.windowInfos.back().size.cy); 1878 1882 } 1879 1883 else if(lstrcmpi(temporary,"CAPTION")==0&&i3==1){ 1880 1884 if(temp2[0]=='\"'&&temp2[lstrlen(temp2)-1]=='\"'){ 1881 1885 temp2[lstrlen(temp2)-1]=0; 1882 ProjectInfo. pWindowInfo[i4].caption=(char *)HeapAlloc(hHeap,0,i2+1);1883 lstrcpy(ProjectInfo. pWindowInfo[i4].caption,temp2+1);1886 ProjectInfo.windowInfos.back().caption=(char *)HeapAlloc(hHeap,0,i2+1); 1887 lstrcpy(ProjectInfo.windowInfos.back().caption,temp2+1); 1884 1888 } 1885 1889 } 1886 else if(lstrcmpi(temporary,"STYLE")==0&&i3==1) ProjectInfo. pWindowInfo[i4].style=GetValue(temp2);1887 else if(lstrcmpi(temporary,"EXSTYLE")==0&&i3==1) ProjectInfo. pWindowInfo[i4].ExStyle=GetValue(temp2);1890 else if(lstrcmpi(temporary,"STYLE")==0&&i3==1) ProjectInfo.windowInfos.back().style=GetValue(temp2); 1891 else if(lstrcmpi(temporary,"EXSTYLE")==0&&i3==1) ProjectInfo.windowInfos.back().ExStyle=GetValue(temp2); 1888 1892 else if(lstrcmpi(temporary,"MENUID")==0&&i3==1){ 1889 ProjectInfo. pWindowInfo[i4].MenuID=(char *)HeapAlloc(hHeap,0,i2+1);1890 lstrcpy(ProjectInfo. pWindowInfo[i4].MenuID,temp2);1891 } 1892 else if(lstrcmpi(temporary,"ID")==0&&i3==1) ProjectInfo. pWindowInfo[i4].id=GetValue(temp2);1893 ProjectInfo.windowInfos.back().MenuID=(char *)HeapAlloc(hHeap,0,i2+1); 1894 lstrcpy(ProjectInfo.windowInfos.back().MenuID,temp2); 1895 } 1896 else if(lstrcmpi(temporary,"ID")==0&&i3==1) ProjectInfo.windowInfos.back().id=GetValue(temp2); 1893 1897 else if(lstrcmpi(temporary,"BGCOLOR")==0&&i3==1){ 1894 ProjectInfo. pWindowInfo[i4].bgColor=GetValue(temp2);1898 ProjectInfo.windowInfos.back().bgColor=GetValue(temp2); 1895 1899 if(ProjectInfo.dwVersion<=3){ 1896 1900 //プロジェクトバージョンが3以前のときは新値に変換する 1897 if(ProjectInfo. pWindowInfo[i4].bgColor==-1)1898 ProjectInfo. pWindowInfo[i4].bgColor=-(int)RGB(255,255,255);1901 if(ProjectInfo.windowInfos.back().bgColor==-1) 1902 ProjectInfo.windowInfos.back().bgColor=-(int)RGB(255,255,255); 1899 1903 } 1900 1904 } 1901 1905 else if(lstrcmpi(temporary,"FONT")==0&&i3==1){ 1902 1906 i5=GetOneParameter(temp2,0,temp3); 1903 ProjectInfo. pWindowInfo[i4].LogFont.lfHeight=GetValue(temp3);1907 ProjectInfo.windowInfos.back().LogFont.lfHeight=GetValue(temp3); 1904 1908 1905 1909 i5=GetOneParameter(temp2,i5,temp3); 1906 ProjectInfo. pWindowInfo[i4].LogFont.lfWidth=GetValue(temp3);1910 ProjectInfo.windowInfos.back().LogFont.lfWidth=GetValue(temp3); 1907 1911 1908 1912 i5=GetOneParameter(temp2,i5,temp3); 1909 ProjectInfo. pWindowInfo[i4].LogFont.lfEscapement=GetValue(temp3);1913 ProjectInfo.windowInfos.back().LogFont.lfEscapement=GetValue(temp3); 1910 1914 1911 1915 i5=GetOneParameter(temp2,i5,temp3); 1912 ProjectInfo. pWindowInfo[i4].LogFont.lfOrientation=GetValue(temp3);1916 ProjectInfo.windowInfos.back().LogFont.lfOrientation=GetValue(temp3); 1913 1917 1914 1918 i5=GetOneParameter(temp2,i5,temp3); 1915 ProjectInfo. pWindowInfo[i4].LogFont.lfWeight=GetValue(temp3);1919 ProjectInfo.windowInfos.back().LogFont.lfWeight=GetValue(temp3); 1916 1920 1917 1921 i5=GetOneParameter(temp2,i5,temp3); 1918 ProjectInfo. pWindowInfo[i4].LogFont.lfItalic=(BYTE)GetValue(temp3);1922 ProjectInfo.windowInfos.back().LogFont.lfItalic=(BYTE)GetValue(temp3); 1919 1923 1920 1924 i5=GetOneParameter(temp2,i5,temp3); 1921 ProjectInfo. pWindowInfo[i4].LogFont.lfUnderline=(BYTE)GetValue(temp3);1925 ProjectInfo.windowInfos.back().LogFont.lfUnderline=(BYTE)GetValue(temp3); 1922 1926 1923 1927 i5=GetOneParameter(temp2,i5,temp3); 1924 ProjectInfo. pWindowInfo[i4].LogFont.lfStrikeOut=(BYTE)GetValue(temp3);1928 ProjectInfo.windowInfos.back().LogFont.lfStrikeOut=(BYTE)GetValue(temp3); 1925 1929 1926 1930 i5=GetOneParameter(temp2,i5,temp3); 1927 ProjectInfo. pWindowInfo[i4].LogFont.lfCharSet=(BYTE)GetValue(temp3);1931 ProjectInfo.windowInfos.back().LogFont.lfCharSet=(BYTE)GetValue(temp3); 1928 1932 1929 1933 i5=GetOneParameter(temp2,i5,temp3); 1930 ProjectInfo. pWindowInfo[i4].LogFont.lfOutPrecision=(BYTE)GetValue(temp3);1934 ProjectInfo.windowInfos.back().LogFont.lfOutPrecision=(BYTE)GetValue(temp3); 1931 1935 1932 1936 i5=GetOneParameter(temp2,i5,temp3); 1933 ProjectInfo. pWindowInfo[i4].LogFont.lfClipPrecision=(BYTE)GetValue(temp3);1937 ProjectInfo.windowInfos.back().LogFont.lfClipPrecision=(BYTE)GetValue(temp3); 1934 1938 1935 1939 i5=GetOneParameter(temp2,i5,temp3); 1936 ProjectInfo. pWindowInfo[i4].LogFont.lfQuality=(BYTE)GetValue(temp3);1940 ProjectInfo.windowInfos.back().LogFont.lfQuality=(BYTE)GetValue(temp3); 1937 1941 1938 1942 i5=GetOneParameter(temp2,i5,temp3); 1939 ProjectInfo. pWindowInfo[i4].LogFont.lfPitchAndFamily=(BYTE)GetValue(temp3);1943 ProjectInfo.windowInfos.back().LogFont.lfPitchAndFamily=(BYTE)GetValue(temp3); 1940 1944 1941 1945 i5=GetOneParameter(temp2,i5,temp3); 1942 1946 RemoveStringQuotes(temp3); 1943 lstrcpy(ProjectInfo. pWindowInfo[i4].LogFont.lfFaceName,temp3);1947 lstrcpy(ProjectInfo.windowInfos.back().LogFont.lfFaceName,temp3); 1944 1948 } 1945 1949 else if(lstrcmpi(temporary,"ICONID")==0&&i3==1){ 1946 ProjectInfo. pWindowInfo[i4].IconResName=(char *)HeapAlloc(hHeap,0,i2+1);1947 lstrcpy(ProjectInfo. pWindowInfo[i4].IconResName,temp2);1950 ProjectInfo.windowInfos.back().IconResName=(char *)HeapAlloc(hHeap,0,i2+1); 1951 lstrcpy(ProjectInfo.windowInfos.back().IconResName,temp2); 1948 1952 } 1949 1953 else if(lstrcmpi(temporary,"CLASS")==0&&i3==1){ 1950 1954 if(temp2[0]=='\"'&&temp2[lstrlen(temp2)-1]=='\"'){ 1951 1955 temp2[lstrlen(temp2)-1]=0; 1952 ProjectInfo. pWindowInfo[i4].ClassName=(char *)HeapAlloc(hHeap,0,i2+1);1953 lstrcpy(ProjectInfo. pWindowInfo[i4].ClassName,temp2+1);1956 ProjectInfo.windowInfos.back().ClassName=(char *)HeapAlloc(hHeap,0,i2+1); 1957 lstrcpy(ProjectInfo.windowInfos.back().ClassName,temp2+1); 1954 1958 } 1955 1959 } 1956 1960 else if(lstrcmpi(temporary,"CALLBACK")==0&&i3==1){ 1957 ProjectInfo. pWindowInfo[i4].CallBackName=(char *)HeapAlloc(hHeap,0,i2+1);1958 lstrcpy(ProjectInfo. pWindowInfo[i4].CallBackName,temp2);1961 ProjectInfo.windowInfos.back().CallBackName=(char *)HeapAlloc(hHeap,0,i2+1); 1962 lstrcpy(ProjectInfo.windowInfos.back().CallBackName,temp2); 1959 1963 } 1960 1964 1961 1965 //以前のバージョンとの互換用 1962 else if(lstrcmpi(temporary,"DLGTMP")==0&&i3==1) ProjectInfo. pWindowInfo[i4].type=GetValue(temp2);1963 1964 else if(lstrcmpi(temporary,"TYPE")==0&&i3==1) ProjectInfo. pWindowInfo[i4].type=GetValue(temp2);1966 else if(lstrcmpi(temporary,"DLGTMP")==0&&i3==1) ProjectInfo.windowInfos.back().type=GetValue(temp2); 1967 1968 else if(lstrcmpi(temporary,"TYPE")==0&&i3==1) ProjectInfo.windowInfos.back().type=GetValue(temp2); 1965 1969 else if(lstrcmpi(temporary,"FILEPATH")==0&&i3==1){ 1966 ProjectInfo. pWindowInfo[i4].filepath=(char *)HeapAlloc(hHeap,0,i2+1);1967 lstrcpy(ProjectInfo. pWindowInfo[i4].filepath,temp2);1970 ProjectInfo.windowInfos.back().filepath=(char *)HeapAlloc(hHeap,0,i2+1); 1971 lstrcpy(ProjectInfo.windowInfos.back().filepath,temp2); 1968 1972 } 1969 1973 else if(lstrcmpi(temporary,"ITEM")==0&&i3==1){ 1970 ProjectInfo. pWindowInfo[i4].pChildInfo=(CHILDINFO *)HeapReAlloc(hHeap,HEAP_ZERO_MEMORY,ProjectInfo.pWindowInfo[i4].pChildInfo,(ProjectInfo.pWindowInfo[i4].NumberOfChildWindows+1)*sizeof(CHILDINFO));1971 pChildInfo=&ProjectInfo. pWindowInfo[i4].pChildInfo[ProjectInfo.pWindowInfo[i4].NumberOfChildWindows];1974 ProjectInfo.windowInfos.back().pChildInfo=(CHILDINFO *)HeapReAlloc(hHeap,HEAP_ZERO_MEMORY,ProjectInfo.windowInfos.back().pChildInfo,(ProjectInfo.windowInfos.back().NumberOfChildWindows+1)*sizeof(CHILDINFO)); 1975 pChildInfo=&ProjectInfo.windowInfos.back().pChildInfo[ProjectInfo.windowInfos.back().NumberOfChildWindows]; 1972 1976 1973 1977 //ID … … 2015 2019 } 2016 2020 2017 ProjectInfo. pWindowInfo[i4].NumberOfChildWindows++;2021 ProjectInfo.windowInfos.back().NumberOfChildWindows++; 2018 2022 } 2019 2023 … … 2154 2158 return; 2155 2159 } 2156 for(i=0;i<ProjectInfo. NumberOfWindows;i++){2157 if(lstrcmpi(NewWindow.name,ProjectInfo. pWindowInfo[i].name)==0){2160 for(i=0;i<ProjectInfo.windowInfos.size();i++){ 2161 if(lstrcmpi(NewWindow.name,ProjectInfo.windowInfos[i].name)==0){ 2158 2162 //"\"%s\" ウィンドウは既にプロジェクト内に存在します。" 2159 sprintf(temporary,STRING_DUPLICATIONERROR_WINDOW_IN_PROJECT,ProjectInfo. pWindowInfo[i].name);2163 sprintf(temporary,STRING_DUPLICATIONERROR_WINDOW_IN_PROJECT,ProjectInfo.windowInfos[i].name); 2160 2164 MessageBox(hOwner,temporary,STRING_ERROR,MB_OK|MB_ICONEXCLAMATION); 2161 2165 return; 2162 2166 } 2163 if(lstrcmpi(NewWindow.HandleName,ProjectInfo. pWindowInfo[i].HandleName)==0){2167 if(lstrcmpi(NewWindow.HandleName,ProjectInfo.windowInfos[i].HandleName)==0){ 2164 2168 //"\"%s\" ハンドルは既にプロジェクト内に存在します。" 2165 sprintf(temporary,STRING_DUPLICATIONERROR_HANDLE_IN_PROJECT,ProjectInfo. pWindowInfo[i].HandleName);2169 sprintf(temporary,STRING_DUPLICATIONERROR_HANDLE_IN_PROJECT,ProjectInfo.windowInfos[i].HandleName); 2166 2170 MessageBox(hOwner,temporary,STRING_ERROR,MB_OK|MB_ICONEXCLAMATION); 2167 2171 return; 2168 2172 } 2169 if(lstrcmpi(NewWindow.CallBackName,ProjectInfo. pWindowInfo[i].CallBackName)==0){2173 if(lstrcmpi(NewWindow.CallBackName,ProjectInfo.windowInfos[i].CallBackName)==0){ 2170 2174 //"\"%s\" プロシージャは既にプロジェクト内に存在します。" 2171 sprintf(temporary,STRING_DUPLICATIONERROR_PROC_IN_PROJECT,ProjectInfo. pWindowInfo[i].CallBackName);2175 sprintf(temporary,STRING_DUPLICATIONERROR_PROC_IN_PROJECT,ProjectInfo.windowInfos[i].CallBackName); 2172 2176 MessageBox(hOwner,temporary,STRING_ERROR,MB_OK|MB_ICONEXCLAMATION); 2173 2177 return; … … 2175 2179 } 2176 2180 2177 //ProjectInfo. pWindowInfo構造体に追加2178 ProjectInfo. pWindowInfo=(WINDOW_INFO *)HeapReAlloc(hHeap,0,ProjectInfo.pWindowInfo,(ProjectInfo.NumberOfWindows+1)*sizeof(WINDOW_INFO));2181 //ProjectInfo.windowInfos構造体コレクションに追加 2182 ProjectInfo.windowInfos.push_back( WINDOW_INFO() ); 2179 2183 2180 2184 2181 2185 /////////////////////////////////////// 2182 //ProjectInfo. pWindowInfo構造体を設定2186 //ProjectInfo.windowInfos構造体を設定 2183 2187 2184 2188 //ウィンドウ名 2185 ProjectInfo. pWindowInfo[ProjectInfo.NumberOfWindows].name=(char *)HeapAlloc(hHeap,0,lstrlen(NewWindow.name)+1);2186 lstrcpy(ProjectInfo. pWindowInfo[ProjectInfo.NumberOfWindows].name,NewWindow.name);2189 ProjectInfo.windowInfos.back().name=(char *)HeapAlloc(hHeap,0,lstrlen(NewWindow.name)+1); 2190 lstrcpy(ProjectInfo.windowInfos.back().name,NewWindow.name); 2187 2191 2188 2192 //ハンドル名 2189 ProjectInfo. pWindowInfo[ProjectInfo.NumberOfWindows].HandleName=(char *)HeapAlloc(hHeap,0,lstrlen(NewWindow.HandleName)+1);2190 lstrcpy(ProjectInfo. pWindowInfo[ProjectInfo.NumberOfWindows].HandleName,NewWindow.HandleName);2193 ProjectInfo.windowInfos.back().HandleName=(char *)HeapAlloc(hHeap,0,lstrlen(NewWindow.HandleName)+1); 2194 lstrcpy(ProjectInfo.windowInfos.back().HandleName,NewWindow.HandleName); 2191 2195 2192 2196 //位置情報 2193 ProjectInfo. pWindowInfo[ProjectInfo.NumberOfWindows].pos.x=-1;2194 ProjectInfo. pWindowInfo[ProjectInfo.NumberOfWindows].pos.y=-1;2195 ProjectInfo. pWindowInfo[ProjectInfo.NumberOfWindows].size.cx=480;2196 ProjectInfo. pWindowInfo[ProjectInfo.NumberOfWindows].size.cy=360;2197 ProjectInfo.windowInfos.back().pos.x=-1; 2198 ProjectInfo.windowInfos.back().pos.y=-1; 2199 ProjectInfo.windowInfos.back().size.cx=480; 2200 ProjectInfo.windowInfos.back().size.cy=360; 2197 2201 2198 2202 //ウィンドウテキスト 2199 ProjectInfo. pWindowInfo[ProjectInfo.NumberOfWindows].caption=(char *)HeapAlloc(hHeap,0,lstrlen(NewWindow.name)+1);2200 lstrcpy(ProjectInfo. pWindowInfo[ProjectInfo.NumberOfWindows].caption,NewWindow.name);2203 ProjectInfo.windowInfos.back().caption=(char *)HeapAlloc(hHeap,0,lstrlen(NewWindow.name)+1); 2204 lstrcpy(ProjectInfo.windowInfos.back().caption,NewWindow.name); 2201 2205 2202 2206 //スタイル … … 2204 2208 case WNDTYPE_DEFAULT: 2205 2209 //通常ウィンドウ 2206 ProjectInfo. pWindowInfo[ProjectInfo.NumberOfWindows].style=WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_THICKFRAME|WS_MINIMIZEBOX|WS_MAXIMIZEBOX;2210 ProjectInfo.windowInfos.back().style=WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU|WS_THICKFRAME|WS_MINIMIZEBOX|WS_MAXIMIZEBOX; 2207 2211 break; 2208 2212 case WNDTYPE_MODALDLG: 2209 2213 case WNDTYPE_MODELESSDLG: 2210 2214 //ダイアログ テンプレート(最大化、最小化ボタンをなくして、細枠にする) 2211 ProjectInfo. pWindowInfo[ProjectInfo.NumberOfWindows].style=WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU;2215 ProjectInfo.windowInfos.back().style=WS_OVERLAPPED|WS_CAPTION|WS_SYSMENU; 2212 2216 break; 2213 2217 } 2214 2218 2215 2219 //拡張スタイル 2216 ProjectInfo. pWindowInfo[ProjectInfo.NumberOfWindows].ExStyle=0;2220 ProjectInfo.windowInfos.back().ExStyle=0; 2217 2221 2218 2222 //メニュー 2219 ProjectInfo. pWindowInfo[ProjectInfo.NumberOfWindows].MenuID=0;2223 ProjectInfo.windowInfos.back().MenuID=0; 2220 2224 2221 2225 //ID 2222 ProjectInfo. pWindowInfo[ProjectInfo.NumberOfWindows].id=0;2226 ProjectInfo.windowInfos.back().id=0; 2223 2227 2224 2228 //背景色 2225 ProjectInfo. pWindowInfo[ProjectInfo.NumberOfWindows].bgColor=COLOR_3DFACE;2229 ProjectInfo.windowInfos.back().bgColor=COLOR_3DFACE; 2226 2230 2227 2231 //フォント 2228 GetDefaultWindowFont(&ProjectInfo. pWindowInfo[ProjectInfo.NumberOfWindows].LogFont);2232 GetDefaultWindowFont(&ProjectInfo.windowInfos.back().LogFont); 2229 2233 2230 2234 //アイコン 2231 ProjectInfo. pWindowInfo[ProjectInfo.NumberOfWindows].IconResName=0;2235 ProjectInfo.windowInfos.back().IconResName=0; 2232 2236 2233 2237 //クラス名 2234 2238 lstrcpy(temporary,"NORMAL"); 2235 ProjectInfo. pWindowInfo[ProjectInfo.NumberOfWindows].ClassName=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1);2236 lstrcpy(ProjectInfo. pWindowInfo[ProjectInfo.NumberOfWindows].ClassName,temporary);2239 ProjectInfo.windowInfos.back().ClassName=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1); 2240 lstrcpy(ProjectInfo.windowInfos.back().ClassName,temporary); 2237 2241 2238 2242 //コールバック関数名 2239 ProjectInfo. pWindowInfo[ProjectInfo.NumberOfWindows].CallBackName=(char *)HeapAlloc(hHeap,0,lstrlen(NewWindow.CallBackName)+1);2240 lstrcpy(ProjectInfo. pWindowInfo[ProjectInfo.NumberOfWindows].CallBackName,NewWindow.CallBackName);2243 ProjectInfo.windowInfos.back().CallBackName=(char *)HeapAlloc(hHeap,0,lstrlen(NewWindow.CallBackName)+1); 2244 lstrcpy(ProjectInfo.windowInfos.back().CallBackName,NewWindow.CallBackName); 2241 2245 2242 2246 //タイプ識別 2243 ProjectInfo. pWindowInfo[ProjectInfo.NumberOfWindows].type=NewWindow.type;2247 ProjectInfo.windowInfos.back().type=NewWindow.type; 2244 2248 2245 2249 //子ウィンドウ情報 2246 ProjectInfo. pWindowInfo[ProjectInfo.NumberOfWindows].NumberOfChildWindows=0;2247 ProjectInfo. pWindowInfo[ProjectInfo.NumberOfWindows].pChildInfo=(CHILDINFO *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,1);2250 ProjectInfo.windowInfos.back().NumberOfChildWindows=0; 2251 ProjectInfo.windowInfos.back().pChildInfo=(CHILDINFO *)HeapAlloc(hHeap,HEAP_ZERO_MEMORY,1); 2248 2252 2249 2253 2250 2254 //メッセージ処理ファイル名 2251 sprintf(temporary,"%s.ab",ProjectInfo. pWindowInfo[ProjectInfo.NumberOfWindows].name);2252 ProjectInfo. pWindowInfo[ProjectInfo.NumberOfWindows].filepath=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1);2253 lstrcpy(ProjectInfo. pWindowInfo[ProjectInfo.NumberOfWindows].filepath,temporary);2255 sprintf(temporary,"%s.ab",ProjectInfo.windowInfos.back().name); 2256 ProjectInfo.windowInfos.back().filepath=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1); 2257 lstrcpy(ProjectInfo.windowInfos.back().filepath,temporary); 2254 2258 2255 2259 … … 2269 2273 NewWindow.CallBackName); 2270 2274 2271 sprintf(temporary,"%s%s.ab",ProjectInfo.dir,ProjectInfo. pWindowInfo[ProjectInfo.NumberOfWindows].name);2275 sprintf(temporary,"%s%s.ab",ProjectInfo.dir,ProjectInfo.windowInfos.back().name); 2272 2276 2273 2277 //書き込み … … 2288 2292 tv.item.iSelectedImage=2; 2289 2293 tv.hParent=ProjectInfo.hWindowTreeItem; 2290 tv.item.pszText=ProjectInfo.pWindowInfo[ProjectInfo.NumberOfWindows].name; 2291 2292 ProjectInfo.pWindowInfo[ProjectInfo.NumberOfWindows].hTreeItem=TreeView_InsertItem(hMaterialTreeView,&tv); 2293 2294 TreeView_SelectItem(hMaterialTreeView,ProjectInfo.pWindowInfo[ProjectInfo.NumberOfWindows].hTreeItem); 2295 2296 2297 ProjectInfo.NumberOfWindows++; 2294 tv.item.pszText=ProjectInfo.windowInfos.back().name; 2295 2296 ProjectInfo.windowInfos.back().hTreeItem=TreeView_InsertItem(hMaterialTreeView,&tv); 2297 2298 TreeView_SelectItem(hMaterialTreeView,ProjectInfo.windowInfos.back().hTreeItem); 2299 2300 2298 2301 ProjectInfo.ModifyOfMaterial=1; 2299 2302 2300 NewRadWindow(ProjectInfo. NumberOfWindows-1);2303 NewRadWindow(ProjectInfo.windowInfos.size()-1); 2301 2304 } 2302 2305 void Project_Window_Delete(int WndInfoNum){ … … 2306 2309 int i; 2307 2310 2311 WINDOW_INFO *pWindowInfo = &ProjectInfo.windowInfos[WndInfoNum]; 2312 2308 2313 //ウィンドウが開かれている場合は閉じる 2309 2314 for(i=0;i<MAX_WNDNUM;i++){ 2310 if(MdiInfo[i].hwnd&&lstrcmpi( ProjectInfo.pWindowInfo[WndInfoNum].name,MdiInfo[i].path)==0){2315 if(MdiInfo[i].hwnd&&lstrcmpi(pWindowInfo->name,MdiInfo[i].path)==0){ 2311 2316 SendMessage(MdiInfo[i].hwnd,WM_CLOSE,0,0); 2312 2317 break; … … 2315 2320 2316 2321 //ウィンドウ情報のメモリを解放 2317 HeapDefaultFree( ProjectInfo.pWindowInfo[WndInfoNum].name);2318 HeapDefaultFree( ProjectInfo.pWindowInfo[WndInfoNum].filepath);2319 HeapDefaultFree( ProjectInfo.pWindowInfo[WndInfoNum].HandleName);2320 HeapDefaultFree( ProjectInfo.pWindowInfo[WndInfoNum].caption);2321 HeapDefaultFree( ProjectInfo.pWindowInfo[WndInfoNum].ClassName);2322 HeapDefaultFree( ProjectInfo.pWindowInfo[WndInfoNum].CallBackName);2322 HeapDefaultFree(pWindowInfo->name); 2323 HeapDefaultFree(pWindowInfo->filepath); 2324 HeapDefaultFree(pWindowInfo->HandleName); 2325 HeapDefaultFree(pWindowInfo->caption); 2326 HeapDefaultFree(pWindowInfo->ClassName); 2327 HeapDefaultFree(pWindowInfo->CallBackName); 2323 2328 2324 2329 //子ウィンドウのメモリを解放 2325 for(i=0;i< ProjectInfo.pWindowInfo[WndInfoNum].NumberOfChildWindows;i++){2326 HeapDefaultFree( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].IdName);2327 HeapDefaultFree( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[i].caption);2328 } 2329 HeapDefaultFree( ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo);2330 for(i=0;i<pWindowInfo->NumberOfChildWindows;i++){ 2331 HeapDefaultFree(pWindowInfo->pChildInfo[i].IdName); 2332 HeapDefaultFree(pWindowInfo->pChildInfo[i].caption); 2333 } 2334 HeapDefaultFree(pWindowInfo->pChildInfo); 2330 2335 2331 2336 //ツリービューから削除 2332 2337 extern HWND hMaterialTreeView; 2333 TreeView_DeleteItem(hMaterialTreeView,ProjectInfo.pWindowInfo[WndInfoNum].hTreeItem); 2334 2335 //ProjectInfo.pWindowInfo構造体から削除 2336 ProjectInfo.NumberOfWindows--; 2337 for(i=WndInfoNum;i<ProjectInfo.NumberOfWindows;i++) ProjectInfo.pWindowInfo[i]=ProjectInfo.pWindowInfo[i+1]; 2338 if(ProjectInfo.NumberOfWindows==0) ProjectInfo.pWindowInfo=(WINDOW_INFO *)HeapReAlloc(hHeap,0,ProjectInfo.pWindowInfo,1); 2339 else ProjectInfo.pWindowInfo=(WINDOW_INFO *)HeapReAlloc(hHeap,0,ProjectInfo.pWindowInfo,ProjectInfo.NumberOfWindows*sizeof(WINDOW_INFO)); 2338 TreeView_DeleteItem(hMaterialTreeView,pWindowInfo->hTreeItem); 2339 2340 //ProjectInfo.windowInfos構造体から削除 2341 std::vector<WINDOW_INFO>::iterator it = ProjectInfo.windowInfos.begin(); 2342 for( int i=0; i!=WndInfoNum ;i++, it++ ) 2343 { 2344 } 2345 ProjectInfo.windowInfos.erase( it ); 2340 2346 2341 2347 ProjectInfo.ModifyOfMaterial=1; -
trunk/ab5.0/abdev/abdev/abdev.cpp
r503 r609 256 256 //////////////// 257 257 258 int WndInfoNum; 259 WndInfoNum=GetWndInfoNum(MdiInfo[WndNum].path); 258 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[WndNum].path); 260 259 if(RadInfo.NowDragging>=FRAME_CHANGEPOS_START&&RadInfo.NowDragging<=FRAME_CHANGEPOS_END){ 261 260 sprintf(temporary,"pos %d, %d", … … 270 269 else if(MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){ 271 270 SendMessage(hStatusBar,SB_SETTEXT,1,(LPARAM)"pos 0, 0"); 272 sprintf(temporary,"size %d * %d", ProjectInfo.pWindowInfo[WndInfoNum].size.cx,ProjectInfo.pWindowInfo[WndInfoNum].size.cy);271 sprintf(temporary,"size %d * %d",pWindowInfo->size.cx,pWindowInfo->size.cy); 273 272 SendMessage(hStatusBar,SB_SETTEXT,2,(LPARAM)temporary); 274 273 } 275 274 else{ 276 275 sprintf(temporary,"pos %d, %d", 277 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].pos.x,278 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].pos.y);276 pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].pos.x, 277 pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].pos.y); 279 278 SendMessage(hStatusBar,SB_SETTEXT,1,(LPARAM)temporary); 280 279 sprintf(temporary,"size %d * %d", 281 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].size.cx,282 ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].size.cy);280 pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].size.cx, 281 pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].size.cy); 283 282 SendMessage(hStatusBar,SB_SETTEXT,2,(LPARAM)temporary); 284 283 } -
trunk/ab5.0/abdev/abdev/abdev.h
r481 r609 74 74 HWND hProjectView; //プロジェクト ビュー 75 75 HWND hProjectView_ToolWindow; 76 ActiveBasic::IDE::ProjectManager projectManager; 76 77 77 78 //コンパイラビュー情報 -
trunk/ab5.0/abdev/abdev/include/MainFrame.h
r503 r609 1 1 #pragma once 2 3 //サイズ変更枠の太さ 4 #define LEVER_THICK 5 5 6 #define WM_SHOWERROR WM_USER+70 //エラー表示メッセージ 7 8 #define WM_SETCOMPILEVIEW WM_USER+71 //コンパイラウィンドウが表示されたとき 9 #define WM_DESTROYCOMPILEVIEW WM_USER+72 //コンパイラウィンドウが破棄されたとき 10 11 #define WM_SETDEBUGGERBASE WM_USER+73 //デバッガベースウィンドウが表示されたとき 12 #define WM_DESTROYDEBUGGERBASE WM_USER+74 //デバッガベースウィンドウが破棄されたとき 13 14 #define WM_SETDEBUGGERVIEW WM_USER+75 //デバッガウィンドウが表示されたとき 15 #define WM_DESTROYDEBUGGERVIEW WM_USER+76 //デバッガウィンドウが表示されたとき 2 16 3 17 namespace ActiveBasic{ namespace IDE{ -
trunk/ab5.0/abdev/abdev/include/ProjectManager.h
r608 r609 3 3 namespace ActiveBasic{ namespace IDE{ 4 4 5 class Project 6 { 7 std::string name; 8 ActiveBasic::Common::TargetModuleType::EnumType moduleType; 9 public: 10 void Open( const std::string &projectFileName ); 11 void Close() const; 12 void Save() const; 13 }; 14 typedef std::vector<Project *> Projects; 5 15 6 16 class ProjectManager 7 17 { 18 Projects projects; 19 Project *pCurrentProject; 20 public: 21 ProjectManager() 22 : pCurrentProject( NULL ) 23 { 24 } 25 ~ProjectManager() 26 { 27 if( IsOpenedProject() ) 28 { 29 throw; 30 } 31 } 32 const Project &GetCurrentProject() const 33 { 34 return *pCurrentProject; 35 } 36 Project &GetCurrentProject() 37 { 38 return *pCurrentProject; 39 } 40 41 bool IsOpenedProject() const 42 { 43 return !projects.empty(); 44 } 45 void OpenProject( const std::string &projectFileName ); 46 void CloseProject( const std::string &projectName ); 47 48 void CloseAllProjects(); 8 49 }; 9 50 -
trunk/ab5.0/abdev/abdev/src/MainFrame.cpp
r608 r609 628 628 } 629 629 else if(MdiInfo[WndNum].DocType==WNDTYPE_RAD){ 630 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[WndNum].path); 630 631 int indexOfWndInfo = GetWndInfoNum(MdiInfo[WndNum].path); 631 632 632 633 //クリップボードに格納するためのデータを用意する 633 ProjectInfo.pWindowInfo[indexOfWndInfo].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].pos.x-=17;634 ProjectInfo.pWindowInfo[indexOfWndInfo].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].pos.y-=10;634 pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].pos.x-=17; 635 pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].pos.y-=10; 635 636 HGLOBAL hGlobal=Rad_GetChildInfoClipboardData(WndNum,indexOfWndInfo); 636 ProjectInfo.pWindowInfo[indexOfWndInfo].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].pos.x+=17;637 ProjectInfo.pWindowInfo[indexOfWndInfo].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].pos.y+=10;637 pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].pos.x+=17; 638 pWindowInfo->pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].pos.y+=10; 638 639 639 640 OpenClipboard(); … … 806 807 } 807 808 else if(MdiInfo[WndNum].DocType==WNDTYPE_RAD){ 808 int i2=GetWndInfoNum(MdiInfo[WndNum].path);809 for(int i3=0;i3< ProjectInfo.pWindowInfo[i2].NumberOfChildWindows;i3++){809 WINDOW_INFO *pWindowInfo = GetWndInfo(MdiInfo[WndNum].path); 810 for(int i3=0;i3<pWindowInfo->NumberOfChildWindows;i3++){ 810 811 MdiInfo[WndNum].MdiRadInfo->SelectingItem[i3]=i3; 811 812 } 812 DrawRadWindow(WndNum, &ProjectInfo.pWindowInfo[i2]);813 DrawRadWindow(WndNum,pWindowInfo); 813 814 } 814 815 } -
trunk/ab5.0/abdev/abdev/stdafx.h
r608 r609 43 43 #endif 44 44 45 #include "Common.h"46 47 45 #include <WindowComponents/BaseWindow.h> 48 46 #include <WindowComponents/MdiChild.h> … … 55 53 #include <Program.h> 56 54 #include <ProjectManager.h> 55 56 #include "Common.h"
Note:
See TracChangeset
for help on using the changeset viewer.