[3] | 1 | #include "Common.h"
|
---|
| 2 |
|
---|
| 3 | #if defined(JPN)
|
---|
| 4 | //日本語
|
---|
| 5 | #include "rad_msg_jpn.h"
|
---|
| 6 | #else
|
---|
| 7 | //英語
|
---|
| 8 | #include "rad_msg_eng.h"
|
---|
| 9 | #endif
|
---|
| 10 |
|
---|
| 11 | void ShowControlAdvice(int Control){
|
---|
| 12 | if(Control==IDC_TOOL_MOUSE) SetStatusText("");
|
---|
| 13 |
|
---|
| 14 | #if defined(JPN)
|
---|
| 15 | //日本語
|
---|
| 16 | else if(Control==IDC_TOOL_BUTTON) SetStatusText("[ボタン] クリックすることができるボタンです。");
|
---|
| 17 | else if(Control==IDC_TOOL_CHECKBOX) SetStatusText("[チェック ボックス] ON/OFFの設定ができるボタンです。");
|
---|
| 18 | else if(Control==IDC_TOOL_COMBOBOX) SetStatusText("[コンボ ボックス] ドロップダウン リストの中から項目を選択することができます。");
|
---|
| 19 | else if(Control==IDC_TOOL_EDIT) SetStatusText("[エディット ボックス] ユーザーが文字列の編集操作を行うことができます。");
|
---|
| 20 | else if(Control==IDC_TOOL_GROUPBOX) SetStatusText("[グループ ボックス] 複数のコントロールを囲むことができます。");
|
---|
| 21 | else if(Control==IDC_TOOL_HSCROLLBAR) SetStatusText("[水平スクロールバー] 現在位置を表示、設定します。");
|
---|
| 22 | else if(Control==IDC_TOOL_IMAGEBOX) SetStatusText("[イメージ ボックス] 四角形やビットマップ、アイコンを表示します。");
|
---|
| 23 | else if(Control==IDC_TOOL_LISTBOX) SetStatusText("[リスト ボックス] 複数の項目を表示、選択できるリストです。");
|
---|
| 24 | else if(Control==IDC_TOOL_LISTVIEW) SetStatusText("[リスト ビュー] リスト ボックス内にアイコンやテキストを並べて表示するビューです。");
|
---|
| 25 | else if(Control==IDC_TOOL_PROGRESSBAR) SetStatusText("[プログレス バー] 進行状況を表示するバー。");
|
---|
| 26 | else if(Control==IDC_TOOL_RADIOBUTTON) SetStatusText("[ラジオ ボタン] 複数の項目から1つを選択するボタンです。");
|
---|
| 27 | else if(Control==IDC_TOOL_STATIC) SetStatusText("[スタティック テキスト] テキストを表示します。");
|
---|
| 28 | else if(Control==IDC_TOOL_TRACKBAR) SetStatusText("[トラック バー] 目盛が付いた移動バー。");
|
---|
| 29 | else if(Control==IDC_TOOL_TREEVIEW) SetStatusText("[ツリー ビュー] リストを階層構造で表示します。");
|
---|
| 30 | else if(Control==IDC_TOOL_UPDOWN) SetStatusText("[アップ ダウン コントロール] 上下のボタンで数値を設定します。");
|
---|
| 31 | else if(Control==IDC_TOOL_VSCROLLBAR) SetStatusText("[垂直スクロールバー] 現在位置を表示、設定します。");
|
---|
| 32 | #else
|
---|
| 33 | //英語
|
---|
| 34 | else if(Control==IDC_TOOL_BUTTON) SetStatusText("[Button] The button which can be clicked");
|
---|
| 35 | else if(Control==IDC_TOOL_CHECKBOX) SetStatusText("[CheckBox] The button which can switch on/off");
|
---|
| 36 | else if(Control==IDC_TOOL_COMBOBOX) SetStatusText("[ComboBox] Choose an item from drop down lists");
|
---|
| 37 | else if(Control==IDC_TOOL_EDIT) SetStatusText("[EditBox] A user can edit a character sequence");
|
---|
| 38 | else if(Control==IDC_TOOL_GROUPBOX) SetStatusText("[GroupBox] Two or more control can be packed");
|
---|
| 39 | else if(Control==IDC_TOOL_HSCROLLBAR) SetStatusText("[Horizontal Scrollbar] The present position is displayed and setup");
|
---|
| 40 | else if(Control==IDC_TOOL_IMAGEBOX) SetStatusText("[ImageBox] A rectangle, a bitmap, and an icon are displayed.");
|
---|
| 41 | else if(Control==IDC_TOOL_LISTBOX) SetStatusText("[ListBox] The list which can display and choose two or more items");
|
---|
| 42 | else if(Control==IDC_TOOL_LISTVIEW) SetStatusText("[ListView] The view which displays an icon and a text in a list box");
|
---|
| 43 | else if(Control==IDC_TOOL_PROGRESSBAR) SetStatusText("[Progressbar] The bar which displays an advance situation");
|
---|
| 44 | else if(Control==IDC_TOOL_RADIOBUTTON) SetStatusText("[RadioButton] The button which chooses one from two or more items");
|
---|
| 45 | else if(Control==IDC_TOOL_STATIC) SetStatusText("[StaticText] Display the text messages");
|
---|
| 46 | else if(Control==IDC_TOOL_TRACKBAR) SetStatusText("[Trackbar] The bar to which the scale was attached");
|
---|
| 47 | else if(Control==IDC_TOOL_TREEVIEW) SetStatusText("[TreeView] Lists are displayed by the layered structure");
|
---|
| 48 | else if(Control==IDC_TOOL_UPDOWN) SetStatusText("[Up/Down Control] A numerical value is set up with a up/down button");
|
---|
| 49 | else if(Control==IDC_TOOL_VSCROLLBAR) SetStatusText("[Vertical Scrollbar] The present position is displayed and setup");
|
---|
| 50 | #endif
|
---|
| 51 | }
|
---|
| 52 |
|
---|
| 53 | char *GetControlName(DWORD id){
|
---|
| 54 | char *pTemp;
|
---|
| 55 | pTemp="";
|
---|
| 56 |
|
---|
| 57 | #if defined(JPN)
|
---|
| 58 | //日本語
|
---|
| 59 | if(id==IDC_TOOL_MOUSE) pTemp="選択";
|
---|
| 60 | else if(id==IDC_TOOL_STATIC) pTemp="スタティック テキスト";
|
---|
| 61 | else if(id==IDC_TOOL_EDIT) pTemp="エディット ボックス";
|
---|
| 62 | else if(id==IDC_TOOL_GROUPBOX) pTemp="グループ ボックス";
|
---|
| 63 | else if(id==IDC_TOOL_COMBOBOX) pTemp="コンボ ボックス";
|
---|
| 64 | else if(id==IDC_TOOL_LISTBOX) pTemp="リスト ボックス";
|
---|
| 65 | else if(id==IDC_TOOL_BUTTON) pTemp="ボタン";
|
---|
| 66 | else if(id==IDC_TOOL_CHECKBOX) pTemp="チェック ボックス";
|
---|
| 67 | else if(id==IDC_TOOL_RADIOBUTTON) pTemp="ラジオ ボタン";
|
---|
| 68 | else if(id==IDC_TOOL_LISTVIEW) pTemp="リスト ビュー";
|
---|
| 69 | else if(id==IDC_TOOL_TREEVIEW) pTemp="ツリー ビュー";
|
---|
| 70 | else if(id==IDC_TOOL_HSCROLLBAR) pTemp="水平スクロール バー";
|
---|
| 71 | else if(id==IDC_TOOL_VSCROLLBAR) pTemp="垂直スクロール バー";
|
---|
| 72 | else if(id==IDC_TOOL_UPDOWN) pTemp="アップ ダウン コントロール";
|
---|
| 73 | else if(id==IDC_TOOL_IMAGEBOX) pTemp="イメージ ボックス";
|
---|
| 74 | else if(id==IDC_TOOL_TRACKBAR) pTemp="トラック バー";
|
---|
| 75 | else if(id==IDC_TOOL_PROGRESSBAR) pTemp="プログレス バー";
|
---|
| 76 | #else
|
---|
| 77 | //英語
|
---|
| 78 | if(id==IDC_TOOL_MOUSE) pTemp="Tool";
|
---|
| 79 | else if(id==IDC_TOOL_STATIC) pTemp="StaticText";
|
---|
| 80 | else if(id==IDC_TOOL_EDIT) pTemp="EditBox";
|
---|
| 81 | else if(id==IDC_TOOL_GROUPBOX) pTemp="GroupBox";
|
---|
| 82 | else if(id==IDC_TOOL_COMBOBOX) pTemp="ComboBox";
|
---|
| 83 | else if(id==IDC_TOOL_LISTBOX) pTemp="ListBox";
|
---|
| 84 | else if(id==IDC_TOOL_BUTTON) pTemp="Button";
|
---|
| 85 | else if(id==IDC_TOOL_CHECKBOX) pTemp="CheckBox";
|
---|
| 86 | else if(id==IDC_TOOL_RADIOBUTTON) pTemp="RadioButton";
|
---|
| 87 | else if(id==IDC_TOOL_LISTVIEW) pTemp="ListView";
|
---|
| 88 | else if(id==IDC_TOOL_TREEVIEW) pTemp="TreeView";
|
---|
| 89 | else if(id==IDC_TOOL_HSCROLLBAR) pTemp="Horizontal Scrollbar";
|
---|
| 90 | else if(id==IDC_TOOL_VSCROLLBAR) pTemp="Vertical Scrollbar";
|
---|
| 91 | else if(id==IDC_TOOL_UPDOWN) pTemp="Up/Down Control";
|
---|
| 92 | else if(id==IDC_TOOL_IMAGEBOX) pTemp="ImageBox";
|
---|
| 93 | else if(id==IDC_TOOL_TRACKBAR) pTemp="Trackbar";
|
---|
| 94 | else if(id==IDC_TOOL_PROGRESSBAR) pTemp="Progressbar";
|
---|
| 95 | #endif
|
---|
| 96 |
|
---|
| 97 | return pTemp;
|
---|
| 98 | }
|
---|
| 99 | BOOL CALLBACK RadToolButtonsProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 100 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 101 | extern PROJECTINFO ProjectInfo;
|
---|
| 102 | int i,i2,WndNum;
|
---|
| 103 | HWND hParent;
|
---|
| 104 | HWND hToolBar;
|
---|
| 105 | RECT rect;
|
---|
| 106 | TBBUTTON CtrlToolBar[]={
|
---|
| 107 | {0,IDC_TOOL_MOUSE,TBSTATE_ENABLED|TBSTATE_WRAP|TBSTATE_CHECKED,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 108 | {1,IDC_TOOL_STATIC,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 109 | {2,IDC_TOOL_EDIT,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 110 | {3,IDC_TOOL_GROUPBOX,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 111 | {BMPNUM_RADTOOLBAR-1,0,TBSTATE_INDETERMINATE,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 112 | {4,IDC_TOOL_COMBOBOX,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 113 | {5,IDC_TOOL_LISTBOX,TBSTATE_ENABLED|TBSTATE_WRAP,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 114 | {6,IDC_TOOL_BUTTON,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 115 | {7,IDC_TOOL_CHECKBOX,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 116 | {8,IDC_TOOL_RADIOBUTTON,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 117 | {BMPNUM_RADTOOLBAR-1,0,TBSTATE_INDETERMINATE,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 118 | {9,IDC_TOOL_LISTVIEW,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 119 | {10,IDC_TOOL_TREEVIEW,TBSTATE_ENABLED|TBSTATE_WRAP,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 120 | {11,IDC_TOOL_HSCROLLBAR,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 121 | {12,IDC_TOOL_VSCROLLBAR,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 122 | {13,IDC_TOOL_UPDOWN,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 123 | {BMPNUM_RADTOOLBAR-1,0,TBSTATE_INDETERMINATE,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 124 | {14,IDC_TOOL_IMAGEBOX,TBSTATE_ENABLED|TBSTATE_WRAP,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 125 | {15,IDC_TOOL_TRACKBAR,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 126 | {16,IDC_TOOL_PROGRESSBAR,TBSTATE_ENABLED,TBSTYLE_CHECKGROUP,0,0},
|
---|
| 127 | };
|
---|
| 128 | TOOLTIPTEXT *pTipText;
|
---|
| 129 |
|
---|
| 130 | switch(message){
|
---|
| 131 | case WM_INITDIALOG:
|
---|
| 132 | hToolBar=CreateToolbarEx(hwnd,WS_CHILD|WS_VISIBLE|CCS_NODIVIDER|TBSTYLE_FLAT|TBSTYLE_TOOLTIPS,
|
---|
| 133 | NULL,
|
---|
| 134 | BMPNUM_RADTOOLBAR, /*ビットマップの個数*/
|
---|
| 135 | hResInst,(unsigned int)MAKEINTRESOURCE(IDR_CONTROL),CtrlToolBar,
|
---|
| 136 | (BMPNUM_RADTOOLBAR-1)+SEPNUM_RADTOOLBAR, /*アイテムの個数*/
|
---|
| 137 | 0,0,16,15,sizeof(TBBUTTON));
|
---|
| 138 |
|
---|
| 139 | //Windows9x系OSでの不具合を防ぐため
|
---|
| 140 | PostMessage(hwnd,WM_USER+120,0,0);
|
---|
| 141 |
|
---|
| 142 | break;
|
---|
| 143 | case WM_USER+120:
|
---|
| 144 | GetClientRect(hwnd,&rect);
|
---|
| 145 | MoveWindow(hwnd,5,22,rect.right,rect.bottom,1);
|
---|
| 146 | MoveWindow(GetWindow(hwnd,GW_CHILD),0,0,rect.right,rect.bottom,1);
|
---|
| 147 | return 1;
|
---|
| 148 | case WM_COMMAND:
|
---|
| 149 | switch(LOWORD(wParam)){
|
---|
| 150 | case IDC_TOOL_MOUSE:
|
---|
| 151 | ShowControlAdvice(LOWORD(wParam));
|
---|
| 152 | hParent=GetParent(GetParent(hwnd));
|
---|
| 153 | BringWindowToTop(hParent);
|
---|
| 154 | i=GetWndNum(hParent);
|
---|
| 155 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 156 | MdiInfo[i].MdiRadInfo->ButtonSelect=IDC_TOOL_MOUSE;
|
---|
| 157 | DrawSelectingRect(MdiInfo[i].MdiRadInfo->hRad,i,i2,IDC_TOOL_MOUSE);
|
---|
| 158 | SetFocus(MdiInfo[i].MdiRadInfo->hRad);
|
---|
| 159 | return 1;
|
---|
| 160 | case IDC_TOOL_BUTTON:
|
---|
| 161 | case IDC_TOOL_CHECKBOX:
|
---|
| 162 | case IDC_TOOL_COMBOBOX:
|
---|
| 163 | case IDC_TOOL_EDIT:
|
---|
| 164 | case IDC_TOOL_GROUPBOX:
|
---|
| 165 | case IDC_TOOL_HSCROLLBAR:
|
---|
| 166 | case IDC_TOOL_IMAGEBOX:
|
---|
| 167 | case IDC_TOOL_LISTBOX:
|
---|
| 168 | case IDC_TOOL_LISTVIEW:
|
---|
| 169 | case IDC_TOOL_PROGRESSBAR:
|
---|
| 170 | case IDC_TOOL_RADIOBUTTON:
|
---|
| 171 | case IDC_TOOL_STATIC:
|
---|
| 172 | case IDC_TOOL_TRACKBAR:
|
---|
| 173 | case IDC_TOOL_TREEVIEW:
|
---|
| 174 | case IDC_TOOL_UPDOWN:
|
---|
| 175 | case IDC_TOOL_VSCROLLBAR:
|
---|
| 176 | ShowControlAdvice(LOWORD(wParam));
|
---|
| 177 | hParent=GetParent(GetParent(hwnd));
|
---|
| 178 | BringWindowToTop(hParent);
|
---|
| 179 | WndNum=GetWndNum(hParent);
|
---|
| 180 | MdiInfo[WndNum].MdiRadInfo->ButtonSelect=LOWORD(wParam);
|
---|
| 181 | InvalidateRect(MdiInfo[WndNum].MdiRadInfo->hRad,NULL,0);
|
---|
| 182 | return 1;
|
---|
| 183 | }
|
---|
| 184 | break;
|
---|
| 185 | case WM_NOTIFY:
|
---|
| 186 | pTipText=(TOOLTIPTEXT *)lParam;
|
---|
| 187 | if(pTipText->hdr.code==TTN_NEEDTEXT){
|
---|
| 188 | //ステータスバーに説明文を表示
|
---|
| 189 | ShowControlAdvice(pTipText->hdr.idFrom);
|
---|
| 190 |
|
---|
| 191 | //コントロール名を取得し、ツールヒントとして表示する
|
---|
| 192 | pTipText->lpszText=GetControlName(pTipText->hdr.idFrom);
|
---|
| 193 | }
|
---|
| 194 | break;
|
---|
| 195 | }
|
---|
| 196 | return 0;
|
---|
| 197 | }
|
---|
| 198 | LRESULT CALLBACK RadToolsWindow(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 199 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 200 | extern PROJECTINFO ProjectInfo;
|
---|
| 201 | extern HFONT hStatusFont;
|
---|
| 202 | int i;
|
---|
| 203 | RECT rect;
|
---|
| 204 | SCROLLINFO ScrollInfo;
|
---|
| 205 | HDC hdc;
|
---|
| 206 | PAINTSTRUCT ps;
|
---|
| 207 | HFONT hOldFont;
|
---|
| 208 | POINT pos;
|
---|
| 209 |
|
---|
| 210 | switch(message){
|
---|
| 211 | case WM_CREATE:
|
---|
| 212 | CreateDialog(hResInst,MAKEINTRESOURCE(IDD_RAD_CTRLBUTTONS),hwnd,(DLGPROC)RadToolButtonsProc);
|
---|
| 213 | return 0;
|
---|
| 214 | case WM_VSCROLL:
|
---|
| 215 | ScrollInfo.cbSize=sizeof(SCROLLINFO);
|
---|
| 216 | ScrollInfo.fMask=SIF_POS|SIF_PAGE|SIF_RANGE;
|
---|
| 217 | GetScrollInfo(hwnd,SB_VERT,&ScrollInfo);
|
---|
| 218 | if(LOWORD(wParam)==SB_LINEUP) i=-20;
|
---|
| 219 | else if(LOWORD(wParam)==SB_LINEDOWN) i=20;
|
---|
| 220 | else if(LOWORD(wParam)==SB_PAGEUP) i=-(signed int)ScrollInfo.nPage;
|
---|
| 221 | else if(LOWORD(wParam)==SB_PAGEDOWN) i=ScrollInfo.nPage;
|
---|
| 222 | else if(LOWORD(wParam)==SB_THUMBTRACK) i=HIWORD(wParam)-ScrollInfo.nPos;
|
---|
| 223 | else i=0;
|
---|
| 224 | GetClientRect(hwnd,&rect);
|
---|
| 225 | i=max(-ScrollInfo.nPos,min(i,ScrollInfo.nMax-rect.bottom-ScrollInfo.nPos));
|
---|
| 226 | if(i!=0){
|
---|
| 227 | ScrollInfo.nPos+=i;
|
---|
| 228 | SetScrollInfo(hwnd,SB_VERT,&ScrollInfo,1);
|
---|
| 229 | ScrollWindow(hwnd,0,-i,NULL,NULL);
|
---|
| 230 | UpdateWindow(hwnd);
|
---|
| 231 | }
|
---|
| 232 | return 0;
|
---|
| 233 | case WM_SIZE:
|
---|
| 234 | GetClientRect(GetWindow(hwnd,GW_CHILD),&rect);
|
---|
| 235 | ScrollInfo.cbSize=sizeof(SCROLLINFO);
|
---|
| 236 | ScrollInfo.fMask=SIF_PAGE|SIF_RANGE|SIF_POS;
|
---|
| 237 |
|
---|
| 238 | //垂直スクロールバーの設定
|
---|
| 239 | GetScrollInfo(hwnd,SB_VERT,&ScrollInfo);
|
---|
| 240 | ScrollInfo.nMin=0;
|
---|
| 241 | ScrollInfo.nMax=rect.bottom;
|
---|
| 242 | ScrollInfo.nPage=HIWORD(lParam);
|
---|
| 243 | SetScrollInfo(hwnd,SB_VERT,&ScrollInfo,1);
|
---|
| 244 |
|
---|
| 245 | i=ScrollInfo.nPos;
|
---|
| 246 | ScrollInfo.fMask=SIF_POS;
|
---|
| 247 | GetScrollInfo(hwnd,SB_VERT,&ScrollInfo);
|
---|
| 248 | if(i>ScrollInfo.nPos){
|
---|
| 249 | ScrollWindow(hwnd,0,i-ScrollInfo.nPos,NULL,NULL);
|
---|
| 250 | UpdateWindow(hwnd);
|
---|
| 251 | }
|
---|
| 252 | return 0;
|
---|
| 253 | case WM_PAINT:
|
---|
| 254 | hdc=BeginPaint(hwnd,&ps);
|
---|
| 255 | hOldFont=(HFONT)SelectObject(hdc,hStatusFont);
|
---|
| 256 | SetBkMode(hdc,TRANSPARENT);
|
---|
| 257 | pos.x=30;
|
---|
| 258 | pos.y=3;
|
---|
| 259 | CursorPos_GlobalToLocal(hwnd,&pos.x,&pos.y);
|
---|
| 260 | #if defined(JPN)
|
---|
| 261 | //日本語
|
---|
| 262 | TextOut(hdc,pos.x,pos.y,"- コントロール -",lstrlen("- コントロール -"));
|
---|
| 263 | #else
|
---|
| 264 | //英語
|
---|
| 265 | TextOut(hdc,pos.x,pos.y,"- Control -",lstrlen("- Control -"));
|
---|
| 266 | #endif
|
---|
| 267 | SelectObject(hdc,hOldFont);
|
---|
| 268 | EndPaint(hwnd,&ps);
|
---|
| 269 | return 0;
|
---|
| 270 | }
|
---|
| 271 | return DefWindowProc(hwnd,message,wParam,lParam);
|
---|
| 272 | }
|
---|
| 273 |
|
---|
| 274 |
|
---|
| 275 | /////////////////////////
|
---|
| 276 | //ウィンドウ プロパティ
|
---|
| 277 |
|
---|
| 278 | void RadProperty_Window_Caption_StylingOrder(HWND hwnd,DWORD *style){
|
---|
| 279 | if((*style&WS_CAPTION)==WS_CAPTION){
|
---|
| 280 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_SYSMENU),1);
|
---|
| 281 | if(!(*style&WS_CHILD)){
|
---|
| 282 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MINIMIZEBOX),1);
|
---|
| 283 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MAXIMIZEBOX),1);
|
---|
| 284 | }
|
---|
| 285 | if(SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_GETCURSEL,0,0)==0){
|
---|
| 286 | if(*style&WS_THICKFRAME) SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_SETCURSEL,2,0);
|
---|
| 287 | else SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_SETCURSEL,1,0);
|
---|
| 288 | }
|
---|
| 289 | }
|
---|
| 290 | else{
|
---|
| 291 | *style&=~(WS_SYSMENU|WS_MINIMIZEBOX|WS_MAXIMIZEBOX);
|
---|
| 292 | SendDlgItemMessage(hwnd,IDC_STYLE_SYSMENU,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 293 | SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZEBOX,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 294 | SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZEBOX,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 295 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_SYSMENU),0);
|
---|
| 296 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MINIMIZEBOX),0);
|
---|
| 297 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MAXIMIZEBOX),0);
|
---|
| 298 | }
|
---|
| 299 | }
|
---|
| 300 | void RadProperty_Window_Border_StylingOrder(HWND hwnd,DWORD *style){
|
---|
| 301 | if(*style&(WS_BORDER|WS_THICKFRAME)){
|
---|
| 302 | if(*style&(WS_POPUP|WS_CHILD)) EnableWindow(GetDlgItem(hwnd,IDC_STYLE_CAPTION),1);
|
---|
| 303 | else{
|
---|
| 304 | *style|=WS_CAPTION;
|
---|
| 305 | SendDlgItemMessage(hwnd,IDC_STYLE_CAPTION,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 306 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_CAPTION),0);
|
---|
| 307 | }
|
---|
| 308 | }
|
---|
| 309 | else{
|
---|
| 310 | *style&=~WS_CAPTION;
|
---|
| 311 | SendDlgItemMessage(hwnd,IDC_STYLE_CAPTION,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 312 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_CAPTION),0);
|
---|
| 313 | }
|
---|
| 314 | RadProperty_Window_Caption_StylingOrder(hwnd,style);
|
---|
| 315 | }
|
---|
| 316 | void RadProperty_Window_Window_StylingOrder(HWND hwnd,DWORD *style){
|
---|
| 317 | if(*style&WS_POPUP){
|
---|
| 318 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_CAPTION),1);
|
---|
| 319 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MINIMIZEBOX),1);
|
---|
| 320 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MAXIMIZEBOX),1);
|
---|
| 321 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MINIMIZE),1);
|
---|
| 322 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MAXIMIZE),1);
|
---|
| 323 | }
|
---|
| 324 | else if(*style&WS_CHILD){
|
---|
| 325 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_CAPTION),1);
|
---|
| 326 |
|
---|
| 327 | *style&=~(WS_MINIMIZEBOX|WS_MAXIMIZEBOX|WS_MINIMIZE|WS_MAXIMIZE);
|
---|
| 328 | SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZEBOX,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 329 | SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZEBOX,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 330 | SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZE,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 331 | SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZE,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 332 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MINIMIZEBOX),0);
|
---|
| 333 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MAXIMIZEBOX),0);
|
---|
| 334 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MINIMIZE),0);
|
---|
| 335 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MAXIMIZE),0);
|
---|
| 336 | }
|
---|
| 337 | else{
|
---|
| 338 | if(*style&WS_BORDER){
|
---|
| 339 | *style|=WS_CAPTION;
|
---|
| 340 | SendDlgItemMessage(hwnd,IDC_STYLE_CAPTION,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 341 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_CAPTION),0);
|
---|
| 342 |
|
---|
| 343 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MINIMIZEBOX),1);
|
---|
| 344 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MAXIMIZEBOX),1);
|
---|
| 345 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MINIMIZE),1);
|
---|
| 346 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_MAXIMIZE),1);
|
---|
| 347 | }
|
---|
| 348 | }
|
---|
| 349 | RadProperty_Window_Border_StylingOrder(hwnd,style);
|
---|
| 350 | }
|
---|
| 351 | BOOL CALLBACK DlgRadProperty_Window_Rename(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 352 | extern HANDLE hHeap;
|
---|
| 353 | extern HWND hClient,hOwner;
|
---|
| 354 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 355 | extern PROJECTINFO ProjectInfo;
|
---|
| 356 | int i,i2,i3;
|
---|
| 357 | char temporary[MAX_PATH],temp2[MAX_PATH];
|
---|
| 358 | switch(message){
|
---|
| 359 | case WM_INITDIALOG:
|
---|
| 360 | SetPosCenter(hwnd);
|
---|
| 361 | i=GetWndNum(GetWindow(hClient,GW_CHILD));
|
---|
| 362 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 363 | sprintf(temporary,"h%s",ProjectInfo.pWindowInfo[i2].name);
|
---|
| 364 | sprintf(temp2,"%sProc",ProjectInfo.pWindowInfo[i2].name);
|
---|
| 365 | if(lstrcmp(temporary,ProjectInfo.pWindowInfo[i2].HandleName)==0&&
|
---|
| 366 | lstrcmp(temp2,ProjectInfo.pWindowInfo[i2].CallBackName)==0){
|
---|
| 367 | SendDlgItemMessage(hwnd,IDC_AUTOSET,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 368 | SendMessage(hwnd,WM_COMMAND,IDC_AUTOSET,0);
|
---|
| 369 | }
|
---|
| 370 | SetDlgItemText(hwnd,IDC_WINDOWNAME,ProjectInfo.pWindowInfo[i2].name);
|
---|
| 371 | SetDlgItemText(hwnd,IDC_WINDOWHANDLE,ProjectInfo.pWindowInfo[i2].HandleName);
|
---|
| 372 | SetDlgItemText(hwnd,IDC_WINDOWPROC,ProjectInfo.pWindowInfo[i2].CallBackName);
|
---|
| 373 | break;
|
---|
| 374 | case WM_COMMAND:
|
---|
| 375 | switch(LOWORD(wParam)){
|
---|
| 376 | case IDOK:
|
---|
| 377 | if(GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWNAME))==0){
|
---|
| 378 | //MsgBox "ウィンドウ識別名を入力して下さい。"
|
---|
| 379 | MessageBox(hOwner,STRING_WINDOW_RENAME_MUST_WINDOWNAME,APPLICATION_NAME,MB_OK|MB_ICONEXCLAMATION);
|
---|
| 380 | break;
|
---|
| 381 | }
|
---|
| 382 | if(GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWHANDLE))==0){
|
---|
| 383 | //MsgBox "ハンドル名を入力して下さい。"
|
---|
| 384 | MessageBox(hOwner,STRING_WINDOW_RENAME_MUST_HANDLENAME,APPLICATION_NAME,MB_OK|MB_ICONEXCLAMATION);
|
---|
| 385 | break;
|
---|
| 386 | }
|
---|
| 387 | if(GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWPROC))==0){
|
---|
| 388 | //MsgBox "プロシージャ名を入力して下さい。"
|
---|
| 389 | MessageBox(hOwner,STRING_WINDOW_RENAME_MUST_PROCEDURENAME,APPLICATION_NAME,MB_OK|MB_ICONEXCLAMATION);
|
---|
| 390 | break;
|
---|
| 391 | }
|
---|
| 392 |
|
---|
| 393 | i=GetWndNum(GetWindow(hClient,GW_CHILD));
|
---|
| 394 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 395 |
|
---|
| 396 | RAD_UNDOSTATE_NAME names,NoticeNames;
|
---|
| 397 | i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWNAME))+1;
|
---|
| 398 | names.name=(char *)HeapAlloc(hHeap,0,i3);
|
---|
| 399 | GetDlgItemText(hwnd,IDC_WINDOWNAME,names.name,i3);
|
---|
| 400 |
|
---|
| 401 | i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWHANDLE))+1;
|
---|
| 402 | names.HandleName=(char *)HeapAlloc(hHeap,0,i3);
|
---|
| 403 | GetDlgItemText(hwnd,IDC_WINDOWHANDLE,names.HandleName,i3);
|
---|
| 404 |
|
---|
| 405 | i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_WINDOWPROC))+1;
|
---|
| 406 | names.CallBackName=(char *)HeapAlloc(hHeap,0,i3);
|
---|
| 407 | GetDlgItemText(hwnd,IDC_WINDOWPROC,names.CallBackName,i3);
|
---|
| 408 |
|
---|
| 409 | if(lstrcmp(names.name,ProjectInfo.pWindowInfo[i2].name)==0&&
|
---|
| 410 | lstrcmp(names.HandleName,ProjectInfo.pWindowInfo[i2].HandleName)==0&&
|
---|
| 411 | lstrcmp(names.CallBackName,ProjectInfo.pWindowInfo[i2].CallBackName)==0){
|
---|
| 412 | HeapDefaultFree(names.name);
|
---|
| 413 | HeapDefaultFree(names.HandleName);
|
---|
| 414 | HeapDefaultFree(names.CallBackName);
|
---|
| 415 | SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
|
---|
| 416 | return 1;
|
---|
| 417 | }
|
---|
| 418 |
|
---|
| 419 | //MsgBox "これらのウィンドウ識別名を変更すると、ソースコード内の識別子は手動で変換する必要があります。変更しますか?"
|
---|
| 420 | if(IDCANCEL==MessageBox(hwnd,STRING_WINDOW_RENAME_CHECK,APPLICATION_NAME,MB_OKCANCEL|MB_ICONEXCLAMATION)) return 1;
|
---|
| 421 |
|
---|
| 422 | //変更情報を更新
|
---|
| 423 | NoticeNames.name=ProjectInfo.pWindowInfo[i2].name;
|
---|
| 424 | NoticeNames.HandleName=ProjectInfo.pWindowInfo[i2].HandleName;
|
---|
| 425 | NoticeNames.CallBackName=ProjectInfo.pWindowInfo[i2].CallBackName;
|
---|
| 426 | Rad_NoticeChanging(i,RAD_UNDO_NAME,SELECT_WINDOW,(DWORD)&NoticeNames);
|
---|
| 427 |
|
---|
| 428 | HeapDefaultFree(ProjectInfo.pWindowInfo[i2].name);
|
---|
| 429 | ProjectInfo.pWindowInfo[i2].name=names.name;
|
---|
| 430 | GlobalFree(MdiInfo[i].path);
|
---|
| 431 | MdiInfo[i].path=(char *)GlobalAlloc(GMEM_FIXED,lstrlen(names.name));
|
---|
| 432 | lstrcpy(MdiInfo[i].path,names.name);
|
---|
| 433 |
|
---|
| 434 | HeapDefaultFree(ProjectInfo.pWindowInfo[i2].HandleName);
|
---|
| 435 | ProjectInfo.pWindowInfo[i2].HandleName=names.HandleName;
|
---|
| 436 |
|
---|
| 437 | HeapDefaultFree(ProjectInfo.pWindowInfo[i2].CallBackName);
|
---|
| 438 | ProjectInfo.pWindowInfo[i2].CallBackName=names.CallBackName;
|
---|
| 439 |
|
---|
| 440 | EndDialog(hwnd,1);
|
---|
| 441 | return 1;
|
---|
| 442 | case IDCANCEL:
|
---|
| 443 | EndDialog(hwnd,0);
|
---|
| 444 | return 1;
|
---|
| 445 | case IDC_WINDOWNAME:
|
---|
| 446 | if(HIWORD(wParam)==EN_CHANGE) SendMessage(hwnd,WM_COMMAND,IDC_AUTOSET,0);
|
---|
| 447 | return 1;
|
---|
| 448 | case IDC_AUTOSET:
|
---|
| 449 | if(SendDlgItemMessage(hwnd,IDC_AUTOSET,BM_GETCHECK,0,0)){
|
---|
| 450 | SendDlgItemMessage(hwnd,IDC_WINDOWHANDLE,EM_SETREADONLY,1,0);
|
---|
| 451 | SendDlgItemMessage(hwnd,IDC_WINDOWPROC,EM_SETREADONLY,1,0);
|
---|
| 452 | GetDlgItemText(hwnd,IDC_WINDOWNAME,temporary,MAX_PATH);
|
---|
| 453 | if(temporary[0]){
|
---|
| 454 | sprintf(temp2,"h%s",temporary);
|
---|
| 455 | SetDlgItemText(hwnd,IDC_WINDOWHANDLE,temp2);
|
---|
| 456 | sprintf(temp2,"%sProc",temporary);
|
---|
| 457 | SetDlgItemText(hwnd,IDC_WINDOWPROC,temp2);
|
---|
| 458 | }
|
---|
| 459 | else{
|
---|
| 460 | SetDlgItemText(hwnd,IDC_WINDOWHANDLE,"");
|
---|
| 461 | SetDlgItemText(hwnd,IDC_WINDOWPROC,"");
|
---|
| 462 | }
|
---|
| 463 | }
|
---|
| 464 | else{
|
---|
| 465 | SendDlgItemMessage(hwnd,IDC_WINDOWHANDLE,EM_SETREADONLY,0,0);
|
---|
| 466 | SendDlgItemMessage(hwnd,IDC_WINDOWPROC,EM_SETREADONLY,0,0);
|
---|
| 467 | }
|
---|
| 468 | return 1;
|
---|
| 469 | }
|
---|
| 470 | break;
|
---|
| 471 | }
|
---|
| 472 | return 0;
|
---|
| 473 | }
|
---|
| 474 | BOOL CALLBACK DlgRadProperty_Window_ExStyle(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 475 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 476 | extern PROJECTINFO ProjectInfo;
|
---|
| 477 | int i,i2;
|
---|
| 478 |
|
---|
| 479 | switch(message){
|
---|
| 480 | case WM_INITDIALOG:
|
---|
| 481 | SetPosCenter(hwnd);
|
---|
| 482 | i=GetWndNum(GetWindow(hClient,GW_CHILD));
|
---|
| 483 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 484 | if(ProjectInfo.pWindowInfo[i2].ExStyle&WS_EX_TOPMOST) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOPMOST,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 485 | if(ProjectInfo.pWindowInfo[i2].ExStyle&WS_EX_ACCEPTFILES) SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 486 | if(ProjectInfo.pWindowInfo[i2].ExStyle&WS_EX_TRANSPARENT) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 487 | if(ProjectInfo.pWindowInfo[i2].ExStyle&WS_EX_TOOLWINDOW) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOOLWINDOW,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 488 | if(ProjectInfo.pWindowInfo[i2].ExStyle&WS_EX_CLIENTEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 489 | if(ProjectInfo.pWindowInfo[i2].ExStyle&WS_EX_STATICEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 490 | if(ProjectInfo.pWindowInfo[i2].ExStyle&WS_EX_NOPARENTNOTIFY) SendDlgItemMessage(hwnd,IDC_EXSTYLE_NOPARENTNOTIFY,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 491 | if(ProjectInfo.pWindowInfo[i2].ExStyle&WS_EX_CONTEXTHELP) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTEXTHELP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 492 | if(ProjectInfo.pWindowInfo[i2].ExStyle&WS_EX_CONTROLPARENT) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTROLPARENT,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 493 | break;
|
---|
| 494 | case WM_COMMAND:
|
---|
| 495 | switch(LOWORD(wParam)){
|
---|
| 496 | case IDOK:
|
---|
| 497 | i=GetWndNum(GetWindow(hClient,GW_CHILD));
|
---|
| 498 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 499 |
|
---|
| 500 | DWORD style;
|
---|
| 501 | style=0;
|
---|
| 502 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOPMOST,BM_GETCHECK,0,0))
|
---|
| 503 | style|=WS_EX_TOPMOST;
|
---|
| 504 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_GETCHECK,0,0))
|
---|
| 505 | style|=WS_EX_ACCEPTFILES;
|
---|
| 506 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_GETCHECK,0,0))
|
---|
| 507 | style|=WS_EX_TRANSPARENT;
|
---|
| 508 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TOOLWINDOW,BM_GETCHECK,0,0))
|
---|
| 509 | style|=WS_EX_TOOLWINDOW;
|
---|
| 510 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_GETCHECK,0,0))
|
---|
| 511 | style|=WS_EX_CLIENTEDGE;
|
---|
| 512 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_GETCHECK,0,0))
|
---|
| 513 | style|=WS_EX_STATICEDGE;
|
---|
| 514 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_NOPARENTNOTIFY,BM_GETCHECK,0,0))
|
---|
| 515 | style|=WS_EX_NOPARENTNOTIFY;
|
---|
| 516 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTEXTHELP,BM_GETCHECK,0,0))
|
---|
| 517 | style|=WS_EX_CONTEXTHELP;
|
---|
| 518 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CONTROLPARENT,BM_GETCHECK,0,0))
|
---|
| 519 | style|=WS_EX_CONTROLPARENT;
|
---|
| 520 |
|
---|
| 521 | if(style==ProjectInfo.pWindowInfo[i2].ExStyle){
|
---|
| 522 | SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
|
---|
| 523 | return 1;
|
---|
| 524 | }
|
---|
| 525 |
|
---|
| 526 | //変更情報
|
---|
| 527 | Rad_NoticeChanging(i,RAD_UNDO_EXSTYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].ExStyle);
|
---|
| 528 |
|
---|
| 529 | ProjectInfo.pWindowInfo[i2].ExStyle=style;
|
---|
| 530 | EndDialog(hwnd,1);
|
---|
| 531 | return 1;
|
---|
| 532 | case IDCANCEL:
|
---|
| 533 | EndDialog(hwnd,0);
|
---|
| 534 | return 1;
|
---|
| 535 | }
|
---|
| 536 | break;
|
---|
| 537 | }
|
---|
| 538 | return 0;
|
---|
| 539 | }
|
---|
| 540 | BOOL CALLBACK RadProperty_WindowProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 541 | extern HANDLE hHeap;
|
---|
| 542 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 543 | extern PROJECTINFO ProjectInfo;
|
---|
| 544 | int i,i2,i3,i4;
|
---|
| 545 | static BOOL bInitial;
|
---|
| 546 |
|
---|
| 547 | switch(message){
|
---|
| 548 | case WM_INITDIALOG:
|
---|
| 549 | bInitial=1;
|
---|
| 550 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 551 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 552 |
|
---|
| 553 | SetDlgItemText(hwnd,IDC_WINDOWNAME,ProjectInfo.pWindowInfo[i2].name);
|
---|
| 554 | SetDlgItemText(hwnd,IDC_HANDLE,ProjectInfo.pWindowInfo[i2].HandleName);
|
---|
| 555 | SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[i2].caption);
|
---|
| 556 |
|
---|
| 557 | //"3D FACE(標準)"
|
---|
| 558 | SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_BGCOLOR1);
|
---|
| 559 | //"色指定"
|
---|
| 560 | SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_BGCOLOR2);
|
---|
| 561 |
|
---|
| 562 | for(i3=0;i3<ProjectInfo.res.NumberOfBitmapRes;i3++)
|
---|
| 563 | SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_ADDSTRING,0,(long)ProjectInfo.res.pBitmapResInfo[i3].IdName);
|
---|
| 564 | if(ProjectInfo.pWindowInfo[i2].type==WNDTYPE_MODALDLG||
|
---|
| 565 | ProjectInfo.pWindowInfo[i2].type==WNDTYPE_MODELESSDLG){
|
---|
| 566 | SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,0,0);
|
---|
| 567 | EnableWindow(GetDlgItem(hwnd,IDC_BGCOLOR),0);
|
---|
| 568 | }
|
---|
| 569 | else{
|
---|
| 570 | if(ProjectInfo.pWindowInfo[i2].bgColor==COLOR_3DFACE){
|
---|
| 571 | //3DFACE
|
---|
| 572 | SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,0,0);
|
---|
| 573 | }
|
---|
| 574 | else if(ProjectInfo.pWindowInfo[i2].bgColor<=0){
|
---|
| 575 | //色指定
|
---|
| 576 | SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,1,0);
|
---|
| 577 | }
|
---|
| 578 | else if(ProjectInfo.pWindowInfo[i2].bgColor>=0x1000){
|
---|
| 579 | //ビットマップ指定
|
---|
| 580 | SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,2+ProjectInfo.pWindowInfo[i2].bgColor-0x1000,0);
|
---|
| 581 | }
|
---|
| 582 | }
|
---|
| 583 |
|
---|
| 584 |
|
---|
| 585 | ////////////
|
---|
| 586 | // メニュー
|
---|
| 587 | ////////////
|
---|
| 588 |
|
---|
| 589 | //"なし"
|
---|
| 590 | SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_ADDSTRING,0,(long)STRING_NONE);
|
---|
| 591 |
|
---|
| 592 | for(i3=0,i4=0;i3<ProjectInfo.NumberOfMenu;i3++){
|
---|
| 593 | if(ProjectInfo.pWindowInfo[i2].MenuID){
|
---|
| 594 | if(lstrcmpi(ProjectInfo.pMenuInfo[i3].IdName,ProjectInfo.pWindowInfo[i2].MenuID)==0)
|
---|
| 595 | i4=i3+1;
|
---|
| 596 | }
|
---|
| 597 | SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_ADDSTRING,0,(long)ProjectInfo.pMenuInfo[i3].IdName);
|
---|
| 598 | }
|
---|
| 599 | if(i4==0&&ProjectInfo.pWindowInfo[i2].MenuID){
|
---|
| 600 | //メニューが存在しない場合、無効にする
|
---|
| 601 | HeapDefaultFree(ProjectInfo.pWindowInfo[i2].MenuID);
|
---|
| 602 | ProjectInfo.pWindowInfo[i2].MenuID=0;
|
---|
| 603 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 604 | }
|
---|
| 605 | SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_SETCURSEL,i4,0);
|
---|
| 606 |
|
---|
| 607 |
|
---|
| 608 | ////////////
|
---|
| 609 | // アイコン
|
---|
| 610 | ////////////
|
---|
| 611 |
|
---|
| 612 | //"Windowsロゴ(標準)"
|
---|
| 613 | SendDlgItemMessage(hwnd,IDC_ICONRES,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_ICONDEFAULT);
|
---|
| 614 |
|
---|
| 615 | for(i3=0,i4=0;i3<ProjectInfo.res.NumberOfIconRes;i3++){
|
---|
| 616 | SendDlgItemMessage(hwnd,IDC_ICONRES,CB_ADDSTRING,0,(long)ProjectInfo.res.pIconResInfo[i3].IdName);
|
---|
| 617 |
|
---|
| 618 | if(lstrcmp(ProjectInfo.pWindowInfo[i2].IconResName,ProjectInfo.res.pIconResInfo[i3].IdName)==0)
|
---|
| 619 | i4=i3+1;
|
---|
| 620 | }
|
---|
| 621 | if(i4==0&&ProjectInfo.pWindowInfo[i2].IconResName){
|
---|
| 622 | //アイコンが存在しない場合、無効にする
|
---|
| 623 | HeapDefaultFree(ProjectInfo.pWindowInfo[i2].IconResName);
|
---|
| 624 | ProjectInfo.pWindowInfo[i2].IconResName=0;
|
---|
| 625 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 626 | }
|
---|
| 627 | SendDlgItemMessage(hwnd,IDC_ICONRES,CB_SETCURSEL,i4,0);
|
---|
| 628 |
|
---|
| 629 |
|
---|
| 630 | ////////////
|
---|
| 631 | // スタイル
|
---|
| 632 | ////////////
|
---|
| 633 |
|
---|
| 634 | //"オーバーラップ"
|
---|
| 635 | SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_OVERLAPPED);
|
---|
| 636 | //"ポップアップ"
|
---|
| 637 | SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_POPUP);
|
---|
| 638 | //"チャイルド"
|
---|
| 639 | SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_CHILD);
|
---|
| 640 |
|
---|
| 641 | if(ProjectInfo.pWindowInfo[i2].style&WS_POPUP) SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_SETCURSEL,1,0);
|
---|
| 642 | else if(ProjectInfo.pWindowInfo[i2].style&WS_CHILD) SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_SETCURSEL,2,0);
|
---|
| 643 | else SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_SETCURSEL,0,0);
|
---|
| 644 |
|
---|
| 645 | //"枠なし"
|
---|
| 646 | SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_FRAME_NONE);
|
---|
| 647 | //"細枠"
|
---|
| 648 | SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_FRAME_THICK);
|
---|
| 649 | //"サイズ変更枠"
|
---|
| 650 | SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_ADDSTRING,0,(long)STRING_WINDOWPROP_STYLE_FRAME_BORDER);
|
---|
| 651 |
|
---|
| 652 | //WS_CAPTION(WS_BORDER含む)を考慮してWS_THICKFRAMEを最初に比較する
|
---|
| 653 | if(ProjectInfo.pWindowInfo[i2].style&WS_THICKFRAME) SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_SETCURSEL,2,0);
|
---|
| 654 | else if(ProjectInfo.pWindowInfo[i2].style&WS_BORDER) SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_SETCURSEL,1,0);
|
---|
| 655 | else SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_SETCURSEL,0,0);
|
---|
| 656 |
|
---|
| 657 | if(ProjectInfo.pWindowInfo[i2].style&WS_CAPTION) SendDlgItemMessage(hwnd,IDC_STYLE_CAPTION,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 658 | if(ProjectInfo.pWindowInfo[i2].style&WS_SYSMENU) SendDlgItemMessage(hwnd,IDC_STYLE_SYSMENU,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 659 | if(ProjectInfo.pWindowInfo[i2].style&WS_MINIMIZEBOX) SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZEBOX,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 660 | if(ProjectInfo.pWindowInfo[i2].style&WS_MAXIMIZEBOX) SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZEBOX,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 661 | if(ProjectInfo.pWindowInfo[i2].style&WS_MINIMIZE) SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 662 | if(ProjectInfo.pWindowInfo[i2].style&WS_MAXIMIZE) SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 663 | if(ProjectInfo.pWindowInfo[i2].style&WS_HSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLLBAR,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 664 | if(ProjectInfo.pWindowInfo[i2].style&WS_VSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLLBAR,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 665 | if(ProjectInfo.pWindowInfo[i2].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 666 | if(ProjectInfo.pWindowInfo[i2].style&WS_CLIPSIBLINGS) SendDlgItemMessage(hwnd,IDC_STYLE_CLIPSIBLINGS,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 667 | if(ProjectInfo.pWindowInfo[i2].style&WS_CLIPCHILDREN) SendDlgItemMessage(hwnd,IDC_STYLE_CLIPCHILDREN,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 668 | if(ProjectInfo.pWindowInfo[i2].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 669 |
|
---|
| 670 | SetDlgItemText(hwnd,IDC_SETFONT,ProjectInfo.pWindowInfo[i2].LogFont.lfFaceName);
|
---|
| 671 |
|
---|
| 672 | RadProperty_Window_Window_StylingOrder(hwnd,&ProjectInfo.pWindowInfo[i2].style);
|
---|
| 673 |
|
---|
| 674 |
|
---|
| 675 | //////////
|
---|
| 676 | //タイプ
|
---|
| 677 | switch(ProjectInfo.pWindowInfo[i2].type){
|
---|
| 678 | case WNDTYPE_DEFAULT:
|
---|
| 679 | SendDlgItemMessage(hwnd,IDC_DEFWINDOW,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 680 | break;
|
---|
| 681 | case WNDTYPE_MODALDLG:
|
---|
| 682 | SendDlgItemMessage(hwnd,IDC_MODALDLG,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 683 | break;
|
---|
| 684 | case WNDTYPE_MODELESSDLG:
|
---|
| 685 | SendDlgItemMessage(hwnd,IDC_MODELESSDLG,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 686 | break;
|
---|
| 687 | }
|
---|
| 688 |
|
---|
| 689 |
|
---|
| 690 | bInitial=0;
|
---|
| 691 | break;
|
---|
| 692 | case WM_COMMAND:
|
---|
| 693 | switch(LOWORD(wParam)){
|
---|
| 694 | case IDC_RENAMEWINDOW:
|
---|
| 695 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_WINDOW_RENAME),hwnd,DlgRadProperty_Window_Rename)) return 1;
|
---|
| 696 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 697 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 698 | SetDlgItemText(hwnd,IDC_WINDOWNAME,ProjectInfo.pWindowInfo[i2].name);
|
---|
| 699 | SetDlgItemText(hwnd,IDC_HANDLE,ProjectInfo.pWindowInfo[i2].HandleName);
|
---|
| 700 | return 1;
|
---|
| 701 | case IDC_RENAMECAPTION:
|
---|
| 702 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_RENAMECAPTION),hwnd,DlgRadProperty_Item_RenameCaption)) return 1;
|
---|
| 703 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 704 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 705 | SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[i2].caption);
|
---|
| 706 | return 1;
|
---|
| 707 | case IDC_SETFONT:
|
---|
| 708 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 709 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 710 | LOGFONT lf;
|
---|
| 711 | lf=ProjectInfo.pWindowInfo[i2].LogFont;
|
---|
| 712 | if(!SetFontDialog(hwnd,&ProjectInfo.pWindowInfo[i2].LogFont,0)) return 1;
|
---|
| 713 |
|
---|
| 714 | //変更情報
|
---|
| 715 | Rad_NoticeChanging(i,RAD_UNDO_FONT,SELECT_WINDOW,(DWORD)&lf);
|
---|
| 716 |
|
---|
| 717 | SetDlgItemText(hwnd,IDC_SETFONT,ProjectInfo.pWindowInfo[i2].LogFont.lfFaceName);
|
---|
| 718 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 719 | return 1;
|
---|
| 720 | case IDC_BGCOLOR:
|
---|
| 721 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 722 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 723 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 724 |
|
---|
| 725 | i3=SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_GETCURSEL,0,0);
|
---|
| 726 | if(i3==0){
|
---|
| 727 | //3DFACE
|
---|
| 728 |
|
---|
| 729 | //変更情報
|
---|
| 730 | Rad_NoticeChanging(i,RAD_UNDO_BGCOLOR,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].bgColor);
|
---|
| 731 |
|
---|
| 732 | ProjectInfo.pWindowInfo[i2].bgColor=COLOR_3DFACE;
|
---|
| 733 | }
|
---|
| 734 | else if(i3==1){
|
---|
| 735 | //色指定
|
---|
| 736 | CHOOSECOLOR cc;
|
---|
| 737 | COLORREF CusColors[16]={
|
---|
| 738 | RGB(255,255,255),
|
---|
| 739 | RGB(0,0,0),
|
---|
| 740 | RGB(128,128,128),
|
---|
| 741 | RGB(192,192,192),
|
---|
| 742 | RGB(128,0,0),
|
---|
| 743 | RGB(255,0,0),
|
---|
| 744 | RGB(128,128,0),
|
---|
| 745 | RGB(255,255,0),
|
---|
| 746 | RGB(0,128,0),
|
---|
| 747 | RGB(0,255,0),
|
---|
| 748 | RGB(0,128,128),
|
---|
| 749 | RGB(0,255,255),
|
---|
| 750 | RGB(0,0,128),
|
---|
| 751 | RGB(0,0,255),
|
---|
| 752 | RGB(128,0,128),
|
---|
| 753 | RGB(255,0,255)};
|
---|
| 754 | cc.lStructSize=sizeof(CHOOSECOLOR);
|
---|
| 755 | cc.hwndOwner=hwnd;
|
---|
| 756 | if(ProjectInfo.pWindowInfo[i2].bgColor<=0)
|
---|
| 757 | cc.rgbResult=-ProjectInfo.pWindowInfo[i2].bgColor;
|
---|
| 758 | else cc.rgbResult=RGB(255,255,255);
|
---|
| 759 | cc.lpCustColors=CusColors;
|
---|
| 760 | cc.Flags=CC_RGBINIT|CC_FULLOPEN;
|
---|
| 761 | if(!ChooseColor(&cc)){
|
---|
| 762 | //キャンセル動作
|
---|
| 763 | if(ProjectInfo.pWindowInfo[i2].bgColor==COLOR_3DFACE){
|
---|
| 764 | //3DFACE
|
---|
| 765 | SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,0,0);
|
---|
| 766 | }
|
---|
| 767 | else if(ProjectInfo.pWindowInfo[i2].bgColor<=0){
|
---|
| 768 | //色指定
|
---|
| 769 | SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,1,0);
|
---|
| 770 | }
|
---|
| 771 | else if(ProjectInfo.pWindowInfo[i2].bgColor>=0x1000){
|
---|
| 772 | //ビットマップ指定
|
---|
| 773 | SendDlgItemMessage(hwnd,IDC_BGCOLOR,CB_SETCURSEL,2+ProjectInfo.pWindowInfo[i2].bgColor-0x1000,0);
|
---|
| 774 | }
|
---|
| 775 | return 1;
|
---|
| 776 | }
|
---|
| 777 |
|
---|
| 778 | //変更情報
|
---|
| 779 | Rad_NoticeChanging(i,RAD_UNDO_BGCOLOR,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].bgColor);
|
---|
| 780 |
|
---|
| 781 | ProjectInfo.pWindowInfo[i2].bgColor=-(int)cc.rgbResult;
|
---|
| 782 | }
|
---|
| 783 | else{
|
---|
| 784 | //ビットマップ
|
---|
| 785 | i3-=2;
|
---|
| 786 |
|
---|
| 787 | //変更情報
|
---|
| 788 | Rad_NoticeChanging(i,RAD_UNDO_BGCOLOR,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].bgColor);
|
---|
| 789 |
|
---|
| 790 | ProjectInfo.pWindowInfo[i2].bgColor=0x1000+i3;
|
---|
| 791 | }
|
---|
| 792 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 793 | return 1;
|
---|
| 794 | }
|
---|
| 795 | break;
|
---|
| 796 | case IDC_WINDOWMENU:
|
---|
| 797 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 798 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 799 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 800 |
|
---|
| 801 | //変更情報
|
---|
| 802 | Rad_NoticeChanging(i,RAD_UNDO_WINDOWMENU,SELECT_WINDOW,(long)ProjectInfo.pWindowInfo[i2].MenuID);
|
---|
| 803 |
|
---|
| 804 | i3=SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_GETCURSEL,0,0);
|
---|
| 805 | if(ProjectInfo.pWindowInfo[i2].MenuID)
|
---|
| 806 | HeapDefaultFree(ProjectInfo.pWindowInfo[i2].MenuID);
|
---|
| 807 | if(i3==0) ProjectInfo.pWindowInfo[i2].MenuID=0;
|
---|
| 808 | else{
|
---|
| 809 | ProjectInfo.pWindowInfo[i2].MenuID=(char *)HeapAlloc(hHeap,0,SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_GETLBTEXTLEN,i3,0)+1);
|
---|
| 810 | SendDlgItemMessage(hwnd,IDC_WINDOWMENU,CB_GETLBTEXT,i3,(long)ProjectInfo.pWindowInfo[i2].MenuID);
|
---|
| 811 | }
|
---|
| 812 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 813 | return 1;
|
---|
| 814 | }
|
---|
| 815 | break;
|
---|
| 816 | case IDC_ICONRES:
|
---|
| 817 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 818 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 819 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 820 |
|
---|
| 821 | //変更情報
|
---|
| 822 | Rad_NoticeChanging(i,RAD_UNDO_ICONRES,SELECT_WINDOW,(long)ProjectInfo.pWindowInfo[i2].IconResName);
|
---|
| 823 |
|
---|
| 824 | i3=SendDlgItemMessage(hwnd,IDC_ICONRES,CB_GETCURSEL,0,0);
|
---|
| 825 | if(ProjectInfo.pWindowInfo[i2].IconResName)
|
---|
| 826 | HeapDefaultFree(ProjectInfo.pWindowInfo[i2].IconResName);
|
---|
| 827 | if(i3==0) ProjectInfo.pWindowInfo[i2].IconResName=0;
|
---|
| 828 | else{
|
---|
| 829 | ProjectInfo.pWindowInfo[i2].IconResName=(char *)HeapAlloc(hHeap,0,SendDlgItemMessage(hwnd,IDC_ICONRES,CB_GETLBTEXTLEN,i3,0)+1);
|
---|
| 830 | SendDlgItemMessage(hwnd,IDC_ICONRES,CB_GETLBTEXT,i3,(long)ProjectInfo.pWindowInfo[i2].IconResName);
|
---|
| 831 | }
|
---|
| 832 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 833 | return 1;
|
---|
| 834 | }
|
---|
| 835 | break;
|
---|
| 836 |
|
---|
| 837 | case IDC_WINDOWSTYLE:
|
---|
| 838 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 839 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 840 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 841 |
|
---|
| 842 | //変更情報
|
---|
| 843 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].style);
|
---|
| 844 |
|
---|
| 845 | i3=SendDlgItemMessage(hwnd,IDC_WINDOWSTYLE,CB_GETCURSEL,0,0);
|
---|
| 846 | ProjectInfo.pWindowInfo[i2].style&=0x3FFFFFFF;
|
---|
| 847 | if(i3==1) ProjectInfo.pWindowInfo[i2].style|=WS_POPUP;
|
---|
| 848 | else if(i3==2) ProjectInfo.pWindowInfo[i2].style|=WS_CHILD;
|
---|
| 849 | RadProperty_Window_Window_StylingOrder(hwnd,&ProjectInfo.pWindowInfo[i2].style);
|
---|
| 850 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 851 | return 1;
|
---|
| 852 | }
|
---|
| 853 | break;
|
---|
| 854 | case IDC_BORDERSTYLE:
|
---|
| 855 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 856 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 857 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 858 |
|
---|
| 859 | //変更情報
|
---|
| 860 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].style);
|
---|
| 861 |
|
---|
| 862 | i3=SendDlgItemMessage(hwnd,IDC_BORDERSTYLE,CB_GETCURSEL,0,0);
|
---|
| 863 | ProjectInfo.pWindowInfo[i2].style&=~(WS_BORDER|WS_THICKFRAME);
|
---|
| 864 | if(i3==1) ProjectInfo.pWindowInfo[i2].style|=WS_BORDER;
|
---|
| 865 | else if(i3==2){
|
---|
| 866 | ProjectInfo.pWindowInfo[i2].style|=WS_BORDER;
|
---|
| 867 | ProjectInfo.pWindowInfo[i2].style|=WS_THICKFRAME;
|
---|
| 868 | }
|
---|
| 869 | RadProperty_Window_Border_StylingOrder(hwnd,&ProjectInfo.pWindowInfo[i2].style);
|
---|
| 870 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 871 | return 1;
|
---|
| 872 | }
|
---|
| 873 | break;
|
---|
| 874 |
|
---|
| 875 | case IDC_STYLE_CAPTION:
|
---|
| 876 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 877 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 878 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 879 |
|
---|
| 880 | //変更情報
|
---|
| 881 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].style);
|
---|
| 882 |
|
---|
| 883 | if(SendDlgItemMessage(hwnd,IDC_STYLE_CAPTION,BM_GETCHECK,0,0))
|
---|
| 884 | ProjectInfo.pWindowInfo[i2].style|=WS_CAPTION;
|
---|
| 885 | else
|
---|
| 886 | ProjectInfo.pWindowInfo[i2].style&=~WS_CAPTION;
|
---|
| 887 | RadProperty_Window_Caption_StylingOrder(hwnd,&ProjectInfo.pWindowInfo[i2].style);
|
---|
| 888 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 889 | return 1;
|
---|
| 890 | }
|
---|
| 891 | break;
|
---|
| 892 | case IDC_STYLE_SYSMENU:
|
---|
| 893 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 894 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 895 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 896 |
|
---|
| 897 | //変更情報
|
---|
| 898 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].style);
|
---|
| 899 |
|
---|
| 900 | if(SendDlgItemMessage(hwnd,IDC_STYLE_SYSMENU,BM_GETCHECK,0,0))
|
---|
| 901 | ProjectInfo.pWindowInfo[i2].style|=WS_SYSMENU;
|
---|
| 902 | else
|
---|
| 903 | ProjectInfo.pWindowInfo[i2].style&=~WS_SYSMENU;
|
---|
| 904 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 905 | return 1;
|
---|
| 906 | }
|
---|
| 907 | break;
|
---|
| 908 | case IDC_STYLE_MINIMIZEBOX:
|
---|
| 909 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 910 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 911 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 912 |
|
---|
| 913 | //変更情報
|
---|
| 914 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].style);
|
---|
| 915 |
|
---|
| 916 | if(SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZEBOX,BM_GETCHECK,0,0))
|
---|
| 917 | ProjectInfo.pWindowInfo[i2].style|=WS_MINIMIZEBOX;
|
---|
| 918 | else
|
---|
| 919 | ProjectInfo.pWindowInfo[i2].style&=~WS_MINIMIZEBOX;
|
---|
| 920 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 921 | return 1;
|
---|
| 922 | }
|
---|
| 923 | break;
|
---|
| 924 | case IDC_STYLE_MAXIMIZEBOX:
|
---|
| 925 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 926 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 927 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 928 |
|
---|
| 929 | //変更情報
|
---|
| 930 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].style);
|
---|
| 931 |
|
---|
| 932 | if(SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZEBOX,BM_GETCHECK,0,0))
|
---|
| 933 | ProjectInfo.pWindowInfo[i2].style|=WS_MAXIMIZEBOX;
|
---|
| 934 | else
|
---|
| 935 | ProjectInfo.pWindowInfo[i2].style&=~WS_MAXIMIZEBOX;
|
---|
| 936 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 937 | return 1;
|
---|
| 938 | }
|
---|
| 939 | break;
|
---|
| 940 | case IDC_STYLE_MINIMIZE:
|
---|
| 941 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 942 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 943 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 944 |
|
---|
| 945 | //変更情報
|
---|
| 946 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].style);
|
---|
| 947 |
|
---|
| 948 | if(SendDlgItemMessage(hwnd,IDC_STYLE_MINIMIZE,BM_GETCHECK,0,0))
|
---|
| 949 | ProjectInfo.pWindowInfo[i2].style|=WS_MINIMIZE;
|
---|
| 950 | else
|
---|
| 951 | ProjectInfo.pWindowInfo[i2].style&=~WS_MINIMIZE;
|
---|
| 952 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 953 | return 1;
|
---|
| 954 | }
|
---|
| 955 | break;
|
---|
| 956 | case IDC_STYLE_MAXIMIZE:
|
---|
| 957 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 958 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 959 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 960 |
|
---|
| 961 | //変更情報
|
---|
| 962 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].style);
|
---|
| 963 |
|
---|
| 964 | if(SendDlgItemMessage(hwnd,IDC_STYLE_MAXIMIZE,BM_GETCHECK,0,0))
|
---|
| 965 | ProjectInfo.pWindowInfo[i2].style|=WS_MAXIMIZE;
|
---|
| 966 | else
|
---|
| 967 | ProjectInfo.pWindowInfo[i2].style&=~WS_MAXIMIZE;
|
---|
| 968 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 969 | return 1;
|
---|
| 970 | }
|
---|
| 971 | case IDC_STYLE_HSCROLLBAR:
|
---|
| 972 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 973 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 974 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 975 |
|
---|
| 976 | //変更情報
|
---|
| 977 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].style);
|
---|
| 978 |
|
---|
| 979 | if(SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLLBAR,BM_GETCHECK,0,0))
|
---|
| 980 | ProjectInfo.pWindowInfo[i2].style|=WS_HSCROLL;
|
---|
| 981 | else
|
---|
| 982 | ProjectInfo.pWindowInfo[i2].style&=~WS_HSCROLL;
|
---|
| 983 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 984 | return 1;
|
---|
| 985 | }
|
---|
| 986 | case IDC_STYLE_VSCROLLBAR:
|
---|
| 987 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 988 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 989 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 990 |
|
---|
| 991 | //変更情報
|
---|
| 992 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].style);
|
---|
| 993 |
|
---|
| 994 | if(SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLLBAR,BM_GETCHECK,0,0))
|
---|
| 995 | ProjectInfo.pWindowInfo[i2].style|=WS_VSCROLL;
|
---|
| 996 | else
|
---|
| 997 | ProjectInfo.pWindowInfo[i2].style&=~WS_VSCROLL;
|
---|
| 998 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 999 | return 1;
|
---|
| 1000 | }
|
---|
| 1001 | break;
|
---|
| 1002 | case IDC_STYLE_DISABLED:
|
---|
| 1003 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1004 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 1005 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 1006 |
|
---|
| 1007 | //変更情報
|
---|
| 1008 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].style);
|
---|
| 1009 |
|
---|
| 1010 | if(SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_GETCHECK,0,0))
|
---|
| 1011 | ProjectInfo.pWindowInfo[i2].style|=WS_DISABLED;
|
---|
| 1012 | else
|
---|
| 1013 | ProjectInfo.pWindowInfo[i2].style&=~WS_DISABLED;
|
---|
| 1014 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 1015 | return 1;
|
---|
| 1016 | }
|
---|
| 1017 | break;
|
---|
| 1018 | case IDC_STYLE_CLIPSIBLINGS:
|
---|
| 1019 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1020 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 1021 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 1022 |
|
---|
| 1023 | //変更情報
|
---|
| 1024 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].style);
|
---|
| 1025 |
|
---|
| 1026 | if(SendDlgItemMessage(hwnd,IDC_STYLE_CLIPSIBLINGS,BM_GETCHECK,0,0))
|
---|
| 1027 | ProjectInfo.pWindowInfo[i2].style|=WS_CLIPSIBLINGS;
|
---|
| 1028 | else
|
---|
| 1029 | ProjectInfo.pWindowInfo[i2].style&=~WS_CLIPSIBLINGS;
|
---|
| 1030 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 1031 | return 1;
|
---|
| 1032 | }
|
---|
| 1033 | break;
|
---|
| 1034 | case IDC_STYLE_CLIPCHILDREN:
|
---|
| 1035 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1036 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 1037 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 1038 |
|
---|
| 1039 | //変更情報
|
---|
| 1040 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].style);
|
---|
| 1041 |
|
---|
| 1042 | if(SendDlgItemMessage(hwnd,IDC_STYLE_CLIPCHILDREN,BM_GETCHECK,0,0))
|
---|
| 1043 | ProjectInfo.pWindowInfo[i2].style|=WS_CLIPCHILDREN;
|
---|
| 1044 | else
|
---|
| 1045 | ProjectInfo.pWindowInfo[i2].style&=~WS_CLIPCHILDREN;
|
---|
| 1046 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 1047 | return 1;
|
---|
| 1048 | }
|
---|
| 1049 | break;
|
---|
| 1050 | case IDC_STYLE_VISIBLE:
|
---|
| 1051 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1052 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 1053 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 1054 |
|
---|
| 1055 | //変更情報
|
---|
| 1056 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].style);
|
---|
| 1057 |
|
---|
| 1058 | if(SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_GETCHECK,0,0))
|
---|
| 1059 | ProjectInfo.pWindowInfo[i2].style|=WS_VISIBLE;
|
---|
| 1060 | else
|
---|
| 1061 | ProjectInfo.pWindowInfo[i2].style&=~WS_VISIBLE;
|
---|
| 1062 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 1063 | return 1;
|
---|
| 1064 | }
|
---|
| 1065 | break;
|
---|
| 1066 |
|
---|
| 1067 | case IDC_EXSTYLE:
|
---|
| 1068 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_WINDOW_EXSTYLE),hwnd,DlgRadProperty_Window_ExStyle)) return 1;
|
---|
| 1069 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 1070 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 1071 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 1072 | return 1;
|
---|
| 1073 |
|
---|
| 1074 | case IDC_DEFWINDOW:
|
---|
| 1075 | case IDC_MODALDLG:
|
---|
| 1076 | case IDC_MODELESSDLG:
|
---|
| 1077 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1078 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 1079 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 1080 |
|
---|
| 1081 | //変更情報
|
---|
| 1082 | Rad_NoticeChanging(i,RAD_UNDO_TYPE,SELECT_WINDOW,ProjectInfo.pWindowInfo[i2].type);
|
---|
| 1083 |
|
---|
| 1084 | if(SendDlgItemMessage(hwnd,IDC_DEFWINDOW,BM_GETCHECK,0,0))
|
---|
| 1085 | ProjectInfo.pWindowInfo[i2].type=WNDTYPE_DEFAULT;
|
---|
| 1086 | else if(SendDlgItemMessage(hwnd,IDC_MODALDLG,BM_GETCHECK,0,0))
|
---|
| 1087 | ProjectInfo.pWindowInfo[i2].type=WNDTYPE_MODALDLG;
|
---|
| 1088 | else if(SendDlgItemMessage(hwnd,IDC_MODELESSDLG,BM_GETCHECK,0,0))
|
---|
| 1089 | ProjectInfo.pWindowInfo[i2].type=WNDTYPE_MODELESSDLG;
|
---|
| 1090 | return 1;
|
---|
| 1091 | }
|
---|
| 1092 | break;
|
---|
| 1093 | }
|
---|
| 1094 | break;
|
---|
| 1095 | }
|
---|
| 1096 | return 0;
|
---|
| 1097 | }
|
---|
| 1098 |
|
---|
| 1099 | BOOL CALLBACK DlgRadProperty_Item_RenameCaption(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 1100 | extern HANDLE hHeap;
|
---|
| 1101 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 1102 | extern PROJECTINFO ProjectInfo;
|
---|
| 1103 | int i,i2,i3;
|
---|
| 1104 | char *temporary;
|
---|
| 1105 | POINTANDSIZE PointAndSize;
|
---|
| 1106 |
|
---|
| 1107 | switch(message){
|
---|
| 1108 | case WM_INITDIALOG:
|
---|
| 1109 | SetPosCenter(hwnd);
|
---|
| 1110 | i=GetWndNum(GetWindow(hClient,GW_CHILD));
|
---|
| 1111 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 1112 | if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW)
|
---|
| 1113 | SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[i2].caption);
|
---|
| 1114 | else
|
---|
| 1115 | SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
|
---|
| 1116 | break;
|
---|
| 1117 | case WM_COMMAND:
|
---|
| 1118 | switch(LOWORD(wParam)){
|
---|
| 1119 | case IDOK:
|
---|
| 1120 | i=GetWndNum(GetWindow(hClient,GW_CHILD));
|
---|
| 1121 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 1122 |
|
---|
| 1123 | i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_CAPTION))+1;
|
---|
| 1124 | temporary=(char *)HeapAlloc(hHeap,0,i3);
|
---|
| 1125 | GetDlgItemText(hwnd,IDC_CAPTION,temporary,i3);
|
---|
| 1126 | if(MdiInfo[i].MdiRadInfo->SelectingItem[0]==SELECT_WINDOW){
|
---|
| 1127 | if(lstrcmp(temporary,ProjectInfo.pWindowInfo[i2].caption)==0){
|
---|
| 1128 | HeapDefaultFree(temporary);
|
---|
| 1129 | SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
|
---|
| 1130 | return 1;
|
---|
| 1131 | }
|
---|
| 1132 |
|
---|
| 1133 | //変更情報を更新
|
---|
| 1134 | Rad_NoticeChanging(i,RAD_UNDO_CAPTION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)ProjectInfo.pWindowInfo[i2].caption);
|
---|
| 1135 |
|
---|
| 1136 | HeapDefaultFree(ProjectInfo.pWindowInfo[i2].caption);
|
---|
| 1137 | ProjectInfo.pWindowInfo[i2].caption=temporary;
|
---|
| 1138 | }
|
---|
| 1139 | else{
|
---|
| 1140 | if(lstrcmp(temporary,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption)==0){
|
---|
| 1141 | HeapDefaultFree(temporary);
|
---|
| 1142 | SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
|
---|
| 1143 | return 1;
|
---|
| 1144 | }
|
---|
| 1145 |
|
---|
| 1146 | //変更情報を更新
|
---|
| 1147 | Rad_NoticeChanging(i,RAD_UNDO_CAPTION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
|
---|
| 1148 |
|
---|
| 1149 | HeapDefaultFree(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
|
---|
| 1150 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption=temporary;
|
---|
| 1151 |
|
---|
| 1152 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_STATIC){
|
---|
| 1153 | //スタティック テキスト
|
---|
| 1154 | //テキストが表示できるようにサイズを拡大する
|
---|
| 1155 |
|
---|
| 1156 | PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].pos;
|
---|
| 1157 | PointAndSize.size=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size;
|
---|
| 1158 | Rad_NoticeChanging(i,RAD_UNDO_POSITION,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&PointAndSize);
|
---|
| 1159 |
|
---|
| 1160 | HFONT hFont,hOldFont;
|
---|
| 1161 | hFont=CreateFontIndirect(&ProjectInfo.pWindowInfo[i2].LogFont);
|
---|
| 1162 | hOldFont=(HFONT)SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hFont);
|
---|
| 1163 | GetTextExtentPoint32(MdiInfo[i].MdiRadInfo->hMemDC,temporary,lstrlen(temporary),&PointAndSize.size);
|
---|
| 1164 | SelectObject(MdiInfo[i].MdiRadInfo->hMemDC,hOldFont);
|
---|
| 1165 | DeleteObject(hFont);
|
---|
| 1166 |
|
---|
| 1167 | //テキストの終端に余裕を持たせる
|
---|
| 1168 | PointAndSize.size.cx+=5;
|
---|
| 1169 |
|
---|
| 1170 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx<PointAndSize.size.cx)
|
---|
| 1171 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx=PointAndSize.size.cx;
|
---|
| 1172 | }
|
---|
| 1173 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_CHECKBOX){
|
---|
| 1174 | //チェック ボックス
|
---|
| 1175 | //テキストが表示できるようにサイズを拡大する
|
---|
| 1176 |
|
---|
| 1177 | PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].pos;
|
---|
| 1178 | PointAndSize.size=ProjectInfo.pWindowInfo[i2].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(&ProjectInfo.pWindowInfo[i2].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+=21;
|
---|
| 1190 |
|
---|
| 1191 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx<PointAndSize.size.cx)
|
---|
| 1192 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx=PointAndSize.size.cx;
|
---|
| 1193 | }
|
---|
| 1194 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].Control==CT_RADIOBUTTON){
|
---|
| 1195 | //ラジオ ボックス
|
---|
| 1196 | //テキストが表示できるようにサイズを拡大する
|
---|
| 1197 |
|
---|
| 1198 | PointAndSize.pos=ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].pos;
|
---|
| 1199 | PointAndSize.size=ProjectInfo.pWindowInfo[i2].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(&ProjectInfo.pWindowInfo[i2].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+=20;
|
---|
| 1211 |
|
---|
| 1212 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx<PointAndSize.size.cx)
|
---|
| 1213 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].size.cx=PointAndSize.size.cx;
|
---|
| 1214 | }
|
---|
| 1215 | }
|
---|
| 1216 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 1217 | EndDialog(hwnd,1);
|
---|
| 1218 | return 1;
|
---|
| 1219 | case IDCANCEL:
|
---|
| 1220 | EndDialog(hwnd,0);
|
---|
| 1221 | return 1;
|
---|
| 1222 | }
|
---|
| 1223 | break;
|
---|
| 1224 | }
|
---|
| 1225 | return 0;
|
---|
| 1226 | }
|
---|
| 1227 | BOOL CALLBACK DlgRadProperty_Item_RenameID(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 1228 | extern HANDLE hHeap;
|
---|
| 1229 | extern HWND hClient,hOwner;
|
---|
| 1230 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 1231 | extern PROJECTINFO ProjectInfo;
|
---|
| 1232 | int i,i2,i3;
|
---|
| 1233 | char *temporary;
|
---|
| 1234 |
|
---|
| 1235 | switch(message){
|
---|
| 1236 | case WM_INITDIALOG:
|
---|
| 1237 | SetPosCenter(hwnd);
|
---|
| 1238 | i=GetWndNum(GetWindow(hClient,GW_CHILD));
|
---|
| 1239 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 1240 | SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
| 1241 | break;
|
---|
| 1242 | case WM_COMMAND:
|
---|
| 1243 | switch(LOWORD(wParam)){
|
---|
| 1244 | case IDOK:
|
---|
| 1245 | i=GetWndNum(GetWindow(hClient,GW_CHILD));
|
---|
| 1246 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 1247 |
|
---|
| 1248 | i3=GetWindowTextLength(GetDlgItem(hwnd,IDC_IDNAME))+1;
|
---|
| 1249 | if(i3==1){
|
---|
| 1250 | //MsgBox "ID名を入力して下さい。"
|
---|
| 1251 | MessageBox(hOwner,STRING_ITEM_RENAME_MUST_ID,APPLICATION_NAME,MB_OK|MB_ICONEXCLAMATION);
|
---|
| 1252 | break;
|
---|
| 1253 | }
|
---|
| 1254 | temporary=(char *)HeapAlloc(hHeap,0,i3);
|
---|
| 1255 | GetDlgItemText(hwnd,IDC_IDNAME,temporary,i3);
|
---|
| 1256 | if(lstrcmp(temporary,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName)==0){
|
---|
| 1257 | HeapDefaultFree(temporary);
|
---|
| 1258 | SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
|
---|
| 1259 | return 1;
|
---|
| 1260 | }
|
---|
| 1261 |
|
---|
| 1262 | //MsgBox "アイテムのID名を変更すると、ソースコード内のID名は手動で変換する必要があります。変更しますか?"
|
---|
| 1263 | if(IDCANCEL==MessageBox(hwnd,STRING_ITEM_RENAME_CHECK,APPLICATION_NAME,MB_OKCANCEL|MB_ICONEXCLAMATION)) return 1;
|
---|
| 1264 |
|
---|
| 1265 | //変更情報を更新
|
---|
| 1266 | Rad_NoticeChanging(i,RAD_UNDO_NAME,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
| 1267 |
|
---|
| 1268 | HeapDefaultFree(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
| 1269 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName=temporary;
|
---|
| 1270 |
|
---|
| 1271 | EndDialog(hwnd,1);
|
---|
| 1272 | return 1;
|
---|
| 1273 | case IDCANCEL:
|
---|
| 1274 | EndDialog(hwnd,0);
|
---|
| 1275 | return 1;
|
---|
| 1276 | }
|
---|
| 1277 | break;
|
---|
| 1278 | }
|
---|
| 1279 | return 0;
|
---|
| 1280 | }
|
---|
| 1281 | BOOL DefaultItemStyles(HWND hwnd,int WndNum,int WndInfoNum,WPARAM wParam){
|
---|
| 1282 | extern HANDLE hHeap;
|
---|
| 1283 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 1284 | extern PROJECTINFO ProjectInfo;
|
---|
| 1285 |
|
---|
| 1286 | switch(LOWORD(wParam)){
|
---|
| 1287 | case IDC_RENAMEID:
|
---|
| 1288 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_RENAMEID),hwnd,DlgRadProperty_Item_RenameID)) return 1;
|
---|
| 1289 | SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
| 1290 | return 1;
|
---|
| 1291 | case IDC_RENAMECAPTION:
|
---|
| 1292 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_RENAMECAPTION),hwnd,DlgRadProperty_Item_RenameCaption)) return 1;
|
---|
| 1293 | SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].caption);
|
---|
| 1294 | return 1;
|
---|
| 1295 | case IDC_STYLE_DISABLED:
|
---|
| 1296 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1297 | //変更情報
|
---|
| 1298 | Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 1299 |
|
---|
| 1300 | if(SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_GETCHECK,0,0))
|
---|
| 1301 | ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style|=WS_DISABLED;
|
---|
| 1302 | else
|
---|
| 1303 | ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style&=~WS_DISABLED;
|
---|
| 1304 | DrawRadWindow(WndNum,&ProjectInfo.pWindowInfo[WndInfoNum]);
|
---|
| 1305 | return 1;
|
---|
| 1306 | }
|
---|
| 1307 | break;
|
---|
| 1308 | case IDC_STYLE_VISIBLE:
|
---|
| 1309 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1310 | //変更情報
|
---|
| 1311 | Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 1312 |
|
---|
| 1313 | if(SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_GETCHECK,0,0))
|
---|
| 1314 | ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style|=WS_VISIBLE;
|
---|
| 1315 | else
|
---|
| 1316 | ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style&=~WS_VISIBLE;
|
---|
| 1317 | return 1;
|
---|
| 1318 | }
|
---|
| 1319 | break;
|
---|
| 1320 | case IDC_STYLE_GROUP:
|
---|
| 1321 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1322 | //変更情報
|
---|
| 1323 | Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 1324 |
|
---|
| 1325 | if(SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_GETCHECK,0,0))
|
---|
| 1326 | ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style|=WS_GROUP;
|
---|
| 1327 | else
|
---|
| 1328 | ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style&=~WS_GROUP;
|
---|
| 1329 | return 1;
|
---|
| 1330 | }
|
---|
| 1331 | break;
|
---|
| 1332 | case IDC_STYLE_TABSTOP:
|
---|
| 1333 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1334 | //変更情報
|
---|
| 1335 | Rad_NoticeChanging(WndNum,RAD_UNDO_STYLE,MdiInfo[WndNum].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 1336 |
|
---|
| 1337 | if(SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_GETCHECK,0,0))
|
---|
| 1338 | ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style|=WS_TABSTOP;
|
---|
| 1339 | else
|
---|
| 1340 | ProjectInfo.pWindowInfo[WndInfoNum].pChildInfo[MdiInfo[WndNum].MdiRadInfo->SelectingItem[0]].style&=~WS_TABSTOP;
|
---|
| 1341 | return 1;
|
---|
| 1342 | }
|
---|
| 1343 | break;
|
---|
| 1344 | }
|
---|
| 1345 | return 0;
|
---|
| 1346 | }
|
---|
| 1347 | BOOL CALLBACK DlgRadProperty_Item_ExStyle(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 1348 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 1349 | extern PROJECTINFO ProjectInfo;
|
---|
| 1350 | int i,i2;
|
---|
| 1351 |
|
---|
| 1352 | switch(message){
|
---|
| 1353 | case WM_INITDIALOG:
|
---|
| 1354 | SetPosCenter(hwnd);
|
---|
| 1355 | i=GetWndNum(GetWindow(hClient,GW_CHILD));
|
---|
| 1356 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 1357 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle&WS_EX_ACCEPTFILES) SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1358 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle&WS_EX_TRANSPARENT) SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1359 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle&WS_EX_DLGMODALFRAME) SendDlgItemMessage(hwnd,IDC_EXSTYLE_DLGMODALFRAME,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1360 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle&WS_EX_CLIENTEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1361 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle&WS_EX_STATICEDGE) SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1362 | break;
|
---|
| 1363 | case WM_COMMAND:
|
---|
| 1364 | switch(LOWORD(wParam)){
|
---|
| 1365 | case IDOK:
|
---|
| 1366 | i=GetWndNum(GetWindow(hClient,GW_CHILD));
|
---|
| 1367 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 1368 |
|
---|
| 1369 | DWORD style;
|
---|
| 1370 | style=0;
|
---|
| 1371 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_ACCEPTFILES,BM_GETCHECK,0,0))
|
---|
| 1372 | style|=WS_EX_ACCEPTFILES;
|
---|
| 1373 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_TRANSPARENT,BM_GETCHECK,0,0))
|
---|
| 1374 | style|=WS_EX_TRANSPARENT;
|
---|
| 1375 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_DLGMODALFRAME,BM_GETCHECK,0,0))
|
---|
| 1376 | style|=WS_EX_DLGMODALFRAME;
|
---|
| 1377 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_CLIENTEDGE,BM_GETCHECK,0,0))
|
---|
| 1378 | style|=WS_EX_CLIENTEDGE;
|
---|
| 1379 | if(SendDlgItemMessage(hwnd,IDC_EXSTYLE_STATICEDGE,BM_GETCHECK,0,0))
|
---|
| 1380 | style|=WS_EX_STATICEDGE;
|
---|
| 1381 |
|
---|
| 1382 | if(style==ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle){
|
---|
| 1383 | SendMessage(hwnd,WM_COMMAND,IDCANCEL,0);
|
---|
| 1384 | return 1;
|
---|
| 1385 | }
|
---|
| 1386 |
|
---|
| 1387 | //変更情報
|
---|
| 1388 | Rad_NoticeChanging(i,RAD_UNDO_EXSTYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle);
|
---|
| 1389 |
|
---|
| 1390 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ExStyle=style;
|
---|
| 1391 | EndDialog(hwnd,1);
|
---|
| 1392 | return 1;
|
---|
| 1393 | case IDCANCEL:
|
---|
| 1394 | EndDialog(hwnd,0);
|
---|
| 1395 | return 1;
|
---|
| 1396 | }
|
---|
| 1397 | break;
|
---|
| 1398 | }
|
---|
| 1399 | return 0;
|
---|
| 1400 | }
|
---|
| 1401 |
|
---|
| 1402 |
|
---|
| 1403 | /////////////////////
|
---|
| 1404 | // BUTTON プロパティ
|
---|
| 1405 |
|
---|
| 1406 | BOOL CALLBACK RadProperty_ButtonProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 1407 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 1408 | extern PROJECTINFO ProjectInfo;
|
---|
| 1409 | int i,i2,i3;
|
---|
| 1410 | static BOOL bInitial;
|
---|
| 1411 |
|
---|
| 1412 | switch(message){
|
---|
| 1413 | case WM_INITDIALOG:
|
---|
| 1414 | bInitial=1;
|
---|
| 1415 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 1416 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 1417 |
|
---|
| 1418 | SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
| 1419 | SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
|
---|
| 1420 |
|
---|
| 1421 |
|
---|
| 1422 | ////////////
|
---|
| 1423 | //スタイル
|
---|
| 1424 |
|
---|
| 1425 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1426 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1427 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1428 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1429 |
|
---|
| 1430 | 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);
|
---|
| 1431 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_DEFPUSHBUTTON) SendDlgItemMessage(hwnd,IDC_BS_DEFPUSHBUTTON,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1432 |
|
---|
| 1433 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_ICON) SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1434 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BITMAP) SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1435 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_MULTILINE) SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1436 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_NOTIFY) SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1437 |
|
---|
| 1438 |
|
---|
| 1439 | //////////////////
|
---|
| 1440 | // 水平方向の配置
|
---|
| 1441 | //////////////////
|
---|
| 1442 |
|
---|
| 1443 | //"デフォルト"
|
---|
| 1444 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT);
|
---|
| 1445 | //"左端"
|
---|
| 1446 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_LEFT);
|
---|
| 1447 | //"右端"
|
---|
| 1448 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_RIGHT);
|
---|
| 1449 | //"中央"
|
---|
| 1450 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
|
---|
| 1451 |
|
---|
| 1452 | //ビットを考慮してBS_CENTERを最初に比較する
|
---|
| 1453 | if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_CENTER)==BS_CENTER) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,3,0);
|
---|
| 1454 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_LEFT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,1,0);
|
---|
| 1455 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_RIGHT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,2,0);
|
---|
| 1456 | else SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,0,0);
|
---|
| 1457 |
|
---|
| 1458 |
|
---|
| 1459 | //////////////////
|
---|
| 1460 | // 垂直方向の配置
|
---|
| 1461 | //////////////////
|
---|
| 1462 |
|
---|
| 1463 | //"デフォルト"
|
---|
| 1464 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT);
|
---|
| 1465 | //"上端"
|
---|
| 1466 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_TOP);
|
---|
| 1467 | //"下端"
|
---|
| 1468 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_BOTTOM);
|
---|
| 1469 | //"中央"
|
---|
| 1470 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
|
---|
| 1471 |
|
---|
| 1472 | //ビットを考慮してBS_VCENTERを最初に比較する
|
---|
| 1473 | if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_VCENTER)==BS_VCENTER) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,3,0);
|
---|
| 1474 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_TOP) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,1,0);
|
---|
| 1475 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BOTTOM) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,2,0);
|
---|
| 1476 | else SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,0,0);
|
---|
| 1477 |
|
---|
| 1478 |
|
---|
| 1479 | bInitial=0;
|
---|
| 1480 | break;
|
---|
| 1481 | case WM_COMMAND:
|
---|
| 1482 |
|
---|
| 1483 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 1484 | if(i==-1) return 1;
|
---|
| 1485 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 1486 |
|
---|
| 1487 | //共通スタイル
|
---|
| 1488 | if(bInitial==0){
|
---|
| 1489 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
| 1490 | }
|
---|
| 1491 |
|
---|
| 1492 | switch(LOWORD(wParam)){
|
---|
| 1493 | case IDC_BS_DEFPUSHBUTTON:
|
---|
| 1494 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1495 | //変更情報
|
---|
| 1496 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 1497 |
|
---|
| 1498 | if(SendDlgItemMessage(hwnd,IDC_BS_DEFPUSHBUTTON,BM_GETCHECK,0,0)){
|
---|
| 1499 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_OWNERDRAW;
|
---|
| 1500 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_DEFPUSHBUTTON;
|
---|
| 1501 | SendDlgItemMessage(hwnd,IDC_BS_OWNERDRAW,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 1502 | }
|
---|
| 1503 | else
|
---|
| 1504 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_DEFPUSHBUTTON;
|
---|
| 1505 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 1506 | return 1;
|
---|
| 1507 | }
|
---|
| 1508 | break;
|
---|
| 1509 | case IDC_BS_OWNERDRAW:
|
---|
| 1510 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1511 | //変更情報
|
---|
| 1512 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 1513 |
|
---|
| 1514 | if(SendDlgItemMessage(hwnd,IDC_BS_OWNERDRAW,BM_GETCHECK,0,0)){
|
---|
| 1515 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_DEFPUSHBUTTON;
|
---|
| 1516 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_OWNERDRAW;
|
---|
| 1517 | SendDlgItemMessage(hwnd,IDC_BS_DEFPUSHBUTTON,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 1518 | }
|
---|
| 1519 | else
|
---|
| 1520 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_OWNERDRAW;
|
---|
| 1521 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 1522 | return 1;
|
---|
| 1523 | }
|
---|
| 1524 | break;
|
---|
| 1525 | case IDC_BS_ICON:
|
---|
| 1526 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1527 | //変更情報
|
---|
| 1528 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 1529 |
|
---|
| 1530 | if(SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_GETCHECK,0,0)){
|
---|
| 1531 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_ICON;
|
---|
| 1532 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP;
|
---|
| 1533 | SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 1534 | }
|
---|
| 1535 | else
|
---|
| 1536 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON;
|
---|
| 1537 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 1538 | return 1;
|
---|
| 1539 | }
|
---|
| 1540 | break;
|
---|
| 1541 | case IDC_BS_BITMAP:
|
---|
| 1542 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1543 | //変更情報
|
---|
| 1544 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 1545 |
|
---|
| 1546 | if(SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_GETCHECK,0,0)){
|
---|
| 1547 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BITMAP;
|
---|
| 1548 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON;
|
---|
| 1549 | SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 1550 | }
|
---|
| 1551 | else
|
---|
| 1552 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP;
|
---|
| 1553 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 1554 | return 1;
|
---|
| 1555 | }
|
---|
| 1556 | break;
|
---|
| 1557 | case IDC_BS_MULTILINE:
|
---|
| 1558 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1559 | //変更情報
|
---|
| 1560 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 1561 |
|
---|
| 1562 | if(SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_GETCHECK,0,0))
|
---|
| 1563 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_MULTILINE;
|
---|
| 1564 | else
|
---|
| 1565 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_MULTILINE;
|
---|
| 1566 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 1567 | return 1;
|
---|
| 1568 | }
|
---|
| 1569 | break;
|
---|
| 1570 | case IDC_BS_NOTIFY:
|
---|
| 1571 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1572 | //変更情報
|
---|
| 1573 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 1574 |
|
---|
| 1575 | if(SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_GETCHECK,0,0))
|
---|
| 1576 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_NOTIFY;
|
---|
| 1577 | else
|
---|
| 1578 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_NOTIFY;
|
---|
| 1579 | return 1;
|
---|
| 1580 | }
|
---|
| 1581 | break;
|
---|
| 1582 |
|
---|
| 1583 | case IDC_BS_HPOS:
|
---|
| 1584 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 1585 | //変更情報
|
---|
| 1586 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 1587 |
|
---|
| 1588 | i3=SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_GETCURSEL,0,0);
|
---|
| 1589 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_LEFT|BS_RIGHT|BS_CENTER);
|
---|
| 1590 | if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_LEFT;
|
---|
| 1591 | else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_RIGHT;
|
---|
| 1592 | else if(i3==3) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_CENTER;
|
---|
| 1593 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 1594 | return 1;
|
---|
| 1595 | }
|
---|
| 1596 | break;
|
---|
| 1597 | case IDC_BS_VPOS:
|
---|
| 1598 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 1599 | //変更情報
|
---|
| 1600 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 1601 |
|
---|
| 1602 | i3=SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_GETCURSEL,0,0);
|
---|
| 1603 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_TOP|BS_BOTTOM|BS_VCENTER);
|
---|
| 1604 | if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_TOP;
|
---|
| 1605 | else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BOTTOM;
|
---|
| 1606 | else if(i3==3) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_VCENTER;
|
---|
| 1607 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 1608 | return 1;
|
---|
| 1609 | }
|
---|
| 1610 | break;
|
---|
| 1611 |
|
---|
| 1612 | case IDC_EXSTYLE:
|
---|
| 1613 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,DlgRadProperty_Item_ExStyle)) return 1;
|
---|
| 1614 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 1615 | return 1;
|
---|
| 1616 | }
|
---|
| 1617 | break;
|
---|
| 1618 | }
|
---|
| 1619 | return 0;
|
---|
| 1620 | }
|
---|
| 1621 |
|
---|
| 1622 |
|
---|
| 1623 | ////////////////////////
|
---|
| 1624 | // CHECKBOX プロパティ
|
---|
| 1625 | BOOL CALLBACK RadProperty_CheckBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 1626 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 1627 | extern PROJECTINFO ProjectInfo;
|
---|
| 1628 | int i,i2,i3;
|
---|
| 1629 | static BOOL bInitial;
|
---|
| 1630 |
|
---|
| 1631 | switch(message){
|
---|
| 1632 | case WM_INITDIALOG:
|
---|
| 1633 | bInitial=1;
|
---|
| 1634 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 1635 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 1636 |
|
---|
| 1637 | SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
| 1638 | SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
|
---|
| 1639 |
|
---|
| 1640 |
|
---|
| 1641 | ////////////
|
---|
| 1642 | //スタイル
|
---|
| 1643 |
|
---|
| 1644 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1645 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1646 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1647 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1648 |
|
---|
| 1649 | 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);
|
---|
| 1650 | if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_AUTO3STATE)==BS_AUTO3STATE){
|
---|
| 1651 | SendDlgItemMessage(hwnd,IDC_BS_AUTO,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1652 | SendDlgItemMessage(hwnd,IDC_BS_3STATE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1653 | }
|
---|
| 1654 | 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);
|
---|
| 1655 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_PUSHLIKE) SendDlgItemMessage(hwnd,IDC_BS_PUSHLIKE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1656 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_LEFTTEXT) SendDlgItemMessage(hwnd,IDC_BS_LEFTTEXT,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1657 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_ICON) SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1658 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BITMAP) SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1659 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_MULTILINE) SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1660 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_NOTIFY) SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1661 |
|
---|
| 1662 |
|
---|
| 1663 | //////////////////
|
---|
| 1664 | // 水平方向の配置
|
---|
| 1665 | //////////////////
|
---|
| 1666 |
|
---|
| 1667 | //"デフォルト"
|
---|
| 1668 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT);
|
---|
| 1669 | //"左端"
|
---|
| 1670 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_LEFT);
|
---|
| 1671 | //"右端"
|
---|
| 1672 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_RIGHT);
|
---|
| 1673 | //"中央"
|
---|
| 1674 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
|
---|
| 1675 |
|
---|
| 1676 | //ビットを考慮してBS_CENTERを最初に比較する
|
---|
| 1677 | if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_CENTER)==BS_CENTER) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,3,0);
|
---|
| 1678 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_LEFT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,1,0);
|
---|
| 1679 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_RIGHT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,2,0);
|
---|
| 1680 | else SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,0,0);
|
---|
| 1681 |
|
---|
| 1682 |
|
---|
| 1683 | //////////////////
|
---|
| 1684 | // 垂直方向の配置
|
---|
| 1685 | //////////////////
|
---|
| 1686 |
|
---|
| 1687 | //"デフォルト"
|
---|
| 1688 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT);
|
---|
| 1689 | //"上端"
|
---|
| 1690 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_TOP);
|
---|
| 1691 | //"下端"
|
---|
| 1692 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_BOTTOM);
|
---|
| 1693 | //"中央"
|
---|
| 1694 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
|
---|
| 1695 |
|
---|
| 1696 | //ビットを考慮してBS_VCENTERを最初に比較する
|
---|
| 1697 | if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_VCENTER)==BS_VCENTER) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,3,0);
|
---|
| 1698 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_TOP) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,1,0);
|
---|
| 1699 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BOTTOM) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,2,0);
|
---|
| 1700 | else SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,0,0);
|
---|
| 1701 |
|
---|
| 1702 |
|
---|
| 1703 | bInitial=0;
|
---|
| 1704 | break;
|
---|
| 1705 | case WM_COMMAND:
|
---|
| 1706 |
|
---|
| 1707 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 1708 | if(i==-1) return 1;
|
---|
| 1709 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 1710 |
|
---|
| 1711 | //共通スタイル
|
---|
| 1712 | if(bInitial==0){
|
---|
| 1713 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
| 1714 | }
|
---|
| 1715 |
|
---|
| 1716 | switch(LOWORD(wParam)){
|
---|
| 1717 | case IDC_BS_AUTO:
|
---|
| 1718 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1719 | //変更情報
|
---|
| 1720 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 1721 |
|
---|
| 1722 | if(SendDlgItemMessage(hwnd,IDC_BS_AUTO,BM_GETCHECK,0,0)){
|
---|
| 1723 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x04){
|
---|
| 1724 | //3state
|
---|
| 1725 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0;
|
---|
| 1726 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_AUTO3STATE;
|
---|
| 1727 | }
|
---|
| 1728 | else{
|
---|
| 1729 | //2state
|
---|
| 1730 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0;
|
---|
| 1731 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_AUTOCHECKBOX;
|
---|
| 1732 | }
|
---|
| 1733 | }
|
---|
| 1734 | else{
|
---|
| 1735 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x04){
|
---|
| 1736 | //3state
|
---|
| 1737 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0;
|
---|
| 1738 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_3STATE;
|
---|
| 1739 | }
|
---|
| 1740 | else{
|
---|
| 1741 | //2state
|
---|
| 1742 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0;
|
---|
| 1743 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_CHECKBOX;
|
---|
| 1744 | }
|
---|
| 1745 | }
|
---|
| 1746 | return 1;
|
---|
| 1747 | }
|
---|
| 1748 | break;
|
---|
| 1749 | case IDC_BS_3STATE:
|
---|
| 1750 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1751 | //変更情報
|
---|
| 1752 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 1753 |
|
---|
| 1754 | if(SendDlgItemMessage(hwnd,IDC_BS_3STATE,BM_GETCHECK,0,0)){
|
---|
| 1755 | if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0F)==BS_CHECKBOX){
|
---|
| 1756 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0;
|
---|
| 1757 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_3STATE;
|
---|
| 1758 | }
|
---|
| 1759 | else if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0F)==BS_AUTOCHECKBOX){
|
---|
| 1760 | //自動チェック
|
---|
| 1761 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0;
|
---|
| 1762 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_AUTO3STATE;
|
---|
| 1763 | }
|
---|
| 1764 | }
|
---|
| 1765 | else{
|
---|
| 1766 | if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0F)==BS_3STATE){
|
---|
| 1767 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0;
|
---|
| 1768 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_CHECKBOX;
|
---|
| 1769 | }
|
---|
| 1770 | else if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0F)==BS_AUTO3STATE){
|
---|
| 1771 | //自動チェック
|
---|
| 1772 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0;
|
---|
| 1773 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_AUTOCHECKBOX;
|
---|
| 1774 | }
|
---|
| 1775 | }
|
---|
| 1776 | return 1;
|
---|
| 1777 | }
|
---|
| 1778 | break;
|
---|
| 1779 | case IDC_BS_PUSHLIKE:
|
---|
| 1780 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1781 | //変更情報
|
---|
| 1782 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 1783 |
|
---|
| 1784 | if(SendDlgItemMessage(hwnd,IDC_BS_PUSHLIKE,BM_GETCHECK,0,0))
|
---|
| 1785 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_PUSHLIKE;
|
---|
| 1786 | else
|
---|
| 1787 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_PUSHLIKE;
|
---|
| 1788 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 1789 | return 1;
|
---|
| 1790 | }
|
---|
| 1791 | break;
|
---|
| 1792 | case IDC_BS_LEFTTEXT:
|
---|
| 1793 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1794 | //変更情報
|
---|
| 1795 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 1796 |
|
---|
| 1797 | if(SendDlgItemMessage(hwnd,IDC_BS_LEFTTEXT,BM_GETCHECK,0,0))
|
---|
| 1798 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_LEFTTEXT;
|
---|
| 1799 | else
|
---|
| 1800 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_LEFTTEXT;
|
---|
| 1801 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 1802 | return 1;
|
---|
| 1803 | }
|
---|
| 1804 | break;
|
---|
| 1805 | case IDC_BS_ICON:
|
---|
| 1806 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1807 | //変更情報
|
---|
| 1808 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 1809 |
|
---|
| 1810 | if(SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_GETCHECK,0,0)){
|
---|
| 1811 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_ICON;
|
---|
| 1812 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP;
|
---|
| 1813 | SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 1814 | }
|
---|
| 1815 | else
|
---|
| 1816 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON;
|
---|
| 1817 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 1818 | return 1;
|
---|
| 1819 | }
|
---|
| 1820 | break;
|
---|
| 1821 | case IDC_BS_BITMAP:
|
---|
| 1822 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1823 | //変更情報
|
---|
| 1824 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 1825 |
|
---|
| 1826 | if(SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_GETCHECK,0,0)){
|
---|
| 1827 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BITMAP;
|
---|
| 1828 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON;
|
---|
| 1829 | SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 1830 | }
|
---|
| 1831 | else
|
---|
| 1832 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP;
|
---|
| 1833 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 1834 | return 1;
|
---|
| 1835 | }
|
---|
| 1836 | break;
|
---|
| 1837 | case IDC_BS_MULTILINE:
|
---|
| 1838 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1839 | //変更情報
|
---|
| 1840 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 1841 |
|
---|
| 1842 | if(SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_GETCHECK,0,0))
|
---|
| 1843 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_MULTILINE;
|
---|
| 1844 | else
|
---|
| 1845 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_MULTILINE;
|
---|
| 1846 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 1847 | return 1;
|
---|
| 1848 | }
|
---|
| 1849 | break;
|
---|
| 1850 | case IDC_BS_NOTIFY:
|
---|
| 1851 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 1852 | //変更情報
|
---|
| 1853 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 1854 |
|
---|
| 1855 | if(SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_GETCHECK,0,0))
|
---|
| 1856 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_NOTIFY;
|
---|
| 1857 | else
|
---|
| 1858 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_NOTIFY;
|
---|
| 1859 | return 1;
|
---|
| 1860 | }
|
---|
| 1861 | break;
|
---|
| 1862 |
|
---|
| 1863 | case IDC_BS_HPOS:
|
---|
| 1864 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 1865 | //変更情報
|
---|
| 1866 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 1867 |
|
---|
| 1868 | i3=SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_GETCURSEL,0,0);
|
---|
| 1869 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_LEFT|BS_RIGHT|BS_CENTER);
|
---|
| 1870 | if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_LEFT;
|
---|
| 1871 | else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_RIGHT;
|
---|
| 1872 | else if(i3==3) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_CENTER;
|
---|
| 1873 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 1874 | return 1;
|
---|
| 1875 | }
|
---|
| 1876 | break;
|
---|
| 1877 | case IDC_BS_VPOS:
|
---|
| 1878 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 1879 | //変更情報
|
---|
| 1880 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 1881 |
|
---|
| 1882 | i3=SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_GETCURSEL,0,0);
|
---|
| 1883 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_TOP|BS_BOTTOM|BS_VCENTER);
|
---|
| 1884 | if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_TOP;
|
---|
| 1885 | else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BOTTOM;
|
---|
| 1886 | else if(i3==3) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_VCENTER;
|
---|
| 1887 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 1888 | return 1;
|
---|
| 1889 | }
|
---|
| 1890 | break;
|
---|
| 1891 |
|
---|
| 1892 | case IDC_EXSTYLE:
|
---|
| 1893 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,DlgRadProperty_Item_ExStyle)) return 1;
|
---|
| 1894 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 1895 | return 1;
|
---|
| 1896 | }
|
---|
| 1897 | }
|
---|
| 1898 | return 0;
|
---|
| 1899 | }
|
---|
| 1900 |
|
---|
| 1901 |
|
---|
| 1902 | ///////////////////////
|
---|
| 1903 | // COMBOBOX プロパティ
|
---|
| 1904 |
|
---|
| 1905 | void RadProperty_ComboBox_StylingOrder(HWND hwnd,DWORD *style){
|
---|
| 1906 | if(!(*style&(CBS_OWNERDRAWFIXED|CBS_OWNERDRAWVARIABLE))){
|
---|
| 1907 | *style&=~(CBS_HASSTRINGS);
|
---|
| 1908 | SendDlgItemMessage(hwnd,IDC_CBS_HASSTRINGS,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 1909 | EnableWindow(GetDlgItem(hwnd,IDC_CBS_HASSTRINGS),0);
|
---|
| 1910 | }
|
---|
| 1911 | else EnableWindow(GetDlgItem(hwnd,IDC_CBS_HASSTRINGS),1);
|
---|
| 1912 | }
|
---|
| 1913 | BOOL CALLBACK RadProperty_ComboBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 1914 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 1915 | extern PROJECTINFO ProjectInfo;
|
---|
| 1916 | int i,i2,i3;
|
---|
| 1917 | static BOOL bInitial;
|
---|
| 1918 |
|
---|
| 1919 | switch(message){
|
---|
| 1920 | case WM_INITDIALOG:
|
---|
| 1921 | bInitial=1;
|
---|
| 1922 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 1923 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 1924 |
|
---|
| 1925 | SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
| 1926 |
|
---|
| 1927 |
|
---|
| 1928 | /////////////////////////////////
|
---|
| 1929 | // スタイル
|
---|
| 1930 | ////////////
|
---|
| 1931 |
|
---|
| 1932 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1933 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1934 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1935 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1936 |
|
---|
| 1937 | ////////
|
---|
| 1938 | // 選択
|
---|
| 1939 | ////////
|
---|
| 1940 |
|
---|
| 1941 | //"デフォルト"
|
---|
| 1942 | SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_ADDSTRING,0,(long)STRING_DEFAULT);
|
---|
| 1943 | //"ドロップ ダウン"
|
---|
| 1944 | SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_ADDSTRING,0,(long)STRING_COMBOBOXPROP_STYLE_DROPDOWN);
|
---|
| 1945 | //"ドロップ ダウン リスト"
|
---|
| 1946 | SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_ADDSTRING,0,(long)STRING_COMBOBOXPROP_STYLE_DROPDOWNLIST);
|
---|
| 1947 |
|
---|
| 1948 | //ビットを考慮してCBS_DROPDOWNLISTを最初に比較する
|
---|
| 1949 | if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_DROPDOWNLIST)==CBS_DROPDOWNLIST) SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_SETCURSEL,2,0);
|
---|
| 1950 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_SIMPLE) SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_SETCURSEL,0,0);
|
---|
| 1951 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_DROPDOWN) SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_SETCURSEL,1,0);
|
---|
| 1952 |
|
---|
| 1953 |
|
---|
| 1954 | ////////////////
|
---|
| 1955 | // オーナー描画
|
---|
| 1956 | ////////////////
|
---|
| 1957 |
|
---|
| 1958 | //"なし"
|
---|
| 1959 | SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_NONE);
|
---|
| 1960 | //"固定"
|
---|
| 1961 | SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_OWNERDRAW_FIXED);
|
---|
| 1962 | //"可変"
|
---|
| 1963 | SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_OWNERDRAW_VARIABLE);
|
---|
| 1964 |
|
---|
| 1965 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_OWNERDRAWFIXED) SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_SETCURSEL,1,0);
|
---|
| 1966 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_OWNERDRAWVARIABLE) SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_SETCURSEL,2,0);
|
---|
| 1967 | else SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_SETCURSEL,0,0);
|
---|
| 1968 |
|
---|
| 1969 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_HASSTRINGS) SendDlgItemMessage(hwnd,IDC_CBS_HASSTRINGS,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1970 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_SORT) SendDlgItemMessage(hwnd,IDC_CBS_SORT,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1971 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_NOINTEGRALHEIGHT) SendDlgItemMessage(hwnd,IDC_CBS_NOINTEGRALHEIGHT,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1972 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_OEMCONVERT) SendDlgItemMessage(hwnd,IDC_CBS_OEMCONVERT,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1973 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1974 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_AUTOHSCROLL) SendDlgItemMessage(hwnd,IDC_CBS_AUTOHSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1975 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_DISABLENOSCROLL) SendDlgItemMessage(hwnd,IDC_CBS_DISABLENOSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1976 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_UPPERCASE) SendDlgItemMessage(hwnd,IDC_CBS_UPPERCASE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1977 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&CBS_LOWERCASE) SendDlgItemMessage(hwnd,IDC_CBS_LOWERCASE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 1978 |
|
---|
| 1979 | RadProperty_ComboBox_StylingOrder(hwnd,&ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 1980 |
|
---|
| 1981 |
|
---|
| 1982 | bInitial=0;
|
---|
| 1983 | break;
|
---|
| 1984 | case WM_COMMAND:
|
---|
| 1985 |
|
---|
| 1986 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 1987 | if(i==-1) return 1;
|
---|
| 1988 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 1989 |
|
---|
| 1990 | //共通スタイル
|
---|
| 1991 | if(bInitial==0){
|
---|
| 1992 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
| 1993 | }
|
---|
| 1994 |
|
---|
| 1995 | switch(LOWORD(wParam)){
|
---|
| 1996 | case IDC_CBS_TYPE:
|
---|
| 1997 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 1998 | //変更情報
|
---|
| 1999 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2000 |
|
---|
| 2001 | i3=SendDlgItemMessage(hwnd,IDC_CBS_TYPE,CB_GETCURSEL,0,0);
|
---|
| 2002 | //CBS_DROPDOWNLIST=CBS_SIMPLE | CBS_DROPDOWN
|
---|
| 2003 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(CBS_DROPDOWNLIST);
|
---|
| 2004 | if(i3==0) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_SIMPLE;
|
---|
| 2005 | else if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_DROPDOWN;
|
---|
| 2006 | else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_DROPDOWNLIST;
|
---|
| 2007 |
|
---|
| 2008 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 2009 | return 1;
|
---|
| 2010 | }
|
---|
| 2011 | break;
|
---|
| 2012 | case IDC_CBS_OWNERDRAW:
|
---|
| 2013 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 2014 | //変更情報
|
---|
| 2015 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2016 |
|
---|
| 2017 | i3=SendDlgItemMessage(hwnd,IDC_CBS_OWNERDRAW,CB_GETCURSEL,0,0);
|
---|
| 2018 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(CBS_OWNERDRAWFIXED|CBS_OWNERDRAWVARIABLE);
|
---|
| 2019 | if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_OWNERDRAWFIXED;
|
---|
| 2020 | else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_OWNERDRAWVARIABLE;
|
---|
| 2021 |
|
---|
| 2022 | RadProperty_ComboBox_StylingOrder(hwnd,&ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2023 | return 1;
|
---|
| 2024 | }
|
---|
| 2025 | break;
|
---|
| 2026 |
|
---|
| 2027 | case IDC_CBS_HASSTRINGS:
|
---|
| 2028 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2029 | //変更情報
|
---|
| 2030 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2031 |
|
---|
| 2032 | if(SendDlgItemMessage(hwnd,IDC_CBS_HASSTRINGS,BM_GETCHECK,0,0))
|
---|
| 2033 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_HASSTRINGS;
|
---|
| 2034 | else
|
---|
| 2035 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_HASSTRINGS;
|
---|
| 2036 | return 1;
|
---|
| 2037 | }
|
---|
| 2038 | break;
|
---|
| 2039 | case IDC_CBS_SORT:
|
---|
| 2040 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2041 | //変更情報
|
---|
| 2042 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2043 |
|
---|
| 2044 | if(SendDlgItemMessage(hwnd,IDC_CBS_SORT,BM_GETCHECK,0,0))
|
---|
| 2045 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_SORT;
|
---|
| 2046 | else
|
---|
| 2047 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_SORT;
|
---|
| 2048 | return 1;
|
---|
| 2049 | }
|
---|
| 2050 | break;
|
---|
| 2051 | case IDC_CBS_NOINTEGRALHEIGHT:
|
---|
| 2052 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2053 | //変更情報
|
---|
| 2054 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2055 |
|
---|
| 2056 | if(SendDlgItemMessage(hwnd,IDC_CBS_NOINTEGRALHEIGHT,BM_GETCHECK,0,0))
|
---|
| 2057 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_NOINTEGRALHEIGHT;
|
---|
| 2058 | else
|
---|
| 2059 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_NOINTEGRALHEIGHT;
|
---|
| 2060 | return 1;
|
---|
| 2061 | }
|
---|
| 2062 | break;
|
---|
| 2063 | case IDC_CBS_OEMCONVERT:
|
---|
| 2064 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2065 | //変更情報
|
---|
| 2066 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2067 |
|
---|
| 2068 | if(SendDlgItemMessage(hwnd,IDC_CBS_OEMCONVERT,BM_GETCHECK,0,0))
|
---|
| 2069 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_OEMCONVERT;
|
---|
| 2070 | else
|
---|
| 2071 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_OEMCONVERT;
|
---|
| 2072 | return 1;
|
---|
| 2073 | }
|
---|
| 2074 | break;
|
---|
| 2075 | case IDC_STYLE_VSCROLL:
|
---|
| 2076 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2077 | //変更情報
|
---|
| 2078 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2079 |
|
---|
| 2080 | if(SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_GETCHECK,0,0))
|
---|
| 2081 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=WS_VSCROLL;
|
---|
| 2082 | else
|
---|
| 2083 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~WS_VSCROLL;
|
---|
| 2084 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 2085 | return 1;
|
---|
| 2086 | }
|
---|
| 2087 | break;
|
---|
| 2088 | case IDC_CBS_AUTOHSCROLL:
|
---|
| 2089 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2090 | //変更情報
|
---|
| 2091 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2092 |
|
---|
| 2093 | if(SendDlgItemMessage(hwnd,IDC_CBS_AUTOHSCROLL,BM_GETCHECK,0,0))
|
---|
| 2094 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_AUTOHSCROLL;
|
---|
| 2095 | else
|
---|
| 2096 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_AUTOHSCROLL;
|
---|
| 2097 | return 1;
|
---|
| 2098 | }
|
---|
| 2099 | break;
|
---|
| 2100 | case IDC_CBS_DISABLENOSCROLL:
|
---|
| 2101 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2102 | //変更情報
|
---|
| 2103 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2104 |
|
---|
| 2105 | if(SendDlgItemMessage(hwnd,IDC_CBS_DISABLENOSCROLL,BM_GETCHECK,0,0))
|
---|
| 2106 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_DISABLENOSCROLL;
|
---|
| 2107 | else
|
---|
| 2108 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_DISABLENOSCROLL;
|
---|
| 2109 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 2110 | return 1;
|
---|
| 2111 | }
|
---|
| 2112 | break;
|
---|
| 2113 | case IDC_CBS_UPPERCASE:
|
---|
| 2114 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2115 | //変更情報
|
---|
| 2116 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2117 |
|
---|
| 2118 | if(SendDlgItemMessage(hwnd,IDC_CBS_UPPERCASE,BM_GETCHECK,0,0))
|
---|
| 2119 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_UPPERCASE;
|
---|
| 2120 | else
|
---|
| 2121 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_UPPERCASE;
|
---|
| 2122 | return 1;
|
---|
| 2123 | }
|
---|
| 2124 | break;
|
---|
| 2125 | case IDC_CBS_LOWERCASE:
|
---|
| 2126 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2127 | //変更情報
|
---|
| 2128 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2129 |
|
---|
| 2130 | if(SendDlgItemMessage(hwnd,IDC_CBS_LOWERCASE,BM_GETCHECK,0,0))
|
---|
| 2131 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=CBS_LOWERCASE;
|
---|
| 2132 | else
|
---|
| 2133 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~CBS_LOWERCASE;
|
---|
| 2134 | return 1;
|
---|
| 2135 | }
|
---|
| 2136 | break;
|
---|
| 2137 |
|
---|
| 2138 | case IDC_EXSTYLE:
|
---|
| 2139 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,DlgRadProperty_Item_ExStyle)) return 1;
|
---|
| 2140 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 2141 | return 1;
|
---|
| 2142 | }
|
---|
| 2143 | break;
|
---|
| 2144 | }
|
---|
| 2145 | return 0;
|
---|
| 2146 | }
|
---|
| 2147 |
|
---|
| 2148 |
|
---|
| 2149 | /////////////////////
|
---|
| 2150 | // EDIT プロパティ
|
---|
| 2151 |
|
---|
| 2152 | void RadProperty_Edit_StylingOrder(HWND hwnd,DWORD *style){
|
---|
| 2153 | if(*style&ES_MULTILINE){
|
---|
| 2154 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_HSCROLL),1);
|
---|
| 2155 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_VSCROLL),1);
|
---|
| 2156 | EnableWindow(GetDlgItem(hwnd,IDC_ES_AUTOVSCROLL),1);
|
---|
| 2157 |
|
---|
| 2158 | *style&=~(ES_PASSWORD);
|
---|
| 2159 | SendDlgItemMessage(hwnd,IDC_ES_PASSWORD,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 2160 | EnableWindow(GetDlgItem(hwnd,IDC_ES_PASSWORD),0);
|
---|
| 2161 | }
|
---|
| 2162 | else{
|
---|
| 2163 | EnableWindow(GetDlgItem(hwnd,IDC_ES_PASSWORD),1);
|
---|
| 2164 |
|
---|
| 2165 | *style&=~(WS_HSCROLL|WS_VSCROLL|ES_AUTOVSCROLL);
|
---|
| 2166 | SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLL,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 2167 | SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 2168 | SendDlgItemMessage(hwnd,IDC_ES_AUTOVSCROLL,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 2169 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_HSCROLL),0);
|
---|
| 2170 | EnableWindow(GetDlgItem(hwnd,IDC_STYLE_VSCROLL),0);
|
---|
| 2171 | EnableWindow(GetDlgItem(hwnd,IDC_ES_AUTOVSCROLL),0);
|
---|
| 2172 | }
|
---|
| 2173 | }
|
---|
| 2174 | BOOL CALLBACK RadProperty_EditProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 2175 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 2176 | extern PROJECTINFO ProjectInfo;
|
---|
| 2177 | int i,i2,i3;
|
---|
| 2178 | static BOOL bInitial;
|
---|
| 2179 |
|
---|
| 2180 | switch(message){
|
---|
| 2181 | case WM_INITDIALOG:
|
---|
| 2182 | bInitial=1;
|
---|
| 2183 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 2184 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 2185 |
|
---|
| 2186 | SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
| 2187 | SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
|
---|
| 2188 |
|
---|
| 2189 |
|
---|
| 2190 | ////////////
|
---|
| 2191 | // スタイル
|
---|
| 2192 | ////////////
|
---|
| 2193 |
|
---|
| 2194 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2195 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2196 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2197 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2198 |
|
---|
| 2199 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_MULTILINE) SendDlgItemMessage(hwnd,IDC_ES_MULTILINE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2200 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_NUMBER) SendDlgItemMessage(hwnd,IDC_ES_NUMBER,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2201 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_HSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2202 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_AUTOHSCROLL) SendDlgItemMessage(hwnd,IDC_ES_AUTOHSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2203 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2204 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_AUTOVSCROLL) SendDlgItemMessage(hwnd,IDC_ES_AUTOVSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2205 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_PASSWORD) SendDlgItemMessage(hwnd,IDC_ES_PASSWORD,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2206 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_NOHIDESEL) SendDlgItemMessage(hwnd,IDC_ES_NOHIDESEL,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2207 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_OEMCONVERT) SendDlgItemMessage(hwnd,IDC_ES_OEMCONVERT,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2208 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_WANTRETURN) SendDlgItemMessage(hwnd,IDC_ES_WANTRETURN,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2209 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_UPPERCASE) SendDlgItemMessage(hwnd,IDC_ES_UPPERCASE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2210 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_LOWERCASE) SendDlgItemMessage(hwnd,IDC_ES_LOWERCASE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2211 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_READONLY) SendDlgItemMessage(hwnd,IDC_ES_READONLY,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2212 |
|
---|
| 2213 |
|
---|
| 2214 | //////////////////
|
---|
| 2215 | // テキストの配置
|
---|
| 2216 | //////////////////
|
---|
| 2217 |
|
---|
| 2218 | //"左端"
|
---|
| 2219 | SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_ADDSTRING,0,(long)STRING_LEFT);
|
---|
| 2220 | //"中央"
|
---|
| 2221 | SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
|
---|
| 2222 | //"右端"
|
---|
| 2223 | SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_ADDSTRING,0,(long)STRING_RIGHT);
|
---|
| 2224 |
|
---|
| 2225 | //ビットを考慮してES_LEFTを最後に検討する
|
---|
| 2226 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_CENTER) SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_SETCURSEL,1,0);
|
---|
| 2227 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&ES_RIGHT) SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_SETCURSEL,2,0);
|
---|
| 2228 | else SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_SETCURSEL,0,0);
|
---|
| 2229 |
|
---|
| 2230 | RadProperty_Edit_StylingOrder(hwnd,&ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2231 |
|
---|
| 2232 |
|
---|
| 2233 | bInitial=0;
|
---|
| 2234 | break;
|
---|
| 2235 | case WM_COMMAND:
|
---|
| 2236 |
|
---|
| 2237 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 2238 | if(i==-1) return 1;
|
---|
| 2239 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 2240 |
|
---|
| 2241 | //共通スタイル
|
---|
| 2242 | if(bInitial==0){
|
---|
| 2243 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
| 2244 | }
|
---|
| 2245 |
|
---|
| 2246 | switch(LOWORD(wParam)){
|
---|
| 2247 | case IDC_ES_MULTILINE:
|
---|
| 2248 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2249 | //変更情報
|
---|
| 2250 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2251 |
|
---|
| 2252 | if(SendDlgItemMessage(hwnd,IDC_ES_MULTILINE,BM_GETCHECK,0,0))
|
---|
| 2253 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_MULTILINE;
|
---|
| 2254 | else
|
---|
| 2255 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_MULTILINE;
|
---|
| 2256 | RadProperty_Edit_StylingOrder(hwnd,&ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2257 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 2258 | return 1;
|
---|
| 2259 | }
|
---|
| 2260 | break;
|
---|
| 2261 | case IDC_ES_NUMBER:
|
---|
| 2262 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2263 | //変更情報
|
---|
| 2264 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2265 |
|
---|
| 2266 | if(SendDlgItemMessage(hwnd,IDC_ES_NUMBER,BM_GETCHECK,0,0))
|
---|
| 2267 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_NUMBER;
|
---|
| 2268 | else
|
---|
| 2269 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_NUMBER;
|
---|
| 2270 | return 1;
|
---|
| 2271 | }
|
---|
| 2272 | break;
|
---|
| 2273 | case IDC_STYLE_HSCROLL:
|
---|
| 2274 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2275 | //変更情報
|
---|
| 2276 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2277 |
|
---|
| 2278 | if(SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLL,BM_GETCHECK,0,0))
|
---|
| 2279 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=WS_HSCROLL;
|
---|
| 2280 | else
|
---|
| 2281 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~WS_HSCROLL;
|
---|
| 2282 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 2283 | return 1;
|
---|
| 2284 | }
|
---|
| 2285 | break;
|
---|
| 2286 | case IDC_ES_AUTOHSCROLL:
|
---|
| 2287 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2288 | //変更情報
|
---|
| 2289 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2290 |
|
---|
| 2291 | if(SendDlgItemMessage(hwnd,IDC_ES_AUTOHSCROLL,BM_GETCHECK,0,0))
|
---|
| 2292 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_AUTOHSCROLL;
|
---|
| 2293 | else
|
---|
| 2294 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_AUTOHSCROLL;
|
---|
| 2295 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 2296 | return 1;
|
---|
| 2297 | }
|
---|
| 2298 | break;
|
---|
| 2299 | case IDC_STYLE_VSCROLL:
|
---|
| 2300 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2301 | //変更情報
|
---|
| 2302 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2303 |
|
---|
| 2304 | if(SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_GETCHECK,0,0))
|
---|
| 2305 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=WS_VSCROLL;
|
---|
| 2306 | else
|
---|
| 2307 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~WS_VSCROLL;
|
---|
| 2308 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 2309 | return 1;
|
---|
| 2310 | }
|
---|
| 2311 | break;
|
---|
| 2312 | case IDC_ES_AUTOVSCROLL:
|
---|
| 2313 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2314 | //変更情報
|
---|
| 2315 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2316 |
|
---|
| 2317 | if(SendDlgItemMessage(hwnd,IDC_ES_AUTOVSCROLL,BM_GETCHECK,0,0))
|
---|
| 2318 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_AUTOVSCROLL;
|
---|
| 2319 | else
|
---|
| 2320 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_AUTOVSCROLL;
|
---|
| 2321 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 2322 | return 1;
|
---|
| 2323 | }
|
---|
| 2324 | break;
|
---|
| 2325 | case IDC_ES_PASSWORD:
|
---|
| 2326 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2327 | //変更情報
|
---|
| 2328 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2329 |
|
---|
| 2330 | if(SendDlgItemMessage(hwnd,IDC_ES_PASSWORD,BM_GETCHECK,0,0))
|
---|
| 2331 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_PASSWORD;
|
---|
| 2332 | else
|
---|
| 2333 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_PASSWORD;
|
---|
| 2334 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 2335 | return 1;
|
---|
| 2336 | }
|
---|
| 2337 | break;
|
---|
| 2338 | case IDC_ES_NOHIDESEL:
|
---|
| 2339 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2340 | //変更情報
|
---|
| 2341 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2342 |
|
---|
| 2343 | if(SendDlgItemMessage(hwnd,IDC_ES_NOHIDESEL,BM_GETCHECK,0,0))
|
---|
| 2344 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_NOHIDESEL;
|
---|
| 2345 | else
|
---|
| 2346 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_NOHIDESEL;
|
---|
| 2347 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 2348 | return 1;
|
---|
| 2349 | }
|
---|
| 2350 | break;
|
---|
| 2351 | case IDC_ES_OEMCONVERT:
|
---|
| 2352 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2353 | //変更情報
|
---|
| 2354 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2355 |
|
---|
| 2356 | if(SendDlgItemMessage(hwnd,IDC_ES_OEMCONVERT,BM_GETCHECK,0,0))
|
---|
| 2357 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_OEMCONVERT;
|
---|
| 2358 | else
|
---|
| 2359 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_OEMCONVERT;
|
---|
| 2360 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 2361 | return 1;
|
---|
| 2362 | }
|
---|
| 2363 | break;
|
---|
| 2364 | case IDC_ES_WANTRETURN:
|
---|
| 2365 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2366 | //変更情報
|
---|
| 2367 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2368 |
|
---|
| 2369 | if(SendDlgItemMessage(hwnd,IDC_ES_WANTRETURN,BM_GETCHECK,0,0))
|
---|
| 2370 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_WANTRETURN;
|
---|
| 2371 | else
|
---|
| 2372 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_WANTRETURN;
|
---|
| 2373 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 2374 | return 1;
|
---|
| 2375 | }
|
---|
| 2376 | break;
|
---|
| 2377 | case IDC_ES_UPPERCASE:
|
---|
| 2378 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2379 | //変更情報
|
---|
| 2380 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2381 |
|
---|
| 2382 | if(SendDlgItemMessage(hwnd,IDC_ES_UPPERCASE,BM_GETCHECK,0,0)){
|
---|
| 2383 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_LOWERCASE;
|
---|
| 2384 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_UPPERCASE;
|
---|
| 2385 | SendDlgItemMessage(hwnd,IDC_ES_LOWERCASE,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 2386 | }
|
---|
| 2387 | else
|
---|
| 2388 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_UPPERCASE;
|
---|
| 2389 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 2390 | return 1;
|
---|
| 2391 | }
|
---|
| 2392 | break;
|
---|
| 2393 | case IDC_ES_LOWERCASE:
|
---|
| 2394 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2395 | //変更情報
|
---|
| 2396 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2397 |
|
---|
| 2398 | if(SendDlgItemMessage(hwnd,IDC_ES_LOWERCASE,BM_GETCHECK,0,0)){
|
---|
| 2399 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_UPPERCASE;
|
---|
| 2400 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_LOWERCASE;
|
---|
| 2401 | SendDlgItemMessage(hwnd,IDC_ES_UPPERCASE,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 2402 | }
|
---|
| 2403 | else
|
---|
| 2404 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_LOWERCASE;
|
---|
| 2405 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 2406 | return 1;
|
---|
| 2407 | }
|
---|
| 2408 | break;
|
---|
| 2409 | case IDC_ES_READONLY:
|
---|
| 2410 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2411 | //変更情報
|
---|
| 2412 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2413 |
|
---|
| 2414 | if(SendDlgItemMessage(hwnd,IDC_ES_READONLY,BM_GETCHECK,0,0))
|
---|
| 2415 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_READONLY;
|
---|
| 2416 | else
|
---|
| 2417 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~ES_READONLY;
|
---|
| 2418 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 2419 | return 1;
|
---|
| 2420 | }
|
---|
| 2421 | break;
|
---|
| 2422 |
|
---|
| 2423 | case IDC_ES_TEXTPOS:
|
---|
| 2424 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 2425 | //変更情報
|
---|
| 2426 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2427 |
|
---|
| 2428 | i3=SendDlgItemMessage(hwnd,IDC_ES_TEXTPOS,CB_GETCURSEL,0,0);
|
---|
| 2429 | //ES_LEFT=0
|
---|
| 2430 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(ES_CENTER|ES_RIGHT);
|
---|
| 2431 | if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_CENTER;
|
---|
| 2432 | else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=ES_RIGHT;
|
---|
| 2433 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 2434 | return 1;
|
---|
| 2435 | }
|
---|
| 2436 | break;
|
---|
| 2437 |
|
---|
| 2438 | case IDC_EXSTYLE:
|
---|
| 2439 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,DlgRadProperty_Item_ExStyle)) return 1;
|
---|
| 2440 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 2441 | return 1;
|
---|
| 2442 | }
|
---|
| 2443 | break;
|
---|
| 2444 | }
|
---|
| 2445 | return 0;
|
---|
| 2446 | }
|
---|
| 2447 |
|
---|
| 2448 |
|
---|
| 2449 | ////////////////////////
|
---|
| 2450 | // GROUPBOX プロパティ
|
---|
| 2451 |
|
---|
| 2452 | BOOL CALLBACK RadProperty_GroupBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 2453 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 2454 | extern PROJECTINFO ProjectInfo;
|
---|
| 2455 | int i,i2,i3;
|
---|
| 2456 | static BOOL bInitial;
|
---|
| 2457 |
|
---|
| 2458 | switch(message){
|
---|
| 2459 | case WM_INITDIALOG:
|
---|
| 2460 | bInitial=1;
|
---|
| 2461 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 2462 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 2463 |
|
---|
| 2464 | SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
| 2465 | SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
|
---|
| 2466 |
|
---|
| 2467 |
|
---|
| 2468 | /////////////////////////////
|
---|
| 2469 | // スタイル
|
---|
| 2470 | ////////////
|
---|
| 2471 |
|
---|
| 2472 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2473 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2474 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2475 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2476 |
|
---|
| 2477 |
|
---|
| 2478 | //////////////////
|
---|
| 2479 | // 水平方向の配置
|
---|
| 2480 | //////////////////
|
---|
| 2481 |
|
---|
| 2482 | //"デフォルト"
|
---|
| 2483 | SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_ADDSTRING,0,(long)STRING_DEFAULT);
|
---|
| 2484 | //"左端"
|
---|
| 2485 | SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_ADDSTRING,0,(long)STRING_LEFT);
|
---|
| 2486 | //"右端"
|
---|
| 2487 | SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_ADDSTRING,0,(long)STRING_RIGHT);
|
---|
| 2488 | //"中央"
|
---|
| 2489 | SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_ADDSTRING,0,(long)STRING_CENTER);
|
---|
| 2490 |
|
---|
| 2491 | //ビットを考慮してBS_CENTERを最初に検討する
|
---|
| 2492 | if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_CENTER)==BS_CENTER) SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_SETCURSEL,3,0);
|
---|
| 2493 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_LEFT) SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_SETCURSEL,1,0);
|
---|
| 2494 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_RIGHT) SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_SETCURSEL,2,0);
|
---|
| 2495 | else SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_SETCURSEL,0,0);
|
---|
| 2496 |
|
---|
| 2497 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_ICON) SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2498 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BITMAP) SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2499 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_NOTIFY) SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2500 |
|
---|
| 2501 |
|
---|
| 2502 | bInitial=0;
|
---|
| 2503 | break;
|
---|
| 2504 | case WM_COMMAND:
|
---|
| 2505 |
|
---|
| 2506 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 2507 | if(i==-1) return 1;
|
---|
| 2508 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 2509 |
|
---|
| 2510 | //共通スタイル
|
---|
| 2511 | if(bInitial==0){
|
---|
| 2512 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
| 2513 | }
|
---|
| 2514 |
|
---|
| 2515 | switch(LOWORD(wParam)){
|
---|
| 2516 | case IDC_BS_POSITION:
|
---|
| 2517 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 2518 | //変更情報
|
---|
| 2519 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2520 |
|
---|
| 2521 | i3=SendDlgItemMessage(hwnd,IDC_BS_POSITION,CB_GETCURSEL,0,0);
|
---|
| 2522 | //BS_CENTER=BS_LEFT | BS_RIGHT
|
---|
| 2523 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_CENTER);
|
---|
| 2524 | if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_LEFT;
|
---|
| 2525 | else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_RIGHT;
|
---|
| 2526 | else if(i3==3) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_CENTER;
|
---|
| 2527 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 2528 | return 1;
|
---|
| 2529 | }
|
---|
| 2530 | break;
|
---|
| 2531 |
|
---|
| 2532 | case IDC_BS_ICON:
|
---|
| 2533 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2534 | //変更情報
|
---|
| 2535 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2536 |
|
---|
| 2537 | if(SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_GETCHECK,0,0))
|
---|
| 2538 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_ICON;
|
---|
| 2539 | else
|
---|
| 2540 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON;
|
---|
| 2541 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 2542 | return 1;
|
---|
| 2543 | }
|
---|
| 2544 | break;
|
---|
| 2545 | case IDC_BS_BITMAP:
|
---|
| 2546 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2547 | //変更情報
|
---|
| 2548 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2549 |
|
---|
| 2550 | if(SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_GETCHECK,0,0))
|
---|
| 2551 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BITMAP;
|
---|
| 2552 | else
|
---|
| 2553 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP;
|
---|
| 2554 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 2555 | return 1;
|
---|
| 2556 | }
|
---|
| 2557 | break;
|
---|
| 2558 | case IDC_BS_NOTIFY:
|
---|
| 2559 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2560 | //変更情報
|
---|
| 2561 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2562 |
|
---|
| 2563 | if(SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_GETCHECK,0,0))
|
---|
| 2564 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_NOTIFY;
|
---|
| 2565 | else
|
---|
| 2566 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_NOTIFY;
|
---|
| 2567 | return 1;
|
---|
| 2568 | }
|
---|
| 2569 | break;
|
---|
| 2570 |
|
---|
| 2571 | case IDC_EXSTYLE:
|
---|
| 2572 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,DlgRadProperty_Item_ExStyle)) return 1;
|
---|
| 2573 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 2574 | return 1;
|
---|
| 2575 | }
|
---|
| 2576 | break;
|
---|
| 2577 | }
|
---|
| 2578 | return 0;
|
---|
| 2579 | }
|
---|
| 2580 |
|
---|
| 2581 |
|
---|
| 2582 | ////////////////////////
|
---|
| 2583 | // IMAGEBOX プロパティ
|
---|
| 2584 |
|
---|
| 2585 | void RadProperty_ImageBox_StylingOrder(HWND hwnd,DWORD *style){
|
---|
| 2586 | if((*style&0x000F)==SS_ICON||
|
---|
| 2587 | (*style&0x000F)==SS_BITMAP){
|
---|
| 2588 | EnableWindow(GetDlgItem(hwnd,IDC_PATH),1);
|
---|
| 2589 | EnableWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),1);
|
---|
| 2590 | EnableWindow(GetDlgItem(hwnd,IDC_SS_CENTERIMAGE),1);
|
---|
| 2591 | EnableWindow(GetDlgItem(hwnd,IDC_SS_RIGHTJUST),1);
|
---|
| 2592 | }
|
---|
| 2593 | else{
|
---|
| 2594 | EnableWindow(GetDlgItem(hwnd,IDC_PATH),0);
|
---|
| 2595 | EnableWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),0);
|
---|
| 2596 | EnableWindow(GetDlgItem(hwnd,IDC_SS_CENTERIMAGE),0);
|
---|
| 2597 | EnableWindow(GetDlgItem(hwnd,IDC_SS_RIGHTJUST),0);
|
---|
| 2598 | }
|
---|
| 2599 | }
|
---|
| 2600 | BOOL CALLBACK RadProperty_ImageBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 2601 | extern HANDLE hHeap;
|
---|
| 2602 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 2603 | extern PROJECTINFO ProjectInfo;
|
---|
| 2604 | int i,i2,i3;
|
---|
| 2605 | char temporary[MAX_PATH];
|
---|
| 2606 | static BOOL bInitial;
|
---|
| 2607 |
|
---|
| 2608 | switch(message){
|
---|
| 2609 | case WM_INITDIALOG:
|
---|
| 2610 | bInitial=1;
|
---|
| 2611 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 2612 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 2613 |
|
---|
| 2614 | SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
| 2615 |
|
---|
| 2616 |
|
---|
| 2617 | /////////////////////////////
|
---|
| 2618 | // スタイル
|
---|
| 2619 | ////////////
|
---|
| 2620 |
|
---|
| 2621 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2622 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2623 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2624 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2625 |
|
---|
| 2626 | //////////
|
---|
| 2627 | // タイプ
|
---|
| 2628 | //////////
|
---|
| 2629 |
|
---|
| 2630 | //"フレーム(黒)"
|
---|
| 2631 | SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_FRAME_BLACK);
|
---|
| 2632 | //"フレーム(灰色)"
|
---|
| 2633 | SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_FRAME_GRAY);
|
---|
| 2634 | //"フレーム(白)"
|
---|
| 2635 | SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_FRAME_WHITE);
|
---|
| 2636 | //"フレーム(縁取り)"
|
---|
| 2637 | SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_FRAME_ETCHED);
|
---|
| 2638 | //"四角形(黒)"
|
---|
| 2639 | SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_RECT_BLACK);
|
---|
| 2640 | //"四角形(灰色)"
|
---|
| 2641 | SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_RECT_GRAY);
|
---|
| 2642 | //"四角形(白)"
|
---|
| 2643 | SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_RECT_WHITE);
|
---|
| 2644 | //"アイコン"
|
---|
| 2645 | SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_ICON);
|
---|
| 2646 | //"ビットマップ"
|
---|
| 2647 | SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_ADDSTRING,0,(long)STRING_IMAGEBOXPROP_STYLE_BITMAP);
|
---|
| 2648 |
|
---|
| 2649 | if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BLACKFRAME) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,0,0);
|
---|
| 2650 | else if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_GRAYFRAME) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,1,0);
|
---|
| 2651 | else if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_WHITEFRAME) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,2,0);
|
---|
| 2652 | else if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000001F)==SS_ETCHEDFRAME) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,3,0);
|
---|
| 2653 | else if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BLACKRECT) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,4,0);
|
---|
| 2654 | else if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_GRAYRECT) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,5,0);
|
---|
| 2655 | else if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_WHITERECT) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,6,0);
|
---|
| 2656 | if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_ICON||
|
---|
| 2657 | (ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BITMAP){
|
---|
| 2658 | if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_ICON) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,7,0);
|
---|
| 2659 | else if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BITMAP) SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_SETCURSEL,8,0);
|
---|
| 2660 |
|
---|
| 2661 | //リソース/ファイル スイッチチェックを表示
|
---|
| 2662 | ShowWindow(GetDlgItem(hwnd,IDC_FILE),SW_SHOW);
|
---|
| 2663 | ShowWindow(GetDlgItem(hwnd,IDC_RESOURCE),SW_SHOW);
|
---|
| 2664 |
|
---|
| 2665 | //イメージ状態テキストを表示
|
---|
| 2666 | ShowWindow(GetDlgItem(hwnd,IDC_IMAGE_SITUATION),SW_SHOW);
|
---|
| 2667 |
|
---|
| 2668 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type==IMGTYPE_FILE){
|
---|
| 2669 | //ファイル指定を表示
|
---|
| 2670 | ShowWindow(GetDlgItem(hwnd,IDC_PATH),SW_SHOW);
|
---|
| 2671 | ShowWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),SW_SHOW);
|
---|
| 2672 | SetDlgItemText(hwnd,IDC_PATH,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path);
|
---|
| 2673 |
|
---|
| 2674 | //イメージ状態テキスト
|
---|
| 2675 | //"ファイル指定:"
|
---|
| 2676 | SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMFILE);
|
---|
| 2677 |
|
---|
| 2678 | SendDlgItemMessage(hwnd,IDC_FILE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2679 | }
|
---|
| 2680 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type==IMGTYPE_RES){
|
---|
| 2681 | //リソース指定を表示
|
---|
| 2682 | ShowWindow(GetDlgItem(hwnd,IDC_RESCOMBO),SW_SHOW);
|
---|
| 2683 |
|
---|
| 2684 | //イメージ状態テキスト
|
---|
| 2685 | //"リソース指定:"
|
---|
| 2686 | SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMRESOURCE);
|
---|
| 2687 |
|
---|
| 2688 | SendDlgItemMessage(hwnd,IDC_RESOURCE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2689 |
|
---|
| 2690 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_RESETCONTENT,0,0);
|
---|
| 2691 |
|
---|
| 2692 | if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_ICON){
|
---|
| 2693 | //アイコンリソースをコンボボックスに挿入
|
---|
| 2694 | for(i3=0;i3<ProjectInfo.res.NumberOfIconRes;i3++)
|
---|
| 2695 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)ProjectInfo.res.pIconResInfo[i3].IdName);
|
---|
| 2696 | }
|
---|
| 2697 | else if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BITMAP){
|
---|
| 2698 | //ビットマップリソースをコンボボックスに挿入
|
---|
| 2699 | for(i3=0;i3<ProjectInfo.res.NumberOfBitmapRes;i3++)
|
---|
| 2700 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)ProjectInfo.res.pBitmapResInfo[i3].IdName);
|
---|
| 2701 | }
|
---|
| 2702 |
|
---|
| 2703 | //リストから選択
|
---|
| 2704 | i3=SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_FINDSTRING,0,(long)ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path);
|
---|
| 2705 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_SETCURSEL,i3,0);
|
---|
| 2706 | }
|
---|
| 2707 | }
|
---|
| 2708 |
|
---|
| 2709 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_NOTIFY) SendDlgItemMessage(hwnd,IDC_SS_NOTIFY,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2710 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_CENTERIMAGE) SendDlgItemMessage(hwnd,IDC_SS_CENTERIMAGE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2711 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_RIGHTJUST) SendDlgItemMessage(hwnd,IDC_SS_RIGHTJUST,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2712 |
|
---|
| 2713 | RadProperty_ImageBox_StylingOrder(hwnd,&ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2714 |
|
---|
| 2715 | bInitial=0;
|
---|
| 2716 | break;
|
---|
| 2717 | case WM_COMMAND:
|
---|
| 2718 |
|
---|
| 2719 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 2720 | if(i==-1) return 1;
|
---|
| 2721 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 2722 |
|
---|
| 2723 | //共通スタイル
|
---|
| 2724 | if(bInitial==0){
|
---|
| 2725 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
| 2726 | }
|
---|
| 2727 |
|
---|
| 2728 | switch(LOWORD(wParam)){
|
---|
| 2729 | case IDC_IMAGE_TYPE:
|
---|
| 2730 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 2731 | //変更情報
|
---|
| 2732 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2733 |
|
---|
| 2734 | i3=SendDlgItemMessage(hwnd,IDC_IMAGE_TYPE,CB_GETCURSEL,0,0);
|
---|
| 2735 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(0x0000001F);
|
---|
| 2736 | if(i3==0) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_BLACKFRAME;
|
---|
| 2737 | else if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_GRAYFRAME;
|
---|
| 2738 | else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_WHITEFRAME;
|
---|
| 2739 | else if(i3==3) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_ETCHEDFRAME;
|
---|
| 2740 | else if(i3==4) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_BLACKRECT;
|
---|
| 2741 | else if(i3==5) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_GRAYRECT;
|
---|
| 2742 | else if(i3==6) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_WHITERECT;
|
---|
| 2743 | else if(i3==7) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_ICON;
|
---|
| 2744 | else if(i3==8) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_BITMAP;
|
---|
| 2745 |
|
---|
| 2746 | if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_ICON||
|
---|
| 2747 | (ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BITMAP){
|
---|
| 2748 | //リソース/ファイル スイッチチェックを表示
|
---|
| 2749 | ShowWindow(GetDlgItem(hwnd,IDC_FILE),SW_SHOW);
|
---|
| 2750 | ShowWindow(GetDlgItem(hwnd,IDC_RESOURCE),SW_SHOW);
|
---|
| 2751 |
|
---|
| 2752 | //イメージ状態テキストを表示
|
---|
| 2753 | ShowWindow(GetDlgItem(hwnd,IDC_IMAGE_SITUATION),SW_SHOW);
|
---|
| 2754 |
|
---|
| 2755 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type==IMGTYPE_FILE){
|
---|
| 2756 | //ファイル指定を表示
|
---|
| 2757 | ShowWindow(GetDlgItem(hwnd,IDC_PATH),SW_SHOW);
|
---|
| 2758 | ShowWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),SW_SHOW);
|
---|
| 2759 | SetDlgItemText(hwnd,IDC_PATH,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path);
|
---|
| 2760 |
|
---|
| 2761 | //イメージ状態テキスト
|
---|
| 2762 | //"ファイル指定:"
|
---|
| 2763 | SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMFILE);
|
---|
| 2764 |
|
---|
| 2765 | SendDlgItemMessage(hwnd,IDC_FILE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2766 | }
|
---|
| 2767 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type==IMGTYPE_RES){
|
---|
| 2768 | //リソース指定を表示
|
---|
| 2769 | ShowWindow(GetDlgItem(hwnd,IDC_RESCOMBO),SW_SHOW);
|
---|
| 2770 |
|
---|
| 2771 | //イメージ状態テキスト
|
---|
| 2772 | //"リソース指定:"
|
---|
| 2773 | SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMRESOURCE);
|
---|
| 2774 |
|
---|
| 2775 | SendDlgItemMessage(hwnd,IDC_RESOURCE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2776 |
|
---|
| 2777 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_RESETCONTENT,0,0);
|
---|
| 2778 |
|
---|
| 2779 | if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_ICON){
|
---|
| 2780 | //アイコンリソースをコンボボックスに挿入
|
---|
| 2781 | for(i3=0;i3<ProjectInfo.res.NumberOfIconRes;i3++){
|
---|
| 2782 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)ProjectInfo.res.pIconResInfo[i3].IdName);
|
---|
| 2783 |
|
---|
| 2784 | if(lstrcmp(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path,ProjectInfo.res.pIconResInfo[i3].IdName)==0)
|
---|
| 2785 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_SETCURSEL,i3,0);
|
---|
| 2786 | }
|
---|
| 2787 | }
|
---|
| 2788 | else if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BITMAP){
|
---|
| 2789 | //ビットマップリソースをコンボボックスに挿入
|
---|
| 2790 | for(i3=0;i3<ProjectInfo.res.NumberOfBitmapRes;i3++){
|
---|
| 2791 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)ProjectInfo.res.pBitmapResInfo[i3].IdName);
|
---|
| 2792 |
|
---|
| 2793 | if(lstrcmp(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path,ProjectInfo.res.pBitmapResInfo[i3].IdName)==0)
|
---|
| 2794 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_SETCURSEL,i3,0);
|
---|
| 2795 | }
|
---|
| 2796 | }
|
---|
| 2797 | }
|
---|
| 2798 | }
|
---|
| 2799 | else{
|
---|
| 2800 | //リソース/ファイル スイッチチェックを非表示
|
---|
| 2801 | ShowWindow(GetDlgItem(hwnd,IDC_FILE),SW_HIDE);
|
---|
| 2802 | ShowWindow(GetDlgItem(hwnd,IDC_RESOURCE),SW_HIDE);
|
---|
| 2803 |
|
---|
| 2804 | //イメージ状態テキストを非表示
|
---|
| 2805 | ShowWindow(GetDlgItem(hwnd,IDC_IMAGE_SITUATION),SW_HIDE);
|
---|
| 2806 |
|
---|
| 2807 | //ファイル指定を非表示
|
---|
| 2808 | ShowWindow(GetDlgItem(hwnd,IDC_PATH),SW_HIDE);
|
---|
| 2809 | ShowWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),SW_HIDE);
|
---|
| 2810 |
|
---|
| 2811 | //リソース指定を非表示
|
---|
| 2812 | ShowWindow(GetDlgItem(hwnd,IDC_RESCOMBO),SW_HIDE);
|
---|
| 2813 | }
|
---|
| 2814 |
|
---|
| 2815 | RadProperty_ImageBox_StylingOrder(hwnd,&ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2816 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 2817 | return 1;
|
---|
| 2818 | }
|
---|
| 2819 | break;
|
---|
| 2820 |
|
---|
| 2821 | case IDC_FILE:
|
---|
| 2822 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type==IMGTYPE_FILE){
|
---|
| 2823 | //変更無し
|
---|
| 2824 | break;
|
---|
| 2825 | }
|
---|
| 2826 |
|
---|
| 2827 | //変更情報
|
---|
| 2828 | Rad_NoticeChanging(i,RAD_UNDO_IMAGESTATE,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo);
|
---|
| 2829 |
|
---|
| 2830 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type=IMGTYPE_FILE;
|
---|
| 2831 |
|
---|
| 2832 | //ファイル指定を表示
|
---|
| 2833 | ShowWindow(GetDlgItem(hwnd,IDC_PATH),SW_SHOW);
|
---|
| 2834 | ShowWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),SW_SHOW);
|
---|
| 2835 | SetDlgItemText(hwnd,IDC_PATH,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path);
|
---|
| 2836 |
|
---|
| 2837 | //リソース指定を非表示
|
---|
| 2838 | ShowWindow(GetDlgItem(hwnd,IDC_RESCOMBO),SW_HIDE);
|
---|
| 2839 |
|
---|
| 2840 | //イメージ状態テキスト
|
---|
| 2841 | //"ファイル指定:"
|
---|
| 2842 | SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMFILE);
|
---|
| 2843 |
|
---|
| 2844 | SendDlgItemMessage(hwnd,IDC_FILE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2845 | break;
|
---|
| 2846 |
|
---|
| 2847 | case IDC_RESOURCE:
|
---|
| 2848 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type==IMGTYPE_RES){
|
---|
| 2849 | //変更無し
|
---|
| 2850 | break;
|
---|
| 2851 | }
|
---|
| 2852 |
|
---|
| 2853 | //変更情報
|
---|
| 2854 | Rad_NoticeChanging(i,RAD_UNDO_IMAGESTATE,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo);
|
---|
| 2855 |
|
---|
| 2856 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type=IMGTYPE_RES;
|
---|
| 2857 |
|
---|
| 2858 | //ファイル指定を非表示
|
---|
| 2859 | ShowWindow(GetDlgItem(hwnd,IDC_PATH),SW_HIDE);
|
---|
| 2860 | ShowWindow(GetDlgItem(hwnd,IDC_CHANGEPATH),SW_HIDE);
|
---|
| 2861 |
|
---|
| 2862 | //リソース指定を表示
|
---|
| 2863 | ShowWindow(GetDlgItem(hwnd,IDC_RESCOMBO),SW_SHOW);
|
---|
| 2864 |
|
---|
| 2865 | //イメージ状態テキスト
|
---|
| 2866 | //"リソース指定:"
|
---|
| 2867 | SetDlgItemText(hwnd,IDC_IMAGE_SITUATION,STRING_IMAGEBOXPROP_STYLE_FROMRESOURCE);
|
---|
| 2868 |
|
---|
| 2869 | SendDlgItemMessage(hwnd,IDC_RESOURCE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 2870 |
|
---|
| 2871 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_RESETCONTENT,0,0);
|
---|
| 2872 |
|
---|
| 2873 | if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_ICON){
|
---|
| 2874 | //アイコンリソースをコンボボックスに挿入
|
---|
| 2875 | for(i3=0;i3<ProjectInfo.res.NumberOfIconRes;i3++)
|
---|
| 2876 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)ProjectInfo.res.pIconResInfo[i3].IdName);
|
---|
| 2877 | }
|
---|
| 2878 | else if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x0000000F)==SS_BITMAP){
|
---|
| 2879 | //ビットマップリソースをコンボボックスに挿入
|
---|
| 2880 | for(i3=0;i3<ProjectInfo.res.NumberOfBitmapRes;i3++)
|
---|
| 2881 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_ADDSTRING,0,(long)ProjectInfo.res.pBitmapResInfo[i3].IdName);
|
---|
| 2882 | }
|
---|
| 2883 | break;
|
---|
| 2884 |
|
---|
| 2885 | case IDC_RESCOMBO:
|
---|
| 2886 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 2887 | //変更情報
|
---|
| 2888 | Rad_NoticeChanging(i,RAD_UNDO_IMAGESTATE,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo);
|
---|
| 2889 |
|
---|
| 2890 | i3=SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_GETCURSEL,0,0);
|
---|
| 2891 | SendDlgItemMessage(hwnd,IDC_RESCOMBO,CB_GETLBTEXT,i3,(long)temporary);
|
---|
| 2892 |
|
---|
| 2893 | HeapDefaultFree(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path);
|
---|
| 2894 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1);
|
---|
| 2895 | lstrcpy(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path,temporary);
|
---|
| 2896 |
|
---|
| 2897 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 2898 | }
|
---|
| 2899 | break;
|
---|
| 2900 |
|
---|
| 2901 | case IDC_CHANGEPATH:
|
---|
| 2902 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2903 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.type==IMGTYPE_FILE){
|
---|
| 2904 | if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x000F)==SS_ICON){
|
---|
| 2905 | extern LPSTR IconFileFilter;
|
---|
| 2906 | //"アイコン ファイルを指定して下さい"
|
---|
| 2907 | if(!GetFilePathDialog(hwnd,temporary,IconFileFilter,STRING_IMAGEBOXPROP_GETPATH_ICON,1)) return 1;
|
---|
| 2908 | }
|
---|
| 2909 | else if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&0x000F)==SS_BITMAP){
|
---|
| 2910 | extern LPSTR BitmapFileFilter;
|
---|
| 2911 | //"ビットマップ ファイルを指定して下さい"
|
---|
| 2912 | if(!GetFilePathDialog(hwnd,temporary,BitmapFileFilter,STRING_IMAGEBOXPROP_GETPATH_BITMAP,1)) return 1;
|
---|
| 2913 | }
|
---|
| 2914 |
|
---|
| 2915 | //変更情報
|
---|
| 2916 | Rad_NoticeChanging(i,RAD_UNDO_IMAGESTATE,MdiInfo[i].MdiRadInfo->SelectingItem[0],(DWORD)&ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo);
|
---|
| 2917 |
|
---|
| 2918 | GetRelationalPath(temporary,ProjectInfo.dir);
|
---|
| 2919 | HeapDefaultFree(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path);
|
---|
| 2920 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path=(char *)HeapAlloc(hHeap,0,lstrlen(temporary)+1);
|
---|
| 2921 | lstrcpy(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].ImageCtrlInfo.path,temporary);
|
---|
| 2922 |
|
---|
| 2923 | SetDlgItemText(hwnd,IDC_PATH,temporary);
|
---|
| 2924 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 2925 | }
|
---|
| 2926 | return 1;
|
---|
| 2927 | }
|
---|
| 2928 | break;
|
---|
| 2929 |
|
---|
| 2930 | case IDC_SS_NOTIFY:
|
---|
| 2931 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2932 | //変更情報
|
---|
| 2933 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2934 |
|
---|
| 2935 | if(SendDlgItemMessage(hwnd,IDC_SS_NOTIFY,BM_GETCHECK,0,0))
|
---|
| 2936 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_NOTIFY;
|
---|
| 2937 | else
|
---|
| 2938 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~SS_NOTIFY;
|
---|
| 2939 | return 1;
|
---|
| 2940 | }
|
---|
| 2941 | break;
|
---|
| 2942 | case IDC_SS_CENTERIMAGE:
|
---|
| 2943 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2944 | //変更情報
|
---|
| 2945 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2946 |
|
---|
| 2947 | if(SendDlgItemMessage(hwnd,IDC_SS_CENTERIMAGE,BM_GETCHECK,0,0))
|
---|
| 2948 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_CENTERIMAGE;
|
---|
| 2949 | else
|
---|
| 2950 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~SS_CENTERIMAGE;
|
---|
| 2951 | return 1;
|
---|
| 2952 | }
|
---|
| 2953 | break;
|
---|
| 2954 | case IDC_SS_RIGHTJUST:
|
---|
| 2955 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 2956 | //変更情報
|
---|
| 2957 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 2958 |
|
---|
| 2959 | if(SendDlgItemMessage(hwnd,IDC_SS_RIGHTJUST,BM_GETCHECK,0,0))
|
---|
| 2960 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_RIGHTJUST;
|
---|
| 2961 | else
|
---|
| 2962 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~SS_RIGHTJUST;
|
---|
| 2963 | return 1;
|
---|
| 2964 | }
|
---|
| 2965 | break;
|
---|
| 2966 |
|
---|
| 2967 | case IDC_EXSTYLE:
|
---|
| 2968 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,DlgRadProperty_Item_ExStyle)) return 1;
|
---|
| 2969 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 2970 | return 1;
|
---|
| 2971 | }
|
---|
| 2972 | break;
|
---|
| 2973 | }
|
---|
| 2974 | return 0;
|
---|
| 2975 | }
|
---|
| 2976 |
|
---|
| 2977 |
|
---|
| 2978 | ////////////////////////
|
---|
| 2979 | // LISTVIEW プロパティ
|
---|
| 2980 | BOOL CALLBACK RadProperty_ListViewProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 2981 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 2982 | extern PROJECTINFO ProjectInfo;
|
---|
| 2983 | int i,i2,i3;
|
---|
| 2984 | static BOOL bInitial;
|
---|
| 2985 |
|
---|
| 2986 | switch(message){
|
---|
| 2987 | case WM_INITDIALOG:
|
---|
| 2988 | bInitial=1;
|
---|
| 2989 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 2990 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 2991 |
|
---|
| 2992 | SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
| 2993 |
|
---|
| 2994 |
|
---|
| 2995 | /////////////////////////
|
---|
| 2996 | // スタイル
|
---|
| 2997 | ////////////
|
---|
| 2998 |
|
---|
| 2999 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3000 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3001 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3002 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3003 |
|
---|
| 3004 | ////////
|
---|
| 3005 | // 表示
|
---|
| 3006 | ////////
|
---|
| 3007 |
|
---|
| 3008 | //"アイコン"
|
---|
| 3009 | SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_ADDSTRING,0,(long)STRING_LISTVIEWPROP_STYLE_ICON);
|
---|
| 3010 | //"小さいアイコン"
|
---|
| 3011 | SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_ADDSTRING,0,(long)STRING_LISTVIEWPROP_STYLE_SMALLICON);
|
---|
| 3012 | //"リスト"
|
---|
| 3013 | SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_ADDSTRING,0,(long)STRING_LISTVIEWPROP_STYLE_LIST);
|
---|
| 3014 | //"レポート"
|
---|
| 3015 | SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_ADDSTRING,0,(long)STRING_LISTVIEWPROP_STYLE_REPORT);
|
---|
| 3016 |
|
---|
| 3017 | //ビットを考慮してLVS_LISTを最初に比較する
|
---|
| 3018 | if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_LIST)==LVS_LIST) SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_SETCURSEL,2,0);
|
---|
| 3019 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_SMALLICON) SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_SETCURSEL,1,0);
|
---|
| 3020 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_REPORT) SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_SETCURSEL,3,0);
|
---|
| 3021 | else SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_SETCURSEL,0,0);
|
---|
| 3022 |
|
---|
| 3023 |
|
---|
| 3024 | ////////
|
---|
| 3025 | // 配置
|
---|
| 3026 | ////////
|
---|
| 3027 |
|
---|
| 3028 | //"上端"
|
---|
| 3029 | SendDlgItemMessage(hwnd,IDC_LVS_POSITION,CB_ADDSTRING,0,(long)STRING_TOP);
|
---|
| 3030 | //"左端"
|
---|
| 3031 | SendDlgItemMessage(hwnd,IDC_LVS_POSITION,CB_ADDSTRING,0,(long)STRING_LEFT);
|
---|
| 3032 |
|
---|
| 3033 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_ALIGNLEFT) SendDlgItemMessage(hwnd,IDC_LVS_POSITION,CB_SETCURSEL,1,0);
|
---|
| 3034 | else SendDlgItemMessage(hwnd,IDC_LVS_POSITION,CB_SETCURSEL,0,0);
|
---|
| 3035 |
|
---|
| 3036 |
|
---|
| 3037 | //////////
|
---|
| 3038 | // ソート
|
---|
| 3039 | //////////
|
---|
| 3040 |
|
---|
| 3041 | //"なし"
|
---|
| 3042 | SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_ADDSTRING,0,(long)STRING_NONE);
|
---|
| 3043 | //"昇順"
|
---|
| 3044 | SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_ADDSTRING,0,(long)STRING_SORT_ASCENDING);
|
---|
| 3045 | //"降順"
|
---|
| 3046 | SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_ADDSTRING,0,(long)STRING_SORT_DESCENDING);
|
---|
| 3047 |
|
---|
| 3048 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_SORTASCENDING) SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_SETCURSEL,1,0);
|
---|
| 3049 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_SORTDESCENDING) SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_SETCURSEL,2,0);
|
---|
| 3050 | else SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_SETCURSEL,0,0);
|
---|
| 3051 |
|
---|
| 3052 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_SINGLESEL) SendDlgItemMessage(hwnd,IDC_LVS_SINGLESEL,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3053 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_AUTOARRANGE) SendDlgItemMessage(hwnd,IDC_LVS_AUTOARRANGE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3054 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_NOLABELWRAP) SendDlgItemMessage(hwnd,IDC_LVS_NOLABELWRAP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3055 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_EDITLABELS) SendDlgItemMessage(hwnd,IDC_LVS_EDITLABELS,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3056 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_NOSCROLL) SendDlgItemMessage(hwnd,IDC_LVS_NOSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3057 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_NOCOLUMNHEADER) SendDlgItemMessage(hwnd,IDC_LVS_NOCOLUMNHEADER,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3058 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_NOSORTHEADER) SendDlgItemMessage(hwnd,IDC_LVS_NOSORTHEADER,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3059 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_SHOWSELALWAYS) SendDlgItemMessage(hwnd,IDC_LVS_SHOWSELALWAYS,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3060 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_OWNERDRAWFIXED) SendDlgItemMessage(hwnd,IDC_LVS_OWNERDRAWFIXED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3061 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LVS_SHAREIMAGELISTS) SendDlgItemMessage(hwnd,IDC_LVS_SHAREIMAGELISTS,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3062 |
|
---|
| 3063 |
|
---|
| 3064 | bInitial=0;
|
---|
| 3065 | break;
|
---|
| 3066 | case WM_COMMAND:
|
---|
| 3067 |
|
---|
| 3068 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 3069 | if(i==-1) return 1;
|
---|
| 3070 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 3071 |
|
---|
| 3072 | //共通スタイル
|
---|
| 3073 | if(bInitial==0){
|
---|
| 3074 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
| 3075 | }
|
---|
| 3076 |
|
---|
| 3077 | switch(LOWORD(wParam)){
|
---|
| 3078 | case IDC_LVS_VIEW:
|
---|
| 3079 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 3080 | //変更情報
|
---|
| 3081 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3082 |
|
---|
| 3083 | i3=SendDlgItemMessage(hwnd,IDC_LVS_VIEW,CB_GETCURSEL,0,0);
|
---|
| 3084 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(LVS_SMALLICON|LVS_LIST|LVS_REPORT);
|
---|
| 3085 | if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_SMALLICON;
|
---|
| 3086 | else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_LIST;
|
---|
| 3087 | else if(i3==3) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_REPORT;
|
---|
| 3088 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 3089 | return 1;
|
---|
| 3090 | }
|
---|
| 3091 | break;
|
---|
| 3092 | case IDC_LVS_POSITION:
|
---|
| 3093 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 3094 | //変更情報
|
---|
| 3095 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3096 |
|
---|
| 3097 | i3=SendDlgItemMessage(hwnd,IDC_LVS_POSITION,CB_GETCURSEL,0,0);
|
---|
| 3098 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(LVS_ALIGNLEFT);
|
---|
| 3099 | if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_ALIGNLEFT;
|
---|
| 3100 | return 1;
|
---|
| 3101 | }
|
---|
| 3102 | break;
|
---|
| 3103 | case IDC_LVS_SORT:
|
---|
| 3104 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 3105 | //変更情報
|
---|
| 3106 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3107 |
|
---|
| 3108 | i3=SendDlgItemMessage(hwnd,IDC_LVS_SORT,CB_GETCURSEL,0,0);
|
---|
| 3109 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(LVS_SORTASCENDING|LVS_SORTDESCENDING);
|
---|
| 3110 | if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_SORTASCENDING;
|
---|
| 3111 | else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_SORTDESCENDING;
|
---|
| 3112 | return 1;
|
---|
| 3113 | }
|
---|
| 3114 | break;
|
---|
| 3115 |
|
---|
| 3116 | case IDC_LVS_SINGLESEL:
|
---|
| 3117 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3118 | //変更情報
|
---|
| 3119 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3120 |
|
---|
| 3121 | if(SendDlgItemMessage(hwnd,IDC_LVS_SINGLESEL,BM_GETCHECK,0,0))
|
---|
| 3122 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_SINGLESEL;
|
---|
| 3123 | else
|
---|
| 3124 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_SINGLESEL;
|
---|
| 3125 | return 1;
|
---|
| 3126 | }
|
---|
| 3127 | break;
|
---|
| 3128 | case IDC_LVS_AUTOARRANGE:
|
---|
| 3129 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3130 | //変更情報
|
---|
| 3131 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3132 |
|
---|
| 3133 | if(SendDlgItemMessage(hwnd,IDC_LVS_AUTOARRANGE,BM_GETCHECK,0,0))
|
---|
| 3134 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_AUTOARRANGE;
|
---|
| 3135 | else
|
---|
| 3136 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_AUTOARRANGE;
|
---|
| 3137 | return 1;
|
---|
| 3138 | }
|
---|
| 3139 | break;
|
---|
| 3140 | case IDC_LVS_NOLABELWRAP:
|
---|
| 3141 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3142 | //変更情報
|
---|
| 3143 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3144 |
|
---|
| 3145 | if(SendDlgItemMessage(hwnd,IDC_LVS_NOLABELWRAP,BM_GETCHECK,0,0))
|
---|
| 3146 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_NOLABELWRAP;
|
---|
| 3147 | else
|
---|
| 3148 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_NOLABELWRAP;
|
---|
| 3149 | return 1;
|
---|
| 3150 | }
|
---|
| 3151 | break;
|
---|
| 3152 | case IDC_LVS_EDITLABELS:
|
---|
| 3153 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3154 | //変更情報
|
---|
| 3155 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3156 |
|
---|
| 3157 | if(SendDlgItemMessage(hwnd,IDC_LVS_EDITLABELS,BM_GETCHECK,0,0))
|
---|
| 3158 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_EDITLABELS;
|
---|
| 3159 | else
|
---|
| 3160 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_EDITLABELS;
|
---|
| 3161 | return 1;
|
---|
| 3162 | }
|
---|
| 3163 | break;
|
---|
| 3164 | case IDC_LVS_NOSCROLL:
|
---|
| 3165 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3166 | //変更情報
|
---|
| 3167 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3168 |
|
---|
| 3169 | if(SendDlgItemMessage(hwnd,IDC_LVS_NOSCROLL,BM_GETCHECK,0,0))
|
---|
| 3170 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_NOSCROLL;
|
---|
| 3171 | else
|
---|
| 3172 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_NOSCROLL;
|
---|
| 3173 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 3174 | return 1;
|
---|
| 3175 | }
|
---|
| 3176 | break;
|
---|
| 3177 | case IDC_LVS_NOCOLUMNHEADER:
|
---|
| 3178 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3179 | //変更情報
|
---|
| 3180 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3181 |
|
---|
| 3182 | if(SendDlgItemMessage(hwnd,IDC_LVS_NOCOLUMNHEADER,BM_GETCHECK,0,0))
|
---|
| 3183 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_NOCOLUMNHEADER;
|
---|
| 3184 | else
|
---|
| 3185 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_NOCOLUMNHEADER;
|
---|
| 3186 | return 1;
|
---|
| 3187 | }
|
---|
| 3188 | break;
|
---|
| 3189 | case IDC_LVS_NOSORTHEADER:
|
---|
| 3190 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3191 | //変更情報
|
---|
| 3192 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3193 |
|
---|
| 3194 | if(SendDlgItemMessage(hwnd,IDC_LVS_NOSORTHEADER,BM_GETCHECK,0,0))
|
---|
| 3195 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_NOSORTHEADER;
|
---|
| 3196 | else
|
---|
| 3197 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_NOSORTHEADER;
|
---|
| 3198 | return 1;
|
---|
| 3199 | }
|
---|
| 3200 | break;
|
---|
| 3201 | case IDC_LVS_SHOWSELALWAYS:
|
---|
| 3202 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3203 | //変更情報
|
---|
| 3204 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3205 |
|
---|
| 3206 | if(SendDlgItemMessage(hwnd,IDC_LVS_SHOWSELALWAYS,BM_GETCHECK,0,0))
|
---|
| 3207 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_SHOWSELALWAYS;
|
---|
| 3208 | else
|
---|
| 3209 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_SHOWSELALWAYS;
|
---|
| 3210 | return 1;
|
---|
| 3211 | }
|
---|
| 3212 | break;
|
---|
| 3213 | case IDC_LVS_OWNERDRAWFIXED:
|
---|
| 3214 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3215 | //変更情報
|
---|
| 3216 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3217 |
|
---|
| 3218 | if(SendDlgItemMessage(hwnd,IDC_LVS_OWNERDRAWFIXED,BM_GETCHECK,0,0))
|
---|
| 3219 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_OWNERDRAWFIXED;
|
---|
| 3220 | else
|
---|
| 3221 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_OWNERDRAWFIXED;
|
---|
| 3222 | return 1;
|
---|
| 3223 | }
|
---|
| 3224 | break;
|
---|
| 3225 | case IDC_LVS_SHAREIMAGELISTS:
|
---|
| 3226 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3227 | //変更情報
|
---|
| 3228 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3229 |
|
---|
| 3230 | if(SendDlgItemMessage(hwnd,IDC_LVS_SHAREIMAGELISTS,BM_GETCHECK,0,0))
|
---|
| 3231 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LVS_SHAREIMAGELISTS;
|
---|
| 3232 | else
|
---|
| 3233 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LVS_SHAREIMAGELISTS;
|
---|
| 3234 | return 1;
|
---|
| 3235 | }
|
---|
| 3236 | break;
|
---|
| 3237 |
|
---|
| 3238 | case IDC_EXSTYLE:
|
---|
| 3239 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,DlgRadProperty_Item_ExStyle)) return 1;
|
---|
| 3240 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 3241 | return 1;
|
---|
| 3242 | }
|
---|
| 3243 | break;
|
---|
| 3244 | }
|
---|
| 3245 | return 0;
|
---|
| 3246 | }
|
---|
| 3247 |
|
---|
| 3248 |
|
---|
| 3249 | ///////////////////////
|
---|
| 3250 | // LISTBOX プロパティ
|
---|
| 3251 |
|
---|
| 3252 | void RadProperty_ListBox_StylingOrder(HWND hwnd,DWORD *style){
|
---|
| 3253 | if(*style&LBS_OWNERDRAWVARIABLE){
|
---|
| 3254 | *style&=~(LBS_MULTICOLUMN);
|
---|
| 3255 | SendDlgItemMessage(hwnd,IDC_LBS_MULTICOLUMN,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 3256 | EnableWindow(GetDlgItem(hwnd,IDC_LBS_MULTICOLUMN),0);
|
---|
| 3257 | }
|
---|
| 3258 | else
|
---|
| 3259 | EnableWindow(GetDlgItem(hwnd,IDC_LBS_MULTICOLUMN),1);
|
---|
| 3260 |
|
---|
| 3261 | if(!(*style&(LBS_OWNERDRAWFIXED|LBS_OWNERDRAWVARIABLE))){
|
---|
| 3262 | *style&=~(LBS_HASSTRINGS);
|
---|
| 3263 | SendDlgItemMessage(hwnd,IDC_LBS_HASSTRINGS,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 3264 | EnableWindow(GetDlgItem(hwnd,IDC_LBS_HASSTRINGS),0);
|
---|
| 3265 | }
|
---|
| 3266 | else
|
---|
| 3267 | EnableWindow(GetDlgItem(hwnd,IDC_LBS_HASSTRINGS),1);
|
---|
| 3268 | }
|
---|
| 3269 | BOOL CALLBACK RadProperty_ListBoxProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 3270 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 3271 | extern PROJECTINFO ProjectInfo;
|
---|
| 3272 | int i,i2,i3;
|
---|
| 3273 | static BOOL bInitial;
|
---|
| 3274 |
|
---|
| 3275 | switch(message){
|
---|
| 3276 | case WM_INITDIALOG:
|
---|
| 3277 | bInitial=1;
|
---|
| 3278 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 3279 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 3280 |
|
---|
| 3281 | SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
| 3282 |
|
---|
| 3283 |
|
---|
| 3284 | ////////////////////////
|
---|
| 3285 | // スタイル
|
---|
| 3286 | ////////////
|
---|
| 3287 |
|
---|
| 3288 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3289 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3290 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3291 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3292 |
|
---|
| 3293 | ////////
|
---|
| 3294 | // 選択
|
---|
| 3295 | ////////
|
---|
| 3296 |
|
---|
| 3297 | //"シングル"
|
---|
| 3298 | SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_ADDSTRING,0,(long)STRING_LISTBOXPROP_STYLE_SEL_SINGLE);
|
---|
| 3299 | //"マルチ"
|
---|
| 3300 | SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_ADDSTRING,0,(long)STRING_LISTBOXPROP_STYLE_SEL_MULTI);
|
---|
| 3301 | //"拡張"
|
---|
| 3302 | SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_ADDSTRING,0,(long)STRING_LISTBOXPROP_STYLE_SEL_EXTENDED);
|
---|
| 3303 | //"なし"
|
---|
| 3304 | SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_ADDSTRING,0,(long)STRING_NONE);
|
---|
| 3305 |
|
---|
| 3306 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_MULTIPLESEL) SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_SETCURSEL,1,0);
|
---|
| 3307 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_EXTENDEDSEL) SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_SETCURSEL,2,0);
|
---|
| 3308 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_NOSEL) SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_SETCURSEL,3,0);
|
---|
| 3309 | else SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_SETCURSEL,0,0);
|
---|
| 3310 |
|
---|
| 3311 |
|
---|
| 3312 | ////////////////
|
---|
| 3313 | // オーナー描画
|
---|
| 3314 | ////////////////
|
---|
| 3315 |
|
---|
| 3316 | //"なし"
|
---|
| 3317 | SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_NONE);
|
---|
| 3318 | //"固定"
|
---|
| 3319 | SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_OWNERDRAW_FIXED);
|
---|
| 3320 | //"可変"
|
---|
| 3321 | SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_ADDSTRING,0,(long)STRING_OWNERDRAW_VARIABLE);
|
---|
| 3322 |
|
---|
| 3323 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_OWNERDRAWFIXED) SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_SETCURSEL,1,0);
|
---|
| 3324 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_OWNERDRAWVARIABLE) SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_SETCURSEL,2,0);
|
---|
| 3325 | else SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_SETCURSEL,0,0);
|
---|
| 3326 |
|
---|
| 3327 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_HASSTRINGS) SendDlgItemMessage(hwnd,IDC_LBS_HASSTRINGS,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3328 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_SORT) SendDlgItemMessage(hwnd,IDC_LBS_SORT,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3329 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_NOTIFY) SendDlgItemMessage(hwnd,IDC_LBS_NOTIFY,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3330 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_MULTICOLUMN) SendDlgItemMessage(hwnd,IDC_LBS_MULTICOLUMN,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3331 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_HSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3332 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VSCROLL) SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3333 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_DISABLENOSCROLL) SendDlgItemMessage(hwnd,IDC_LBS_DISABLENOSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3334 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_NOREDRAW) SendDlgItemMessage(hwnd,IDC_LBS_NOREDRAW,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3335 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_USETABSTOPS) SendDlgItemMessage(hwnd,IDC_LBS_USETABSTOPS,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3336 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&LBS_WANTKEYBOARDINPUT) SendDlgItemMessage(hwnd,IDC_LBS_WANTKEYBOARDINPUT,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3337 |
|
---|
| 3338 | RadProperty_ListBox_StylingOrder(hwnd,&ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3339 |
|
---|
| 3340 |
|
---|
| 3341 | bInitial=0;
|
---|
| 3342 | break;
|
---|
| 3343 | case WM_COMMAND:
|
---|
| 3344 |
|
---|
| 3345 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 3346 | if(i==-1) return 1;
|
---|
| 3347 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 3348 |
|
---|
| 3349 | //共通スタイル
|
---|
| 3350 | if(bInitial==0){
|
---|
| 3351 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
| 3352 | }
|
---|
| 3353 |
|
---|
| 3354 | switch(LOWORD(wParam)){
|
---|
| 3355 | case IDC_LBS_SELECT:
|
---|
| 3356 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 3357 | //変更情報
|
---|
| 3358 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3359 |
|
---|
| 3360 | i3=SendDlgItemMessage(hwnd,IDC_LBS_SELECT,CB_GETCURSEL,0,0);
|
---|
| 3361 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(LBS_MULTIPLESEL|LBS_EXTENDEDSEL|LBS_NOSEL);
|
---|
| 3362 | if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_MULTIPLESEL;
|
---|
| 3363 | else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_EXTENDEDSEL;
|
---|
| 3364 | else if(i3==3) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_NOSEL;
|
---|
| 3365 | return 1;
|
---|
| 3366 | }
|
---|
| 3367 | break;
|
---|
| 3368 | case IDC_LBS_OWNERDRAW:
|
---|
| 3369 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 3370 | //変更情報
|
---|
| 3371 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3372 |
|
---|
| 3373 | i3=SendDlgItemMessage(hwnd,IDC_LBS_OWNERDRAW,CB_GETCURSEL,0,0);
|
---|
| 3374 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(LBS_OWNERDRAWFIXED|LBS_OWNERDRAWVARIABLE);
|
---|
| 3375 | if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_OWNERDRAWFIXED;
|
---|
| 3376 | else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_OWNERDRAWVARIABLE;
|
---|
| 3377 |
|
---|
| 3378 | RadProperty_ListBox_StylingOrder(hwnd,&ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3379 | return 1;
|
---|
| 3380 | }
|
---|
| 3381 | break;
|
---|
| 3382 |
|
---|
| 3383 | case IDC_LBS_HASSTRINGS:
|
---|
| 3384 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3385 | //変更情報
|
---|
| 3386 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3387 |
|
---|
| 3388 | if(SendDlgItemMessage(hwnd,IDC_LBS_HASSTRINGS,BM_GETCHECK,0,0))
|
---|
| 3389 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_HASSTRINGS;
|
---|
| 3390 | else
|
---|
| 3391 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_HASSTRINGS;
|
---|
| 3392 | return 1;
|
---|
| 3393 | }
|
---|
| 3394 | break;
|
---|
| 3395 | case IDC_LBS_SORT:
|
---|
| 3396 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3397 | //変更情報
|
---|
| 3398 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3399 |
|
---|
| 3400 | if(SendDlgItemMessage(hwnd,IDC_LBS_SORT,BM_GETCHECK,0,0))
|
---|
| 3401 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_SORT;
|
---|
| 3402 | else
|
---|
| 3403 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_SORT;
|
---|
| 3404 | return 1;
|
---|
| 3405 | }
|
---|
| 3406 | break;
|
---|
| 3407 | case IDC_LBS_NOTIFY:
|
---|
| 3408 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3409 | //変更情報
|
---|
| 3410 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3411 |
|
---|
| 3412 | if(SendDlgItemMessage(hwnd,IDC_LBS_NOTIFY,BM_GETCHECK,0,0))
|
---|
| 3413 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_NOTIFY;
|
---|
| 3414 | else
|
---|
| 3415 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_NOTIFY;
|
---|
| 3416 | return 1;
|
---|
| 3417 | }
|
---|
| 3418 | break;
|
---|
| 3419 | case IDC_LBS_MULTICOLUMN:
|
---|
| 3420 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3421 | //変更情報
|
---|
| 3422 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3423 |
|
---|
| 3424 | if(SendDlgItemMessage(hwnd,IDC_LBS_MULTICOLUMN,BM_GETCHECK,0,0))
|
---|
| 3425 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_MULTICOLUMN;
|
---|
| 3426 | else
|
---|
| 3427 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_MULTICOLUMN;
|
---|
| 3428 | return 1;
|
---|
| 3429 | }
|
---|
| 3430 | break;
|
---|
| 3431 | case IDC_STYLE_HSCROLL:
|
---|
| 3432 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3433 | //変更情報
|
---|
| 3434 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3435 |
|
---|
| 3436 | if(SendDlgItemMessage(hwnd,IDC_STYLE_HSCROLL,BM_GETCHECK,0,0))
|
---|
| 3437 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=WS_HSCROLL;
|
---|
| 3438 | else
|
---|
| 3439 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~WS_HSCROLL;
|
---|
| 3440 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 3441 | return 1;
|
---|
| 3442 | }
|
---|
| 3443 | break;
|
---|
| 3444 | case IDC_STYLE_VSCROLL:
|
---|
| 3445 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3446 | //変更情報
|
---|
| 3447 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3448 |
|
---|
| 3449 | if(SendDlgItemMessage(hwnd,IDC_STYLE_VSCROLL,BM_GETCHECK,0,0))
|
---|
| 3450 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=WS_VSCROLL;
|
---|
| 3451 | else
|
---|
| 3452 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~WS_VSCROLL;
|
---|
| 3453 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 3454 | return 1;
|
---|
| 3455 | }
|
---|
| 3456 | break;
|
---|
| 3457 | case IDC_LBS_DISABLENOSCROLL:
|
---|
| 3458 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3459 | //変更情報
|
---|
| 3460 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3461 |
|
---|
| 3462 | if(SendDlgItemMessage(hwnd,IDC_LBS_DISABLENOSCROLL,BM_GETCHECK,0,0))
|
---|
| 3463 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_DISABLENOSCROLL;
|
---|
| 3464 | else
|
---|
| 3465 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_DISABLENOSCROLL;
|
---|
| 3466 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 3467 | return 1;
|
---|
| 3468 | }
|
---|
| 3469 | break;
|
---|
| 3470 | case IDC_LBS_NOREDRAW:
|
---|
| 3471 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3472 | //変更情報
|
---|
| 3473 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3474 |
|
---|
| 3475 | if(SendDlgItemMessage(hwnd,IDC_LBS_NOREDRAW,BM_GETCHECK,0,0))
|
---|
| 3476 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_NOREDRAW;
|
---|
| 3477 | else
|
---|
| 3478 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_NOREDRAW;
|
---|
| 3479 | return 1;
|
---|
| 3480 | }
|
---|
| 3481 | break;
|
---|
| 3482 | case IDC_LBS_USETABSTOPS:
|
---|
| 3483 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3484 | //変更情報
|
---|
| 3485 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3486 |
|
---|
| 3487 | if(SendDlgItemMessage(hwnd,IDC_LBS_USETABSTOPS,BM_GETCHECK,0,0))
|
---|
| 3488 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_USETABSTOPS;
|
---|
| 3489 | else
|
---|
| 3490 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_USETABSTOPS;
|
---|
| 3491 | return 1;
|
---|
| 3492 | }
|
---|
| 3493 | break;
|
---|
| 3494 | case IDC_LBS_WANTKEYBOARDINPUT:
|
---|
| 3495 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3496 | //変更情報
|
---|
| 3497 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3498 |
|
---|
| 3499 | if(SendDlgItemMessage(hwnd,IDC_LBS_WANTKEYBOARDINPUT,BM_GETCHECK,0,0))
|
---|
| 3500 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=LBS_WANTKEYBOARDINPUT;
|
---|
| 3501 | else
|
---|
| 3502 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~LBS_WANTKEYBOARDINPUT;
|
---|
| 3503 | return 1;
|
---|
| 3504 | }
|
---|
| 3505 | break;
|
---|
| 3506 |
|
---|
| 3507 | case IDC_EXSTYLE:
|
---|
| 3508 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,DlgRadProperty_Item_ExStyle)) return 1;
|
---|
| 3509 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 3510 | return 1;
|
---|
| 3511 | }
|
---|
| 3512 | break;
|
---|
| 3513 | }
|
---|
| 3514 | return 0;
|
---|
| 3515 | }
|
---|
| 3516 |
|
---|
| 3517 |
|
---|
| 3518 | ///////////////////////////
|
---|
| 3519 | // PROGRESSBAR プロパティ
|
---|
| 3520 | BOOL CALLBACK RadProperty_ProgressBarProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 3521 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 3522 | extern PROJECTINFO ProjectInfo;
|
---|
| 3523 | int i,i2;
|
---|
| 3524 | static BOOL bInitial;
|
---|
| 3525 |
|
---|
| 3526 | switch(message){
|
---|
| 3527 | case WM_INITDIALOG:
|
---|
| 3528 | bInitial=1;
|
---|
| 3529 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 3530 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 3531 |
|
---|
| 3532 | SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
| 3533 | SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
|
---|
| 3534 |
|
---|
| 3535 |
|
---|
| 3536 | ////////////
|
---|
| 3537 | //スタイル
|
---|
| 3538 |
|
---|
| 3539 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3540 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3541 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3542 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3543 |
|
---|
| 3544 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&PBS_VERTICAL) SendDlgItemMessage(hwnd,IDC_PBS_VERTICAL,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3545 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&PBS_SMOOTH) SendDlgItemMessage(hwnd,IDC_PBS_SMOOTH,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3546 |
|
---|
| 3547 |
|
---|
| 3548 | bInitial=0;
|
---|
| 3549 | break;
|
---|
| 3550 | case WM_COMMAND:
|
---|
| 3551 |
|
---|
| 3552 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 3553 | if(i==-1) return 1;
|
---|
| 3554 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 3555 |
|
---|
| 3556 | //共通スタイル
|
---|
| 3557 | if(bInitial==0){
|
---|
| 3558 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
| 3559 | }
|
---|
| 3560 |
|
---|
| 3561 | switch(LOWORD(wParam)){
|
---|
| 3562 | case IDC_PBS_VERTICAL:
|
---|
| 3563 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3564 | //変更情報
|
---|
| 3565 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3566 |
|
---|
| 3567 | if(SendDlgItemMessage(hwnd,IDC_PBS_VERTICAL,BM_GETCHECK,0,0))
|
---|
| 3568 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=PBS_VERTICAL;
|
---|
| 3569 | else
|
---|
| 3570 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~PBS_VERTICAL;
|
---|
| 3571 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 3572 | return 1;
|
---|
| 3573 | }
|
---|
| 3574 | break;
|
---|
| 3575 | case IDC_PBS_SMOOTH:
|
---|
| 3576 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3577 | //変更情報
|
---|
| 3578 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3579 |
|
---|
| 3580 | if(SendDlgItemMessage(hwnd,IDC_PBS_SMOOTH,BM_GETCHECK,0,0))
|
---|
| 3581 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=PBS_SMOOTH;
|
---|
| 3582 | else
|
---|
| 3583 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~PBS_SMOOTH;
|
---|
| 3584 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 3585 | return 1;
|
---|
| 3586 | }
|
---|
| 3587 | break;
|
---|
| 3588 |
|
---|
| 3589 | case IDC_EXSTYLE:
|
---|
| 3590 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,DlgRadProperty_Item_ExStyle)) return 1;
|
---|
| 3591 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 3592 | return 1;
|
---|
| 3593 | }
|
---|
| 3594 | }
|
---|
| 3595 | return 0;
|
---|
| 3596 | }
|
---|
| 3597 |
|
---|
| 3598 |
|
---|
| 3599 | ///////////////////////////
|
---|
| 3600 | // RADIOBUTTON プロパティ
|
---|
| 3601 |
|
---|
| 3602 | BOOL CALLBACK RadProperty_RadioButtonProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 3603 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 3604 | extern PROJECTINFO ProjectInfo;
|
---|
| 3605 | int i,i2,i3;
|
---|
| 3606 | static BOOL bInitial;
|
---|
| 3607 |
|
---|
| 3608 | switch(message){
|
---|
| 3609 | case WM_INITDIALOG:
|
---|
| 3610 | bInitial=1;
|
---|
| 3611 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 3612 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 3613 |
|
---|
| 3614 | SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
| 3615 | SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
|
---|
| 3616 |
|
---|
| 3617 |
|
---|
| 3618 | /////////////////////////
|
---|
| 3619 | // スタイル
|
---|
| 3620 | ////////////
|
---|
| 3621 |
|
---|
| 3622 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3623 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3624 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3625 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3626 |
|
---|
| 3627 | 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);
|
---|
| 3628 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_PUSHLIKE) SendDlgItemMessage(hwnd,IDC_BS_PUSHLIKE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3629 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_LEFTTEXT) SendDlgItemMessage(hwnd,IDC_BS_LEFTTEXT,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3630 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_ICON) SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3631 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BITMAP) SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3632 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_MULTILINE) SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3633 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_NOTIFY) SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3634 |
|
---|
| 3635 |
|
---|
| 3636 | //////////////////
|
---|
| 3637 | // 水平方向の配置
|
---|
| 3638 | //////////////////
|
---|
| 3639 |
|
---|
| 3640 | //"デフォルト"
|
---|
| 3641 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT);
|
---|
| 3642 | //"左端"
|
---|
| 3643 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_LEFT);
|
---|
| 3644 | //"右端"
|
---|
| 3645 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_RIGHT);
|
---|
| 3646 | //"中央"
|
---|
| 3647 | SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
|
---|
| 3648 |
|
---|
| 3649 | //ビットを考慮してBS_CENTERを最初に比較する
|
---|
| 3650 | if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_CENTER)==BS_CENTER) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,3,0);
|
---|
| 3651 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_LEFT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,1,0);
|
---|
| 3652 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_RIGHT) SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,2,0);
|
---|
| 3653 | else SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_SETCURSEL,0,0);
|
---|
| 3654 |
|
---|
| 3655 |
|
---|
| 3656 | //////////////////
|
---|
| 3657 | // 垂直方向の配置
|
---|
| 3658 | //////////////////
|
---|
| 3659 |
|
---|
| 3660 | //"デフォルト"
|
---|
| 3661 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_DEFAULT);
|
---|
| 3662 | //"上端"
|
---|
| 3663 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_TOP);
|
---|
| 3664 | //"下端"
|
---|
| 3665 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_BOTTOM);
|
---|
| 3666 | //"中央"
|
---|
| 3667 | SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
|
---|
| 3668 |
|
---|
| 3669 | //ビットを考慮してBS_VCENTERを最初に比較する
|
---|
| 3670 | if((ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_VCENTER)==BS_VCENTER) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,3,0);
|
---|
| 3671 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_TOP) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,1,0);
|
---|
| 3672 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&BS_BOTTOM) SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,2,0);
|
---|
| 3673 | else SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_SETCURSEL,0,0);
|
---|
| 3674 |
|
---|
| 3675 |
|
---|
| 3676 | bInitial=0;
|
---|
| 3677 | break;
|
---|
| 3678 | case WM_COMMAND:
|
---|
| 3679 |
|
---|
| 3680 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 3681 | if(i==-1) return 1;
|
---|
| 3682 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 3683 |
|
---|
| 3684 | //共通スタイル
|
---|
| 3685 | if(bInitial==0){
|
---|
| 3686 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
| 3687 | }
|
---|
| 3688 |
|
---|
| 3689 | switch(LOWORD(wParam)){
|
---|
| 3690 | case IDC_BS_AUTO:
|
---|
| 3691 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3692 | //変更情報
|
---|
| 3693 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3694 |
|
---|
| 3695 | if(SendDlgItemMessage(hwnd,IDC_BS_AUTO,BM_GETCHECK,0,0)){
|
---|
| 3696 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0;
|
---|
| 3697 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_AUTORADIOBUTTON;
|
---|
| 3698 | }
|
---|
| 3699 | else{
|
---|
| 3700 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=0xFFFFFFF0;
|
---|
| 3701 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_RADIOBUTTON;
|
---|
| 3702 | }
|
---|
| 3703 | return 1;
|
---|
| 3704 | }
|
---|
| 3705 | break;
|
---|
| 3706 | case IDC_BS_PUSHLIKE:
|
---|
| 3707 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3708 | //変更情報
|
---|
| 3709 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3710 |
|
---|
| 3711 | if(SendDlgItemMessage(hwnd,IDC_BS_PUSHLIKE,BM_GETCHECK,0,0))
|
---|
| 3712 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_PUSHLIKE;
|
---|
| 3713 | else
|
---|
| 3714 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_PUSHLIKE;
|
---|
| 3715 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 3716 | return 1;
|
---|
| 3717 | }
|
---|
| 3718 | break;
|
---|
| 3719 | case IDC_BS_LEFTTEXT:
|
---|
| 3720 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3721 | //変更情報
|
---|
| 3722 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3723 |
|
---|
| 3724 | if(SendDlgItemMessage(hwnd,IDC_BS_LEFTTEXT,BM_GETCHECK,0,0))
|
---|
| 3725 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_LEFTTEXT;
|
---|
| 3726 | else
|
---|
| 3727 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_LEFTTEXT;
|
---|
| 3728 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 3729 | return 1;
|
---|
| 3730 | }
|
---|
| 3731 | break;
|
---|
| 3732 | case IDC_BS_ICON:
|
---|
| 3733 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3734 | //変更情報
|
---|
| 3735 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3736 |
|
---|
| 3737 | if(SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_GETCHECK,0,0)){
|
---|
| 3738 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_ICON;
|
---|
| 3739 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP;
|
---|
| 3740 | SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 3741 | }
|
---|
| 3742 | else
|
---|
| 3743 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON;
|
---|
| 3744 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 3745 | return 1;
|
---|
| 3746 | }
|
---|
| 3747 | break;
|
---|
| 3748 | case IDC_BS_BITMAP:
|
---|
| 3749 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3750 | //変更情報
|
---|
| 3751 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3752 |
|
---|
| 3753 | if(SendDlgItemMessage(hwnd,IDC_BS_BITMAP,BM_GETCHECK,0,0)){
|
---|
| 3754 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BITMAP;
|
---|
| 3755 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_ICON;
|
---|
| 3756 | SendDlgItemMessage(hwnd,IDC_BS_ICON,BM_SETCHECK,BST_UNCHECKED,0);
|
---|
| 3757 | }
|
---|
| 3758 | else
|
---|
| 3759 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_BITMAP;
|
---|
| 3760 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 3761 | return 1;
|
---|
| 3762 | }
|
---|
| 3763 | break;
|
---|
| 3764 | case IDC_BS_MULTILINE:
|
---|
| 3765 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3766 | //変更情報
|
---|
| 3767 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3768 |
|
---|
| 3769 | if(SendDlgItemMessage(hwnd,IDC_BS_MULTILINE,BM_GETCHECK,0,0))
|
---|
| 3770 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_MULTILINE;
|
---|
| 3771 | else
|
---|
| 3772 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_MULTILINE;
|
---|
| 3773 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 3774 | return 1;
|
---|
| 3775 | }
|
---|
| 3776 | break;
|
---|
| 3777 | case IDC_BS_NOTIFY:
|
---|
| 3778 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3779 | //変更情報
|
---|
| 3780 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3781 |
|
---|
| 3782 | if(SendDlgItemMessage(hwnd,IDC_BS_NOTIFY,BM_GETCHECK,0,0))
|
---|
| 3783 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_NOTIFY;
|
---|
| 3784 | else
|
---|
| 3785 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~BS_NOTIFY;
|
---|
| 3786 | return 1;
|
---|
| 3787 | }
|
---|
| 3788 | break;
|
---|
| 3789 |
|
---|
| 3790 | case IDC_BS_HPOS:
|
---|
| 3791 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 3792 | //変更情報
|
---|
| 3793 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3794 |
|
---|
| 3795 | i3=SendDlgItemMessage(hwnd,IDC_BS_HPOS,CB_GETCURSEL,0,0);
|
---|
| 3796 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_LEFT|BS_RIGHT|BS_CENTER);
|
---|
| 3797 | if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_LEFT;
|
---|
| 3798 | else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_RIGHT;
|
---|
| 3799 | else if(i3==3) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_CENTER;
|
---|
| 3800 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 3801 | return 1;
|
---|
| 3802 | }
|
---|
| 3803 | break;
|
---|
| 3804 | case IDC_BS_VPOS:
|
---|
| 3805 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 3806 | //変更情報
|
---|
| 3807 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3808 |
|
---|
| 3809 | i3=SendDlgItemMessage(hwnd,IDC_BS_VPOS,CB_GETCURSEL,0,0);
|
---|
| 3810 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(BS_TOP|BS_BOTTOM|BS_VCENTER);
|
---|
| 3811 | if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_TOP;
|
---|
| 3812 | else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_BOTTOM;
|
---|
| 3813 | else if(i3==3) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=BS_VCENTER;
|
---|
| 3814 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 3815 | return 1;
|
---|
| 3816 | }
|
---|
| 3817 | break;
|
---|
| 3818 |
|
---|
| 3819 | case IDC_EXSTYLE:
|
---|
| 3820 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,DlgRadProperty_Item_ExStyle)) return 1;
|
---|
| 3821 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 3822 | return 1;
|
---|
| 3823 | }
|
---|
| 3824 | break;
|
---|
| 3825 | }
|
---|
| 3826 | return 0;
|
---|
| 3827 | }
|
---|
| 3828 |
|
---|
| 3829 |
|
---|
| 3830 | /////////////////////////
|
---|
| 3831 | // SCROLLBAR プロパティ
|
---|
| 3832 |
|
---|
| 3833 | BOOL CALLBACK RadProperty_ScrollBarProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 3834 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 3835 | extern PROJECTINFO ProjectInfo;
|
---|
| 3836 | int i,i2,i3;
|
---|
| 3837 | static BOOL bInitial;
|
---|
| 3838 |
|
---|
| 3839 | switch(message){
|
---|
| 3840 | case WM_INITDIALOG:
|
---|
| 3841 | bInitial=1;
|
---|
| 3842 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 3843 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 3844 |
|
---|
| 3845 | SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
| 3846 |
|
---|
| 3847 |
|
---|
| 3848 | ////////////////////////
|
---|
| 3849 | // スタイル
|
---|
| 3850 | ////////////
|
---|
| 3851 |
|
---|
| 3852 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3853 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3854 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3855 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3856 |
|
---|
| 3857 |
|
---|
| 3858 | ////////
|
---|
| 3859 | // 配置
|
---|
| 3860 | ////////
|
---|
| 3861 |
|
---|
| 3862 | //"指定無し"
|
---|
| 3863 | SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_ADDSTRING,0,(long)STRING_SCROLLBARPROP_STYLE_FREE);
|
---|
| 3864 | //"上/左"
|
---|
| 3865 | SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_ADDSTRING,0,(long)STRING_SCROLLBARPROP_STYLE_TOPORLEFT);
|
---|
| 3866 | //"下/右"
|
---|
| 3867 | SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_ADDSTRING,0,(long)STRING_SCROLLBARPROP_STYLE_BOTTOMORRIGHT);
|
---|
| 3868 |
|
---|
| 3869 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SBS_TOPALIGN) SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_SETCURSEL,1,0);
|
---|
| 3870 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SBS_BOTTOMALIGN) SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_SETCURSEL,2,0);
|
---|
| 3871 | else SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_SETCURSEL,0,0);
|
---|
| 3872 |
|
---|
| 3873 |
|
---|
| 3874 | bInitial=0;
|
---|
| 3875 | break;
|
---|
| 3876 | case WM_COMMAND:
|
---|
| 3877 |
|
---|
| 3878 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 3879 | if(i==-1) return 1;
|
---|
| 3880 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 3881 |
|
---|
| 3882 | //共通スタイル
|
---|
| 3883 | if(bInitial==0){
|
---|
| 3884 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
| 3885 | }
|
---|
| 3886 |
|
---|
| 3887 | switch(LOWORD(wParam)){
|
---|
| 3888 | case IDC_SBS_POSITION:
|
---|
| 3889 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 3890 | //変更情報
|
---|
| 3891 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3892 |
|
---|
| 3893 | i3=SendDlgItemMessage(hwnd,IDC_SBS_POSITION,CB_GETCURSEL,0,0);
|
---|
| 3894 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(SBS_TOPALIGN|SBS_BOTTOMALIGN);
|
---|
| 3895 | if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SBS_TOPALIGN;
|
---|
| 3896 | else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SBS_BOTTOMALIGN;
|
---|
| 3897 | return 1;
|
---|
| 3898 | }
|
---|
| 3899 | break;
|
---|
| 3900 |
|
---|
| 3901 | case IDC_EXSTYLE:
|
---|
| 3902 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,DlgRadProperty_Item_ExStyle)) return 1;
|
---|
| 3903 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 3904 | return 1;
|
---|
| 3905 | }
|
---|
| 3906 | break;
|
---|
| 3907 | }
|
---|
| 3908 | return 0;
|
---|
| 3909 | }
|
---|
| 3910 |
|
---|
| 3911 |
|
---|
| 3912 | //////////////////////
|
---|
| 3913 | // STATIC プロパティ
|
---|
| 3914 |
|
---|
| 3915 | BOOL CALLBACK RadProperty_StaticProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 3916 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 3917 | extern PROJECTINFO ProjectInfo;
|
---|
| 3918 | int i,i2,i3;
|
---|
| 3919 | static BOOL bInitial;
|
---|
| 3920 |
|
---|
| 3921 | switch(message){
|
---|
| 3922 | case WM_INITDIALOG:
|
---|
| 3923 | bInitial=1;
|
---|
| 3924 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 3925 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 3926 |
|
---|
| 3927 | SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
| 3928 | SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
|
---|
| 3929 |
|
---|
| 3930 |
|
---|
| 3931 | ////////////////////////
|
---|
| 3932 | // スタイル
|
---|
| 3933 | ////////////
|
---|
| 3934 |
|
---|
| 3935 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3936 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3937 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3938 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3939 |
|
---|
| 3940 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_NOPREFIX) SendDlgItemMessage(hwnd,IDC_SS_NOPREFIX,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3941 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_LEFTNOWORDWRAP) SendDlgItemMessage(hwnd,IDC_SS_LEFTNOWORDWRAP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3942 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_NOTIFY) SendDlgItemMessage(hwnd,IDC_SS_NOTIFY,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 3943 |
|
---|
| 3944 |
|
---|
| 3945 | //////////////////
|
---|
| 3946 | // テキストの配置
|
---|
| 3947 | //////////////////
|
---|
| 3948 |
|
---|
| 3949 | //"左端"
|
---|
| 3950 | SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_ADDSTRING,0,(long)STRING_LEFT);
|
---|
| 3951 | //"中央"
|
---|
| 3952 | SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_ADDSTRING,0,(long)STRING_CENTER);
|
---|
| 3953 | //"右端"
|
---|
| 3954 | SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_ADDSTRING,0,(long)STRING_RIGHT);
|
---|
| 3955 |
|
---|
| 3956 | //ビットを考慮してSS_LEFTを最後に検討する
|
---|
| 3957 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_CENTER) SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_SETCURSEL,1,0);
|
---|
| 3958 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&SS_RIGHT) SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_SETCURSEL,2,0);
|
---|
| 3959 | else SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_SETCURSEL,0,0);
|
---|
| 3960 |
|
---|
| 3961 |
|
---|
| 3962 | bInitial=0;
|
---|
| 3963 | break;
|
---|
| 3964 | case WM_COMMAND:
|
---|
| 3965 |
|
---|
| 3966 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 3967 | if(i==-1) return 1;
|
---|
| 3968 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 3969 |
|
---|
| 3970 | //共通スタイル
|
---|
| 3971 | if(bInitial==0){
|
---|
| 3972 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
| 3973 | }
|
---|
| 3974 |
|
---|
| 3975 | switch(LOWORD(wParam)){
|
---|
| 3976 | case IDC_SS_NOPREFIX:
|
---|
| 3977 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3978 | //変更情報
|
---|
| 3979 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3980 |
|
---|
| 3981 | if(SendDlgItemMessage(hwnd,IDC_SS_NOPREFIX,BM_GETCHECK,0,0))
|
---|
| 3982 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_NOPREFIX;
|
---|
| 3983 | else
|
---|
| 3984 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~SS_NOPREFIX;
|
---|
| 3985 | return 1;
|
---|
| 3986 | }
|
---|
| 3987 | break;
|
---|
| 3988 | case IDC_SS_LEFTNOWORDWRAP:
|
---|
| 3989 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 3990 | //変更情報
|
---|
| 3991 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 3992 |
|
---|
| 3993 | if(SendDlgItemMessage(hwnd,IDC_SS_LEFTNOWORDWRAP,BM_GETCHECK,0,0))
|
---|
| 3994 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_LEFTNOWORDWRAP;
|
---|
| 3995 | else
|
---|
| 3996 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~SS_LEFTNOWORDWRAP;
|
---|
| 3997 |
|
---|
| 3998 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 3999 | return 1;
|
---|
| 4000 | }
|
---|
| 4001 | break;
|
---|
| 4002 | case IDC_SS_NOTIFY:
|
---|
| 4003 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4004 | //変更情報
|
---|
| 4005 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 4006 |
|
---|
| 4007 | if(SendDlgItemMessage(hwnd,IDC_SS_NOTIFY,BM_GETCHECK,0,0))
|
---|
| 4008 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_NOTIFY;
|
---|
| 4009 | else
|
---|
| 4010 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~SS_NOTIFY;
|
---|
| 4011 | return 1;
|
---|
| 4012 | }
|
---|
| 4013 | break;
|
---|
| 4014 |
|
---|
| 4015 | case IDC_SS_TEXTPOS:
|
---|
| 4016 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 4017 | //変更情報
|
---|
| 4018 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 4019 |
|
---|
| 4020 | i3=SendDlgItemMessage(hwnd,IDC_SS_TEXTPOS,CB_GETCURSEL,0,0);
|
---|
| 4021 | //SS_LEFT=0
|
---|
| 4022 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(SS_CENTER|SS_RIGHT);
|
---|
| 4023 | if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_CENTER;
|
---|
| 4024 | else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=SS_RIGHT;
|
---|
| 4025 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 4026 | return 1;
|
---|
| 4027 | }
|
---|
| 4028 | break;
|
---|
| 4029 |
|
---|
| 4030 | case IDC_EXSTYLE:
|
---|
| 4031 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,DlgRadProperty_Item_ExStyle)) return 1;
|
---|
| 4032 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 4033 | return 1;
|
---|
| 4034 | }
|
---|
| 4035 | break;
|
---|
| 4036 | }
|
---|
| 4037 | return 0;
|
---|
| 4038 | }
|
---|
| 4039 |
|
---|
| 4040 |
|
---|
| 4041 | ////////////////////////
|
---|
| 4042 | // TRACKBAR プロパティ
|
---|
| 4043 | BOOL CALLBACK RadProperty_TrackBarProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 4044 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 4045 | extern PROJECTINFO ProjectInfo;
|
---|
| 4046 | int i,i2,i3;
|
---|
| 4047 | static BOOL bInitial;
|
---|
| 4048 |
|
---|
| 4049 | switch(message){
|
---|
| 4050 | case WM_INITDIALOG:
|
---|
| 4051 | bInitial=1;
|
---|
| 4052 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 4053 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 4054 |
|
---|
| 4055 | SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
| 4056 |
|
---|
| 4057 |
|
---|
| 4058 | ///////////////////////////
|
---|
| 4059 | // スタイル
|
---|
| 4060 | ////////////
|
---|
| 4061 |
|
---|
| 4062 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4063 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4064 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4065 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4066 |
|
---|
| 4067 |
|
---|
| 4068 | ////////
|
---|
| 4069 | // 表示
|
---|
| 4070 | ////////
|
---|
| 4071 |
|
---|
| 4072 | //"水平方向"
|
---|
| 4073 | SendDlgItemMessage(hwnd,IDC_TBS_SITUATION,CB_ADDSTRING,0,(long)STRING_DIRECTION_HORIZONTAL);
|
---|
| 4074 | //"垂直方向"
|
---|
| 4075 | SendDlgItemMessage(hwnd,IDC_TBS_SITUATION,CB_ADDSTRING,0,(long)STRING_DIRECTION_VERTICAL);
|
---|
| 4076 |
|
---|
| 4077 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TBS_VERT) SendDlgItemMessage(hwnd,IDC_TBS_SITUATION,CB_SETCURSEL,1,0);
|
---|
| 4078 | else SendDlgItemMessage(hwnd,IDC_TBS_SITUATION,CB_SETCURSEL,0,0);
|
---|
| 4079 |
|
---|
| 4080 |
|
---|
| 4081 | ////////////
|
---|
| 4082 | // ポイント
|
---|
| 4083 | ////////////
|
---|
| 4084 |
|
---|
| 4085 | //"両方"
|
---|
| 4086 | SendDlgItemMessage(hwnd,IDC_TBS_POINT,CB_ADDSTRING,0,(long)STRING_TRACKBARPROP_STYLE_POSITION_BOTH);
|
---|
| 4087 | //"上/左"
|
---|
| 4088 | SendDlgItemMessage(hwnd,IDC_TBS_POINT,CB_ADDSTRING,0,(long)STRING_TRACKBARPROP_STYLE_POSITION_TOPORLEFT);
|
---|
| 4089 | //"下/右"
|
---|
| 4090 | SendDlgItemMessage(hwnd,IDC_TBS_POINT,CB_ADDSTRING,0,(long)STRING_TRACKBARPROP_STYLE_POSITION_BOTTOMORRIGHT);
|
---|
| 4091 |
|
---|
| 4092 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TBS_BOTH) SendDlgItemMessage(hwnd,IDC_TBS_POINT,CB_SETCURSEL,0,0);
|
---|
| 4093 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TBS_TOP) SendDlgItemMessage(hwnd,IDC_TBS_POINT,CB_SETCURSEL,1,0);
|
---|
| 4094 | else SendDlgItemMessage(hwnd,IDC_TBS_POINT,CB_SETCURSEL,2,0);
|
---|
| 4095 |
|
---|
| 4096 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TBS_NOTICKS) SendDlgItemMessage(hwnd,IDC_TBS_NOTICKS,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4097 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TBS_AUTOTICKS) SendDlgItemMessage(hwnd,IDC_TBS_AUTOTICKS,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4098 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TBS_ENABLESELRANGE) SendDlgItemMessage(hwnd,IDC_TBS_ENABLESELRANGE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4099 |
|
---|
| 4100 |
|
---|
| 4101 | bInitial=0;
|
---|
| 4102 | break;
|
---|
| 4103 | case WM_COMMAND:
|
---|
| 4104 |
|
---|
| 4105 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 4106 | if(i==-1) return 1;
|
---|
| 4107 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 4108 |
|
---|
| 4109 | //共通スタイル
|
---|
| 4110 | if(bInitial==0){
|
---|
| 4111 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
| 4112 | }
|
---|
| 4113 |
|
---|
| 4114 | switch(LOWORD(wParam)){
|
---|
| 4115 | case IDC_TBS_SITUATION:
|
---|
| 4116 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 4117 | //変更情報
|
---|
| 4118 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 4119 |
|
---|
| 4120 | i3=SendDlgItemMessage(hwnd,IDC_TBS_SITUATION,CB_GETCURSEL,0,0);
|
---|
| 4121 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TBS_VERT;
|
---|
| 4122 | if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TBS_VERT;
|
---|
| 4123 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 4124 | return 1;
|
---|
| 4125 | }
|
---|
| 4126 | break;
|
---|
| 4127 | case IDC_TBS_POINT:
|
---|
| 4128 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 4129 | //変更情報
|
---|
| 4130 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 4131 |
|
---|
| 4132 | i3=SendDlgItemMessage(hwnd,IDC_TBS_POINT,CB_GETCURSEL,0,0);
|
---|
| 4133 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(TBS_BOTH|TBS_TOP);
|
---|
| 4134 | if(i3==0) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TBS_BOTH;
|
---|
| 4135 | else if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TBS_TOP;
|
---|
| 4136 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 4137 | return 1;
|
---|
| 4138 | }
|
---|
| 4139 | break;
|
---|
| 4140 |
|
---|
| 4141 | case IDC_TBS_NOTICKS:
|
---|
| 4142 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4143 | //変更情報
|
---|
| 4144 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 4145 |
|
---|
| 4146 | if(SendDlgItemMessage(hwnd,IDC_TBS_NOTICKS,BM_GETCHECK,0,0))
|
---|
| 4147 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TBS_NOTICKS;
|
---|
| 4148 | else
|
---|
| 4149 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TBS_NOTICKS;
|
---|
| 4150 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 4151 | return 1;
|
---|
| 4152 | }
|
---|
| 4153 | break;
|
---|
| 4154 | case IDC_TBS_AUTOTICKS:
|
---|
| 4155 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4156 | //変更情報
|
---|
| 4157 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 4158 |
|
---|
| 4159 | if(SendDlgItemMessage(hwnd,IDC_TBS_AUTOTICKS,BM_GETCHECK,0,0))
|
---|
| 4160 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TBS_AUTOTICKS;
|
---|
| 4161 | else
|
---|
| 4162 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TBS_AUTOTICKS;
|
---|
| 4163 | return 1;
|
---|
| 4164 | }
|
---|
| 4165 | break;
|
---|
| 4166 | case IDC_TBS_ENABLESELRANGE:
|
---|
| 4167 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4168 | //変更情報
|
---|
| 4169 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 4170 |
|
---|
| 4171 | if(SendDlgItemMessage(hwnd,IDC_TBS_ENABLESELRANGE,BM_GETCHECK,0,0))
|
---|
| 4172 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TBS_ENABLESELRANGE;
|
---|
| 4173 | else
|
---|
| 4174 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TBS_ENABLESELRANGE;
|
---|
| 4175 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 4176 | return 1;
|
---|
| 4177 | }
|
---|
| 4178 | break;
|
---|
| 4179 |
|
---|
| 4180 | case IDC_EXSTYLE:
|
---|
| 4181 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,DlgRadProperty_Item_ExStyle)) return 1;
|
---|
| 4182 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 4183 | return 1;
|
---|
| 4184 | }
|
---|
| 4185 | break;
|
---|
| 4186 | }
|
---|
| 4187 | return 0;
|
---|
| 4188 | }
|
---|
| 4189 |
|
---|
| 4190 |
|
---|
| 4191 | //////////////////////////
|
---|
| 4192 | // TREEVIEW プロパティ
|
---|
| 4193 | BOOL CALLBACK RadProperty_TreeViewProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 4194 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 4195 | extern PROJECTINFO ProjectInfo;
|
---|
| 4196 | int i,i2;
|
---|
| 4197 | static BOOL bInitial;
|
---|
| 4198 |
|
---|
| 4199 | switch(message){
|
---|
| 4200 | case WM_INITDIALOG:
|
---|
| 4201 | bInitial=1;
|
---|
| 4202 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 4203 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 4204 |
|
---|
| 4205 | SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
| 4206 |
|
---|
| 4207 |
|
---|
| 4208 | ////////////
|
---|
| 4209 | //スタイル
|
---|
| 4210 |
|
---|
| 4211 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4212 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4213 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4214 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4215 |
|
---|
| 4216 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_HASBUTTONS) SendDlgItemMessage(hwnd,IDC_TVS_HASBUTTONS,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4217 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_HASLINES) SendDlgItemMessage(hwnd,IDC_TVS_HASLINES,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4218 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_LINESATROOT) SendDlgItemMessage(hwnd,IDC_TVS_LINESATROOT,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4219 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_EDITLABELS) SendDlgItemMessage(hwnd,IDC_TVS_EDITLABELS,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4220 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_DISABLEDRAGDROP) SendDlgItemMessage(hwnd,IDC_TVS_DISABLEDRAGDROP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4221 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_SHOWSELALWAYS) SendDlgItemMessage(hwnd,IDC_TVS_SHOWSELALWAYS,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4222 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_NOSCROLL) SendDlgItemMessage(hwnd,IDC_TVS_NOSCROLL,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4223 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_NOTOOLTIPS) SendDlgItemMessage(hwnd,IDC_TVS_NOTOOLTIPS,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4224 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_CHECKBOXES) SendDlgItemMessage(hwnd,IDC_TVS_CHECKBOXES,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4225 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_FULLROWSELECT) SendDlgItemMessage(hwnd,IDC_TVS_FULLROWSELECT,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4226 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_TRACKSELECT) SendDlgItemMessage(hwnd,IDC_TVS_TRACKSELECT,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4227 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&TVS_SINGLEEXPAND) SendDlgItemMessage(hwnd,IDC_TVS_SINGLEEXPAND,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4228 |
|
---|
| 4229 |
|
---|
| 4230 | bInitial=0;
|
---|
| 4231 | break;
|
---|
| 4232 | case WM_COMMAND:
|
---|
| 4233 |
|
---|
| 4234 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 4235 | if(i==-1) return 1;
|
---|
| 4236 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 4237 |
|
---|
| 4238 | //共通スタイル
|
---|
| 4239 | if(bInitial==0){
|
---|
| 4240 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
| 4241 | }
|
---|
| 4242 |
|
---|
| 4243 | switch(LOWORD(wParam)){
|
---|
| 4244 | case IDC_TVS_HASBUTTONS:
|
---|
| 4245 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4246 | //変更情報
|
---|
| 4247 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 4248 |
|
---|
| 4249 | if(SendDlgItemMessage(hwnd,IDC_TVS_HASBUTTONS,BM_GETCHECK,0,0))
|
---|
| 4250 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_HASBUTTONS;
|
---|
| 4251 | else
|
---|
| 4252 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_HASBUTTONS;
|
---|
| 4253 | return 1;
|
---|
| 4254 | }
|
---|
| 4255 | break;
|
---|
| 4256 | case IDC_TVS_HASLINES:
|
---|
| 4257 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4258 | //変更情報
|
---|
| 4259 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 4260 |
|
---|
| 4261 | if(SendDlgItemMessage(hwnd,IDC_TVS_HASLINES,BM_GETCHECK,0,0))
|
---|
| 4262 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_HASLINES;
|
---|
| 4263 | else
|
---|
| 4264 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_HASLINES;
|
---|
| 4265 | return 1;
|
---|
| 4266 | }
|
---|
| 4267 | break;
|
---|
| 4268 | case IDC_TVS_LINESATROOT:
|
---|
| 4269 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4270 | //変更情報
|
---|
| 4271 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 4272 |
|
---|
| 4273 | if(SendDlgItemMessage(hwnd,IDC_TVS_LINESATROOT,BM_GETCHECK,0,0))
|
---|
| 4274 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_LINESATROOT;
|
---|
| 4275 | else
|
---|
| 4276 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_LINESATROOT;
|
---|
| 4277 | return 1;
|
---|
| 4278 | }
|
---|
| 4279 | break;
|
---|
| 4280 | case IDC_TVS_EDITLABELS:
|
---|
| 4281 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4282 | //変更情報
|
---|
| 4283 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 4284 |
|
---|
| 4285 | if(SendDlgItemMessage(hwnd,IDC_TVS_EDITLABELS,BM_GETCHECK,0,0))
|
---|
| 4286 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_EDITLABELS;
|
---|
| 4287 | else
|
---|
| 4288 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_EDITLABELS;
|
---|
| 4289 | return 1;
|
---|
| 4290 | }
|
---|
| 4291 | break;
|
---|
| 4292 | case IDC_TVS_DISABLEDRAGDROP:
|
---|
| 4293 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4294 | //変更情報
|
---|
| 4295 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 4296 |
|
---|
| 4297 | if(SendDlgItemMessage(hwnd,IDC_TVS_DISABLEDRAGDROP,BM_GETCHECK,0,0))
|
---|
| 4298 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_DISABLEDRAGDROP;
|
---|
| 4299 | else
|
---|
| 4300 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_DISABLEDRAGDROP;
|
---|
| 4301 | return 1;
|
---|
| 4302 | }
|
---|
| 4303 | break;
|
---|
| 4304 | case IDC_TVS_SHOWSELALWAYS:
|
---|
| 4305 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4306 | //変更情報
|
---|
| 4307 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 4308 |
|
---|
| 4309 | if(SendDlgItemMessage(hwnd,IDC_TVS_SHOWSELALWAYS,BM_GETCHECK,0,0))
|
---|
| 4310 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_SHOWSELALWAYS;
|
---|
| 4311 | else
|
---|
| 4312 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_SHOWSELALWAYS;
|
---|
| 4313 | return 1;
|
---|
| 4314 | }
|
---|
| 4315 | break;
|
---|
| 4316 | case IDC_TVS_NOSCROLL:
|
---|
| 4317 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4318 | //変更情報
|
---|
| 4319 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 4320 |
|
---|
| 4321 | if(SendDlgItemMessage(hwnd,IDC_TVS_NOSCROLL,BM_GETCHECK,0,0))
|
---|
| 4322 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_NOSCROLL;
|
---|
| 4323 | else
|
---|
| 4324 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_NOSCROLL;
|
---|
| 4325 | return 1;
|
---|
| 4326 | }
|
---|
| 4327 | break;
|
---|
| 4328 | case IDC_TVS_NOTOOLTIPS:
|
---|
| 4329 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4330 | //変更情報
|
---|
| 4331 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 4332 |
|
---|
| 4333 | if(SendDlgItemMessage(hwnd,IDC_TVS_NOTOOLTIPS,BM_GETCHECK,0,0))
|
---|
| 4334 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_NOTOOLTIPS;
|
---|
| 4335 | else
|
---|
| 4336 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_NOTOOLTIPS;
|
---|
| 4337 | return 1;
|
---|
| 4338 | }
|
---|
| 4339 | break;
|
---|
| 4340 | case IDC_TVS_CHECKBOXES:
|
---|
| 4341 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4342 | //変更情報
|
---|
| 4343 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 4344 |
|
---|
| 4345 | if(SendDlgItemMessage(hwnd,IDC_TVS_CHECKBOXES,BM_GETCHECK,0,0))
|
---|
| 4346 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_CHECKBOXES;
|
---|
| 4347 | else
|
---|
| 4348 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_CHECKBOXES;
|
---|
| 4349 | return 1;
|
---|
| 4350 | }
|
---|
| 4351 | break;
|
---|
| 4352 | case IDC_TVS_FULLROWSELECT:
|
---|
| 4353 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4354 | //変更情報
|
---|
| 4355 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 4356 |
|
---|
| 4357 | if(SendDlgItemMessage(hwnd,IDC_TVS_FULLROWSELECT,BM_GETCHECK,0,0))
|
---|
| 4358 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_FULLROWSELECT;
|
---|
| 4359 | else
|
---|
| 4360 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_FULLROWSELECT;
|
---|
| 4361 | return 1;
|
---|
| 4362 | }
|
---|
| 4363 | break;
|
---|
| 4364 | case IDC_TVS_TRACKSELECT:
|
---|
| 4365 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4366 | //変更情報
|
---|
| 4367 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 4368 |
|
---|
| 4369 | if(SendDlgItemMessage(hwnd,IDC_TVS_TRACKSELECT,BM_GETCHECK,0,0))
|
---|
| 4370 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_TRACKSELECT;
|
---|
| 4371 | else
|
---|
| 4372 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_TRACKSELECT;
|
---|
| 4373 | return 1;
|
---|
| 4374 | }
|
---|
| 4375 | break;
|
---|
| 4376 | case IDC_TVS_SINGLEEXPAND:
|
---|
| 4377 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4378 | //変更情報
|
---|
| 4379 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 4380 |
|
---|
| 4381 | if(SendDlgItemMessage(hwnd,IDC_TVS_SINGLEEXPAND,BM_GETCHECK,0,0))
|
---|
| 4382 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=TVS_SINGLEEXPAND;
|
---|
| 4383 | else
|
---|
| 4384 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~TVS_SINGLEEXPAND;
|
---|
| 4385 | return 1;
|
---|
| 4386 | }
|
---|
| 4387 | break;
|
---|
| 4388 |
|
---|
| 4389 | case IDC_EXSTYLE:
|
---|
| 4390 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,DlgRadProperty_Item_ExStyle)) return 1;
|
---|
| 4391 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 4392 | return 1;
|
---|
| 4393 | }
|
---|
| 4394 | break;
|
---|
| 4395 | }
|
---|
| 4396 | return 0;
|
---|
| 4397 | }
|
---|
| 4398 |
|
---|
| 4399 |
|
---|
| 4400 | //////////////////////
|
---|
| 4401 | // UPDOWN プロパティ
|
---|
| 4402 | BOOL CALLBACK RadProperty_UpDownProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 4403 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 4404 | extern PROJECTINFO ProjectInfo;
|
---|
| 4405 | int i,i2,i3;
|
---|
| 4406 | static BOOL bInitial;
|
---|
| 4407 |
|
---|
| 4408 | switch(message){
|
---|
| 4409 | case WM_INITDIALOG:
|
---|
| 4410 | bInitial=1;
|
---|
| 4411 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 4412 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 4413 |
|
---|
| 4414 | SetDlgItemText(hwnd,IDC_IDNAME,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].IdName);
|
---|
| 4415 | SetDlgItemText(hwnd,IDC_CAPTION,ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].caption);
|
---|
| 4416 |
|
---|
| 4417 |
|
---|
| 4418 | //////////////////
|
---|
| 4419 | // スタイル
|
---|
| 4420 | ////////////
|
---|
| 4421 |
|
---|
| 4422 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_DISABLED) SendDlgItemMessage(hwnd,IDC_STYLE_DISABLED,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4423 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_VISIBLE) SendDlgItemMessage(hwnd,IDC_STYLE_VISIBLE,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4424 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_GROUP) SendDlgItemMessage(hwnd,IDC_STYLE_GROUP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4425 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&WS_TABSTOP) SendDlgItemMessage(hwnd,IDC_STYLE_TABSTOP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4426 |
|
---|
| 4427 |
|
---|
| 4428 | ////////
|
---|
| 4429 | // 方向
|
---|
| 4430 | ////////
|
---|
| 4431 |
|
---|
| 4432 | //"水平方向"
|
---|
| 4433 | SendDlgItemMessage(hwnd,IDC_UDS_SITUATION,CB_ADDSTRING,0,(long)STRING_DIRECTION_HORIZONTAL);
|
---|
| 4434 | //"垂直方向"
|
---|
| 4435 | SendDlgItemMessage(hwnd,IDC_UDS_SITUATION,CB_ADDSTRING,0,(long)STRING_DIRECTION_VERTICAL);
|
---|
| 4436 |
|
---|
| 4437 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_HORZ) SendDlgItemMessage(hwnd,IDC_UDS_SITUATION,CB_SETCURSEL,0,0);
|
---|
| 4438 | else SendDlgItemMessage(hwnd,IDC_UDS_SITUATION,CB_SETCURSEL,1,0);
|
---|
| 4439 |
|
---|
| 4440 | ////////////
|
---|
| 4441 | // アタッチ
|
---|
| 4442 | ////////////
|
---|
| 4443 |
|
---|
| 4444 | //"なし"
|
---|
| 4445 | SendDlgItemMessage(hwnd,IDC_UDS_ATTACH,CB_ADDSTRING,0,(long)STRING_NONE);
|
---|
| 4446 | //"左端"
|
---|
| 4447 | SendDlgItemMessage(hwnd,IDC_UDS_ATTACH,CB_ADDSTRING,0,(long)STRING_LEFT);
|
---|
| 4448 | //"右端"
|
---|
| 4449 | SendDlgItemMessage(hwnd,IDC_UDS_ATTACH,CB_ADDSTRING,0,(long)STRING_RIGHT);
|
---|
| 4450 |
|
---|
| 4451 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_ALIGNLEFT) SendDlgItemMessage(hwnd,IDC_UDS_ATTACH,CB_SETCURSEL,1,0);
|
---|
| 4452 | else if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_ALIGNRIGHT) SendDlgItemMessage(hwnd,IDC_UDS_ATTACH,CB_SETCURSEL,2,0);
|
---|
| 4453 | else SendDlgItemMessage(hwnd,IDC_UDS_ATTACH,CB_SETCURSEL,0,0);
|
---|
| 4454 |
|
---|
| 4455 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_AUTOBUDDY) SendDlgItemMessage(hwnd,IDC_UDS_AUTOBUDDY,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4456 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_SETBUDDYINT) SendDlgItemMessage(hwnd,IDC_UDS_SETBUDDYINT,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4457 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_NOTHOUSANDS) SendDlgItemMessage(hwnd,IDC_UDS_NOTHOUSANDS,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4458 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_WRAP) SendDlgItemMessage(hwnd,IDC_UDS_WRAP,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4459 | if(ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&UDS_ARROWKEYS) SendDlgItemMessage(hwnd,IDC_UDS_ARROWKEYS,BM_SETCHECK,BST_CHECKED,0);
|
---|
| 4460 |
|
---|
| 4461 |
|
---|
| 4462 | bInitial=0;
|
---|
| 4463 | break;
|
---|
| 4464 | case WM_COMMAND:
|
---|
| 4465 |
|
---|
| 4466 | i=GetWndNum(GetParent(GetParent(hwnd)));
|
---|
| 4467 | if(i==-1) return 1;
|
---|
| 4468 | i2=GetWndInfoNum(MdiInfo[i].path);
|
---|
| 4469 |
|
---|
| 4470 | //共通スタイル
|
---|
| 4471 | if(bInitial==0){
|
---|
| 4472 | if(DefaultItemStyles(hwnd,i,i2,wParam)) return 1;
|
---|
| 4473 | }
|
---|
| 4474 |
|
---|
| 4475 | switch(LOWORD(wParam)){
|
---|
| 4476 | case IDC_UDS_SITUATION:
|
---|
| 4477 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 4478 | //変更情報
|
---|
| 4479 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 4480 |
|
---|
| 4481 | i3=SendDlgItemMessage(hwnd,IDC_UDS_SITUATION,CB_GETCURSEL,0,0);
|
---|
| 4482 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~UDS_HORZ;
|
---|
| 4483 | if(i3==0) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_HORZ;
|
---|
| 4484 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 4485 | return 1;
|
---|
| 4486 | }
|
---|
| 4487 | break;
|
---|
| 4488 | case IDC_UDS_ATTACH:
|
---|
| 4489 | if(HIWORD(wParam)==CBN_SELCHANGE){
|
---|
| 4490 | //変更情報
|
---|
| 4491 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 4492 |
|
---|
| 4493 | i3=SendDlgItemMessage(hwnd,IDC_UDS_ATTACH,CB_GETCURSEL,0,0);
|
---|
| 4494 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~(UDS_ALIGNLEFT|UDS_ALIGNRIGHT);
|
---|
| 4495 | if(i3==1) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_ALIGNLEFT;
|
---|
| 4496 | else if(i3==2) ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_ALIGNRIGHT;
|
---|
| 4497 | return 1;
|
---|
| 4498 | }
|
---|
| 4499 | break;
|
---|
| 4500 |
|
---|
| 4501 | case IDC_UDS_AUTOBUDDY:
|
---|
| 4502 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4503 | //変更情報
|
---|
| 4504 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 4505 |
|
---|
| 4506 | if(SendDlgItemMessage(hwnd,IDC_UDS_AUTOBUDDY,BM_GETCHECK,0,0))
|
---|
| 4507 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_AUTOBUDDY;
|
---|
| 4508 | else
|
---|
| 4509 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~UDS_AUTOBUDDY;
|
---|
| 4510 | return 1;
|
---|
| 4511 | }
|
---|
| 4512 | break;
|
---|
| 4513 | case IDC_UDS_SETBUDDYINT:
|
---|
| 4514 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4515 | //変更情報
|
---|
| 4516 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 4517 |
|
---|
| 4518 | if(SendDlgItemMessage(hwnd,IDC_UDS_SETBUDDYINT,BM_GETCHECK,0,0))
|
---|
| 4519 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_SETBUDDYINT;
|
---|
| 4520 | else
|
---|
| 4521 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~UDS_SETBUDDYINT;
|
---|
| 4522 | return 1;
|
---|
| 4523 | }
|
---|
| 4524 | break;
|
---|
| 4525 | case IDC_UDS_NOTHOUSANDS:
|
---|
| 4526 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4527 | //変更情報
|
---|
| 4528 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 4529 |
|
---|
| 4530 | if(SendDlgItemMessage(hwnd,IDC_UDS_NOTHOUSANDS,BM_GETCHECK,0,0))
|
---|
| 4531 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_NOTHOUSANDS;
|
---|
| 4532 | else
|
---|
| 4533 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~UDS_NOTHOUSANDS;
|
---|
| 4534 | return 1;
|
---|
| 4535 | }
|
---|
| 4536 | break;
|
---|
| 4537 | case IDC_UDS_WRAP:
|
---|
| 4538 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4539 | //変更情報
|
---|
| 4540 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 4541 |
|
---|
| 4542 | if(SendDlgItemMessage(hwnd,IDC_UDS_WRAP,BM_GETCHECK,0,0))
|
---|
| 4543 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_WRAP;
|
---|
| 4544 | else
|
---|
| 4545 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~UDS_WRAP;
|
---|
| 4546 | return 1;
|
---|
| 4547 | }
|
---|
| 4548 | break;
|
---|
| 4549 | case IDC_UDS_ARROWKEYS:
|
---|
| 4550 | if(HIWORD(wParam)==BN_CLICKED){
|
---|
| 4551 | //変更情報
|
---|
| 4552 | Rad_NoticeChanging(i,RAD_UNDO_STYLE,MdiInfo[i].MdiRadInfo->SelectingItem[0],ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style);
|
---|
| 4553 |
|
---|
| 4554 | if(SendDlgItemMessage(hwnd,IDC_UDS_ARROWKEYS,BM_GETCHECK,0,0))
|
---|
| 4555 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style|=UDS_ARROWKEYS;
|
---|
| 4556 | else
|
---|
| 4557 | ProjectInfo.pWindowInfo[i2].pChildInfo[MdiInfo[i].MdiRadInfo->SelectingItem[0]].style&=~UDS_ARROWKEYS;
|
---|
| 4558 | return 1;
|
---|
| 4559 | }
|
---|
| 4560 | break;
|
---|
| 4561 |
|
---|
| 4562 | case IDC_EXSTYLE:
|
---|
| 4563 | if(!DialogBox(hResInst,MAKEINTRESOURCE(IDD_RAD_PROP_ITEM_EXSTYLE),hwnd,DlgRadProperty_Item_ExStyle)) return 1;
|
---|
| 4564 | DrawRadWindow(i,&ProjectInfo.pWindowInfo[i2]);
|
---|
| 4565 | return 1;
|
---|
| 4566 | }
|
---|
| 4567 | }
|
---|
| 4568 | return 0;
|
---|
| 4569 | }
|
---|
| 4570 |
|
---|
| 4571 |
|
---|
| 4572 | LRESULT CALLBACK RadPropertyWindow(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam){
|
---|
| 4573 | extern MDIINFO MdiInfo[MAX_WNDNUM];
|
---|
| 4574 | extern PROJECTINFO ProjectInfo;
|
---|
| 4575 | int i;
|
---|
| 4576 | RECT rect;
|
---|
| 4577 | SCROLLINFO ScrollInfo;
|
---|
| 4578 |
|
---|
| 4579 | switch(message){
|
---|
| 4580 | case WM_MOUSEACTIVATE:
|
---|
| 4581 | BringWindowToTop(GetParent(hwnd));
|
---|
| 4582 | return 0;
|
---|
| 4583 | case WM_VSCROLL:
|
---|
| 4584 | ScrollInfo.cbSize=sizeof(SCROLLINFO);
|
---|
| 4585 | ScrollInfo.fMask=SIF_POS|SIF_PAGE|SIF_RANGE;
|
---|
| 4586 | GetScrollInfo(hwnd,SB_VERT,&ScrollInfo);
|
---|
| 4587 | if(LOWORD(wParam)==SB_LINEUP) i=-20;
|
---|
| 4588 | else if(LOWORD(wParam)==SB_LINEDOWN) i=20;
|
---|
| 4589 | else if(LOWORD(wParam)==SB_PAGEUP) i=-(signed int)ScrollInfo.nPage;
|
---|
| 4590 | else if(LOWORD(wParam)==SB_PAGEDOWN) i=ScrollInfo.nPage;
|
---|
| 4591 | else if(LOWORD(wParam)==SB_THUMBTRACK) i=HIWORD(wParam)-ScrollInfo.nPos;
|
---|
| 4592 | else i=0;
|
---|
| 4593 | GetClientRect(hwnd,&rect);
|
---|
| 4594 | i=max(-ScrollInfo.nPos,min(i,ScrollInfo.nMax-rect.bottom-ScrollInfo.nPos));
|
---|
| 4595 | if(i!=0){
|
---|
| 4596 | ScrollInfo.nPos+=i;
|
---|
| 4597 | SetScrollInfo(hwnd,SB_VERT,&ScrollInfo,1);
|
---|
| 4598 | ScrollWindow(hwnd,0,-i,NULL,NULL);
|
---|
| 4599 | UpdateWindow(hwnd);
|
---|
| 4600 | }
|
---|
| 4601 | return 0;
|
---|
| 4602 | case WM_SIZE:
|
---|
| 4603 | i=GetWndNum(GetParent(hwnd));
|
---|
| 4604 | if(i==-1) return 0; //ウィンドウが初期状態の場合
|
---|
| 4605 | ScrollInfo.cbSize=sizeof(SCROLLINFO);
|
---|
| 4606 | ScrollInfo.fMask=SIF_PAGE|SIF_RANGE|SIF_POS;
|
---|
| 4607 | GetScrollInfo(hwnd,SB_VERT,&ScrollInfo);
|
---|
| 4608 | GetClientRect(MdiInfo[i].MdiRadInfo->hProp_Dlg,&rect);
|
---|
| 4609 | ScrollInfo.nMin=0;
|
---|
| 4610 | ScrollInfo.nMax=rect.bottom;
|
---|
| 4611 | ScrollInfo.nPage=HIWORD(lParam);
|
---|
| 4612 | SetScrollInfo(hwnd,SB_VERT,&ScrollInfo,1);
|
---|
| 4613 |
|
---|
| 4614 | i=ScrollInfo.nPos;
|
---|
| 4615 | ScrollInfo.fMask=SIF_POS;
|
---|
| 4616 | GetScrollInfo(hwnd,SB_VERT,&ScrollInfo);
|
---|
| 4617 | if(i>ScrollInfo.nPos){
|
---|
| 4618 | ScrollWindow(hwnd,0,i-ScrollInfo.nPos,NULL,NULL);
|
---|
| 4619 | UpdateWindow(hwnd);
|
---|
| 4620 | }
|
---|
| 4621 | return 0;
|
---|
| 4622 | }
|
---|
| 4623 | return DefWindowProc(hwnd,message,wParam,lParam);
|
---|
| 4624 | }
|
---|