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