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