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