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